diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index adbbd75..e4a47ee 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,1063 +1,549 @@ -.gitignore -.swiftformat -Cartfile -Package.swift +OpenAPITransport/Package.swift +OpenAPITransport/Sources/OpenAPITransport.swift README.md -authentikClient.podspec -authentikClient/Classes/OpenAPIs/APIHelper.swift -authentikClient/Classes/OpenAPIs/APIs.swift -authentikClient/Classes/OpenAPIs/APIs/AdminAPI.swift -authentikClient/Classes/OpenAPIs/APIs/AuthenticatorsAPI.swift -authentikClient/Classes/OpenAPIs/APIs/CoreAPI.swift -authentikClient/Classes/OpenAPIs/APIs/CryptoAPI.swift -authentikClient/Classes/OpenAPIs/APIs/EnterpriseAPI.swift -authentikClient/Classes/OpenAPIs/APIs/EventsAPI.swift -authentikClient/Classes/OpenAPIs/APIs/FlowsAPI.swift -authentikClient/Classes/OpenAPIs/APIs/ManagedAPI.swift -authentikClient/Classes/OpenAPIs/APIs/Oauth2API.swift -authentikClient/Classes/OpenAPIs/APIs/OutpostsAPI.swift -authentikClient/Classes/OpenAPIs/APIs/PoliciesAPI.swift -authentikClient/Classes/OpenAPIs/APIs/PropertymappingsAPI.swift -authentikClient/Classes/OpenAPIs/APIs/ProvidersAPI.swift -authentikClient/Classes/OpenAPIs/APIs/RbacAPI.swift -authentikClient/Classes/OpenAPIs/APIs/RootAPI.swift -authentikClient/Classes/OpenAPIs/APIs/SchemaAPI.swift -authentikClient/Classes/OpenAPIs/APIs/SourcesAPI.swift -authentikClient/Classes/OpenAPIs/APIs/StagesAPI.swift -authentikClient/Classes/OpenAPIs/CodableHelper.swift -authentikClient/Classes/OpenAPIs/Configuration.swift -authentikClient/Classes/OpenAPIs/Extensions.swift -authentikClient/Classes/OpenAPIs/JSONDataEncoding.swift -authentikClient/Classes/OpenAPIs/JSONEncodingHelper.swift -authentikClient/Classes/OpenAPIs/Models.swift -authentikClient/Classes/OpenAPIs/Models/AccessDeniedChallenge.swift -authentikClient/Classes/OpenAPIs/Models/App.swift -authentikClient/Classes/OpenAPIs/Models/AppEnum.swift -authentikClient/Classes/OpenAPIs/Models/AppleChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AppleLoginChallenge.swift -authentikClient/Classes/OpenAPIs/Models/Application.swift -authentikClient/Classes/OpenAPIs/Models/ApplicationRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSession.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionGeoIp.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgent.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentDevice.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentOs.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentUserAgent.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticationEnum.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorAttachmentEnum.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageDeviceImportResponse.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStage.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallenge.swift -authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AutoSubmitChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/AutosubmitChallenge.swift -authentikClient/Classes/OpenAPIs/Models/BackendsEnum.swift -authentikClient/Classes/OpenAPIs/Models/BindingTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/BlueprintFile.swift -authentikClient/Classes/OpenAPIs/Models/BlueprintInstance.swift -authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceRequest.swift -authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceStatusEnum.swift -authentikClient/Classes/OpenAPIs/Models/Cache.swift -authentikClient/Classes/OpenAPIs/Models/CapabilitiesEnum.swift -authentikClient/Classes/OpenAPIs/Models/CaptchaChallenge.swift -authentikClient/Classes/OpenAPIs/Models/CaptchaChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/CaptchaStage.swift -authentikClient/Classes/OpenAPIs/Models/CaptchaStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/CertificateData.swift -authentikClient/Classes/OpenAPIs/Models/CertificateGenerationRequest.swift -authentikClient/Classes/OpenAPIs/Models/CertificateKeyPair.swift -authentikClient/Classes/OpenAPIs/Models/CertificateKeyPairRequest.swift -authentikClient/Classes/OpenAPIs/Models/ChallengeChoices.swift -authentikClient/Classes/OpenAPIs/Models/ChallengeTypes.swift -authentikClient/Classes/OpenAPIs/Models/ClientTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/Config.swift -authentikClient/Classes/OpenAPIs/Models/ConsentChallenge.swift -authentikClient/Classes/OpenAPIs/Models/ConsentChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/ConsentPermission.swift -authentikClient/Classes/OpenAPIs/Models/ConsentStage.swift -authentikClient/Classes/OpenAPIs/Models/ConsentStageModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/ConsentStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/ContextualFlowInfo.swift -authentikClient/Classes/OpenAPIs/Models/Coordinate.swift -authentikClient/Classes/OpenAPIs/Models/CurrentTenant.swift -authentikClient/Classes/OpenAPIs/Models/DeniedActionEnum.swift -authentikClient/Classes/OpenAPIs/Models/DenyStage.swift -authentikClient/Classes/OpenAPIs/Models/DenyStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/Device.swift -authentikClient/Classes/OpenAPIs/Models/DeviceChallenge.swift -authentikClient/Classes/OpenAPIs/Models/DeviceChallengeRequest.swift -authentikClient/Classes/OpenAPIs/Models/DeviceClassesEnum.swift -authentikClient/Classes/OpenAPIs/Models/DigestAlgorithmEnum.swift -authentikClient/Classes/OpenAPIs/Models/DigitsEnum.swift -authentikClient/Classes/OpenAPIs/Models/DockerServiceConnection.swift -authentikClient/Classes/OpenAPIs/Models/DockerServiceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/DummyChallenge.swift -authentikClient/Classes/OpenAPIs/Models/DummyChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/DummyPolicy.swift -authentikClient/Classes/OpenAPIs/Models/DummyPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/DummyStage.swift -authentikClient/Classes/OpenAPIs/Models/DummyStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/DuoDevice.swift -authentikClient/Classes/OpenAPIs/Models/DuoDeviceEnrollmentStatus.swift -authentikClient/Classes/OpenAPIs/Models/DuoDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/DuoResponseEnum.swift -authentikClient/Classes/OpenAPIs/Models/EmailChallenge.swift -authentikClient/Classes/OpenAPIs/Models/EmailChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/EmailStage.swift -authentikClient/Classes/OpenAPIs/Models/EmailStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/ErrorDetail.swift -authentikClient/Classes/OpenAPIs/Models/ErrorReportingConfig.swift -authentikClient/Classes/OpenAPIs/Models/Event.swift -authentikClient/Classes/OpenAPIs/Models/EventActions.swift -authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicy.swift -authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/EventRequest.swift -authentikClient/Classes/OpenAPIs/Models/EventTopPerUser.swift -authentikClient/Classes/OpenAPIs/Models/ExpiringBaseGrantModel.swift -authentikClient/Classes/OpenAPIs/Models/ExpressionPolicy.swift -authentikClient/Classes/OpenAPIs/Models/ExpressionPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/ExtraRoleObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/ExtraUserObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/FilePathRequest.swift -authentikClient/Classes/OpenAPIs/Models/Flow.swift -authentikClient/Classes/OpenAPIs/Models/FlowChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/FlowDesignationEnum.swift -authentikClient/Classes/OpenAPIs/Models/FlowDiagram.swift -authentikClient/Classes/OpenAPIs/Models/FlowErrorChallenge.swift -authentikClient/Classes/OpenAPIs/Models/FlowImportResult.swift -authentikClient/Classes/OpenAPIs/Models/FlowInspection.swift -authentikClient/Classes/OpenAPIs/Models/FlowInspectorPlan.swift -authentikClient/Classes/OpenAPIs/Models/FlowRequest.swift -authentikClient/Classes/OpenAPIs/Models/FlowSet.swift -authentikClient/Classes/OpenAPIs/Models/FlowSetRequest.swift -authentikClient/Classes/OpenAPIs/Models/FlowStageBinding.swift -authentikClient/Classes/OpenAPIs/Models/FlowStageBindingRequest.swift -authentikClient/Classes/OpenAPIs/Models/FooterLink.swift -authentikClient/Classes/OpenAPIs/Models/GenericError.swift -authentikClient/Classes/OpenAPIs/Models/Group.swift -authentikClient/Classes/OpenAPIs/Models/GroupMember.swift -authentikClient/Classes/OpenAPIs/Models/GroupMemberRequest.swift -authentikClient/Classes/OpenAPIs/Models/GroupRequest.swift -authentikClient/Classes/OpenAPIs/Models/IdentificationChallenge.swift -authentikClient/Classes/OpenAPIs/Models/IdentificationChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/IdentificationStage.swift -authentikClient/Classes/OpenAPIs/Models/IdentificationStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/InstallID.swift -authentikClient/Classes/OpenAPIs/Models/IntentEnum.swift -authentikClient/Classes/OpenAPIs/Models/InvalidResponseActionEnum.swift -authentikClient/Classes/OpenAPIs/Models/Invitation.swift -authentikClient/Classes/OpenAPIs/Models/InvitationRequest.swift -authentikClient/Classes/OpenAPIs/Models/InvitationStage.swift -authentikClient/Classes/OpenAPIs/Models/InvitationStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/IssuerModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnection.swift -authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/LDAPAPIAccessMode.swift -authentikClient/Classes/OpenAPIs/Models/LDAPDebug.swift -authentikClient/Classes/OpenAPIs/Models/LDAPOutpostConfig.swift -authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMapping.swift -authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/LDAPProvider.swift -authentikClient/Classes/OpenAPIs/Models/LDAPProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/LDAPSource.swift -authentikClient/Classes/OpenAPIs/Models/LDAPSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/LDAPSyncStatus.swift -authentikClient/Classes/OpenAPIs/Models/LayoutEnum.swift -authentikClient/Classes/OpenAPIs/Models/License.swift -authentikClient/Classes/OpenAPIs/Models/LicenseForecast.swift -authentikClient/Classes/OpenAPIs/Models/LicenseRequest.swift -authentikClient/Classes/OpenAPIs/Models/LicenseSummary.swift -authentikClient/Classes/OpenAPIs/Models/Link.swift -authentikClient/Classes/OpenAPIs/Models/LoginChallengeTypes.swift -authentikClient/Classes/OpenAPIs/Models/LoginMetrics.swift -authentikClient/Classes/OpenAPIs/Models/LoginSource.swift -authentikClient/Classes/OpenAPIs/Models/Metadata.swift -authentikClient/Classes/OpenAPIs/Models/ModelEnum.swift -authentikClient/Classes/OpenAPIs/Models/ModelRequest.swift -authentikClient/Classes/OpenAPIs/Models/NameIdPolicyEnum.swift -authentikClient/Classes/OpenAPIs/Models/NotConfiguredActionEnum.swift -authentikClient/Classes/OpenAPIs/Models/Notification.swift -authentikClient/Classes/OpenAPIs/Models/NotificationRequest.swift -authentikClient/Classes/OpenAPIs/Models/NotificationRule.swift -authentikClient/Classes/OpenAPIs/Models/NotificationRuleRequest.swift -authentikClient/Classes/OpenAPIs/Models/NotificationTransport.swift -authentikClient/Classes/OpenAPIs/Models/NotificationTransportModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/NotificationTransportRequest.swift -authentikClient/Classes/OpenAPIs/Models/NotificationTransportTest.swift -authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMapping.swift -authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/OAuth2Provider.swift -authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderSetupURLs.swift -authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallenge.swift -authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallenge.swift -authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/OAuthSource.swift -authentikClient/Classes/OpenAPIs/Models/OAuthSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/OpenIDConnectConfiguration.swift -authentikClient/Classes/OpenAPIs/Models/Outpost.swift -authentikClient/Classes/OpenAPIs/Models/OutpostDefaultConfig.swift -authentikClient/Classes/OpenAPIs/Models/OutpostHealth.swift -authentikClient/Classes/OpenAPIs/Models/OutpostRequest.swift -authentikClient/Classes/OpenAPIs/Models/OutpostTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticateWebAuthnStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatedSessionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorDuoStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorSMSStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorStaticStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorTOTPStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorValidateStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedBlueprintInstanceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedCaptchaStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedCertificateKeyPairList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedConsentStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedDenyStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedDockerServiceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedDummyPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedDummyStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedDuoDeviceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedEmailStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedEventList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedEventMatcherPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedExpiringBaseGrantModelList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedExpressionPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedExtraRoleObjectPermissionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedExtraUserObjectPermissionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedFlowList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedFlowStageBindingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedGroupList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedIdentificationStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedKubernetesServiceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPOutpostConfigList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPPropertyMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPSourceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedLicenseList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationRuleList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationTransportList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationWebhookMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedOAuth2ProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedOAuthSourceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedOutpostList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordExpiryPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPermissionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyBindingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPromptList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPromptStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedPropertyMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedProxyOutpostConfigList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedProxyProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusOutpostConfigList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedReputationList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedReputationPolicyList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedRoleAssignedObjectPermissionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedRoleList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLPropertyMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLSourceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMProviderList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSMSDeviceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedScopeMappingList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedServiceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedSourceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedStaticDeviceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedTOTPDeviceList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedTenantList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedTokenList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedTokenModelList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserAssignedObjectPermissionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserConsentList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserDeleteStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserLoginStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserLogoutStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserOAuthSourceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserSAMLSourceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserSourceConnectionList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedUserWriteStageList.swift -authentikClient/Classes/OpenAPIs/Models/PaginatedWebAuthnDeviceList.swift -authentikClient/Classes/OpenAPIs/Models/Pagination.swift -authentikClient/Classes/OpenAPIs/Models/PasswordChallenge.swift -authentikClient/Classes/OpenAPIs/Models/PasswordChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicy.swift -authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PasswordPolicy.swift -authentikClient/Classes/OpenAPIs/Models/PasswordPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PasswordStage.swift -authentikClient/Classes/OpenAPIs/Models/PasswordStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedApplicationRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticateWebAuthnStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorDuoStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorSMSStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorStaticStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorTOTPStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorValidateStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedBlueprintInstanceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedCaptchaStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedCertificateKeyPairRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedConsentStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedDenyStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedDockerServiceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedDummyPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedDummyStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedDuoDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedEmailStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedEventMatcherPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedEventRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedExpressionPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedFlowRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedFlowStageBindingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedGroupRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedIdentificationStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedInvitationRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedInvitationStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedKubernetesServiceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedLDAPPropertyMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedLDAPProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedLDAPSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedLicenseRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRuleRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedNotificationTransportRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedNotificationWebhookMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedOAuth2ProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedOAuthSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedOutpostRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPasswordExpiryPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPasswordPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPasswordStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPermissionAssignRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPolicyBindingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPromptRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedPromptStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedProxyProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedRadiusProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedReputationPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedRoleRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSAMLPropertyMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSAMLProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSAMLSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSCIMMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSCIMProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedSMSDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedScopeMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedStaticDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedTOTPDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedTenantRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedTokenRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserDeleteStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserLoginStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserLogoutStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserOAuthSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserSAMLSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedUserWriteStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PatchedWebAuthnDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/Permission.swift -authentikClient/Classes/OpenAPIs/Models/PermissionAssignRequest.swift -authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallenge.swift -authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/PlexSource.swift -authentikClient/Classes/OpenAPIs/Models/PlexSourceConnection.swift -authentikClient/Classes/OpenAPIs/Models/PlexSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/PlexSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/PlexTokenRedeemRequest.swift -authentikClient/Classes/OpenAPIs/Models/Policy.swift -authentikClient/Classes/OpenAPIs/Models/PolicyBinding.swift -authentikClient/Classes/OpenAPIs/Models/PolicyBindingRequest.swift -authentikClient/Classes/OpenAPIs/Models/PolicyEngineMode.swift -authentikClient/Classes/OpenAPIs/Models/PolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/PolicyTestRequest.swift -authentikClient/Classes/OpenAPIs/Models/PolicyTestResult.swift -authentikClient/Classes/OpenAPIs/Models/Prompt.swift -authentikClient/Classes/OpenAPIs/Models/PromptChallenge.swift -authentikClient/Classes/OpenAPIs/Models/PromptChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/PromptRequest.swift -authentikClient/Classes/OpenAPIs/Models/PromptStage.swift -authentikClient/Classes/OpenAPIs/Models/PromptStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/PromptTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/PropertyMapping.swift -authentikClient/Classes/OpenAPIs/Models/PropertyMappingPreview.swift -authentikClient/Classes/OpenAPIs/Models/PropertyMappingTestResult.swift -authentikClient/Classes/OpenAPIs/Models/Provider.swift -authentikClient/Classes/OpenAPIs/Models/ProviderEnum.swift -authentikClient/Classes/OpenAPIs/Models/ProviderModelEnum.swift -authentikClient/Classes/OpenAPIs/Models/ProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/ProviderTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/ProxyMode.swift -authentikClient/Classes/OpenAPIs/Models/ProxyOutpostConfig.swift -authentikClient/Classes/OpenAPIs/Models/ProxyProvider.swift -authentikClient/Classes/OpenAPIs/Models/ProxyProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/RadiusOutpostConfig.swift -authentikClient/Classes/OpenAPIs/Models/RadiusProvider.swift -authentikClient/Classes/OpenAPIs/Models/RadiusProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/RedirectChallenge.swift -authentikClient/Classes/OpenAPIs/Models/Reputation.swift -authentikClient/Classes/OpenAPIs/Models/ReputationPolicy.swift -authentikClient/Classes/OpenAPIs/Models/ReputationPolicyRequest.swift -authentikClient/Classes/OpenAPIs/Models/ResidentKeyRequirementEnum.swift -authentikClient/Classes/OpenAPIs/Models/Role.swift -authentikClient/Classes/OpenAPIs/Models/RoleAssignedObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/RoleObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/RoleRequest.swift -authentikClient/Classes/OpenAPIs/Models/SAMLMetadata.swift -authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMapping.swift -authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/SAMLProvider.swift -authentikClient/Classes/OpenAPIs/Models/SAMLProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/SAMLSource.swift -authentikClient/Classes/OpenAPIs/Models/SAMLSourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/SCIMMapping.swift -authentikClient/Classes/OpenAPIs/Models/SCIMMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/SCIMProvider.swift -authentikClient/Classes/OpenAPIs/Models/SCIMProviderRequest.swift -authentikClient/Classes/OpenAPIs/Models/SMSDevice.swift -authentikClient/Classes/OpenAPIs/Models/SMSDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/ScopeMapping.swift -authentikClient/Classes/OpenAPIs/Models/ScopeMappingRequest.swift -authentikClient/Classes/OpenAPIs/Models/SelectableStage.swift -authentikClient/Classes/OpenAPIs/Models/ServiceConnection.swift -authentikClient/Classes/OpenAPIs/Models/ServiceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/ServiceConnectionState.swift -authentikClient/Classes/OpenAPIs/Models/SessionUser.swift -authentikClient/Classes/OpenAPIs/Models/SeverityEnum.swift -authentikClient/Classes/OpenAPIs/Models/ShellChallenge.swift -authentikClient/Classes/OpenAPIs/Models/SignatureAlgorithmEnum.swift -authentikClient/Classes/OpenAPIs/Models/Source.swift -authentikClient/Classes/OpenAPIs/Models/SourceRequest.swift -authentikClient/Classes/OpenAPIs/Models/SourceType.swift -authentikClient/Classes/OpenAPIs/Models/SpBindingEnum.swift -authentikClient/Classes/OpenAPIs/Models/Stage.swift -authentikClient/Classes/OpenAPIs/Models/StagePrompt.swift -authentikClient/Classes/OpenAPIs/Models/StageRequest.swift -authentikClient/Classes/OpenAPIs/Models/StaticDevice.swift -authentikClient/Classes/OpenAPIs/Models/StaticDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/StaticDeviceToken.swift -authentikClient/Classes/OpenAPIs/Models/StaticDeviceTokenRequest.swift -authentikClient/Classes/OpenAPIs/Models/SubModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/SystemInfo.swift -authentikClient/Classes/OpenAPIs/Models/SystemInfoRuntime.swift -authentikClient/Classes/OpenAPIs/Models/TOTPDevice.swift -authentikClient/Classes/OpenAPIs/Models/TOTPDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/Task.swift -authentikClient/Classes/OpenAPIs/Models/TaskStatusEnum.swift -authentikClient/Classes/OpenAPIs/Models/Tenant.swift -authentikClient/Classes/OpenAPIs/Models/TenantRequest.swift -authentikClient/Classes/OpenAPIs/Models/Token.swift -authentikClient/Classes/OpenAPIs/Models/TokenModel.swift -authentikClient/Classes/OpenAPIs/Models/TokenRequest.swift -authentikClient/Classes/OpenAPIs/Models/TokenSetKeyRequest.swift -authentikClient/Classes/OpenAPIs/Models/TokenView.swift -authentikClient/Classes/OpenAPIs/Models/TransactionApplicationRequest.swift -authentikClient/Classes/OpenAPIs/Models/TransactionApplicationResponse.swift -authentikClient/Classes/OpenAPIs/Models/TypeCreate.swift -authentikClient/Classes/OpenAPIs/Models/UiThemeEnum.swift -authentikClient/Classes/OpenAPIs/Models/UsedBy.swift -authentikClient/Classes/OpenAPIs/Models/UsedByActionEnum.swift -authentikClient/Classes/OpenAPIs/Models/User.swift -authentikClient/Classes/OpenAPIs/Models/UserAccountRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserAssignedObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/UserConsent.swift -authentikClient/Classes/OpenAPIs/Models/UserCreationModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/UserDeleteStage.swift -authentikClient/Classes/OpenAPIs/Models/UserDeleteStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserFieldsEnum.swift -authentikClient/Classes/OpenAPIs/Models/UserGroup.swift -authentikClient/Classes/OpenAPIs/Models/UserGroupRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserLoginChallenge.swift -authentikClient/Classes/OpenAPIs/Models/UserLoginChallengeResponseRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserLoginStage.swift -authentikClient/Classes/OpenAPIs/Models/UserLoginStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserLogoutStage.swift -authentikClient/Classes/OpenAPIs/Models/UserLogoutStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserMatchingModeEnum.swift -authentikClient/Classes/OpenAPIs/Models/UserMetrics.swift -authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnection.swift -authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserObjectPermission.swift -authentikClient/Classes/OpenAPIs/Models/UserPasswordSetRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserPath.swift -authentikClient/Classes/OpenAPIs/Models/UserRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnection.swift -authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnectionRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserSelf.swift -authentikClient/Classes/OpenAPIs/Models/UserSelfGroups.swift -authentikClient/Classes/OpenAPIs/Models/UserServiceAccountRequest.swift -authentikClient/Classes/OpenAPIs/Models/UserServiceAccountResponse.swift -authentikClient/Classes/OpenAPIs/Models/UserSetting.swift -authentikClient/Classes/OpenAPIs/Models/UserSourceConnection.swift -authentikClient/Classes/OpenAPIs/Models/UserTypeEnum.swift -authentikClient/Classes/OpenAPIs/Models/UserVerificationEnum.swift -authentikClient/Classes/OpenAPIs/Models/UserWriteStage.swift -authentikClient/Classes/OpenAPIs/Models/UserWriteStageRequest.swift -authentikClient/Classes/OpenAPIs/Models/ValidationError.swift -authentikClient/Classes/OpenAPIs/Models/Version.swift -authentikClient/Classes/OpenAPIs/Models/WebAuthnDevice.swift -authentikClient/Classes/OpenAPIs/Models/WebAuthnDeviceRequest.swift -authentikClient/Classes/OpenAPIs/Models/Workers.swift -authentikClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift -authentikClient/Classes/OpenAPIs/SynchronizedDictionary.swift -authentikClient/Classes/OpenAPIs/URLSessionImplementations.swift -docs/AccessDeniedChallenge.md -docs/AdminAPI.md -docs/App.md -docs/AppEnum.md -docs/AppleChallengeResponseRequest.md -docs/AppleLoginChallenge.md -docs/Application.md -docs/ApplicationRequest.md -docs/AuthTypeEnum.md -docs/AuthenticateWebAuthnStage.md -docs/AuthenticateWebAuthnStageRequest.md -docs/AuthenticatedSession.md -docs/AuthenticatedSessionGeoIp.md -docs/AuthenticatedSessionUserAgent.md -docs/AuthenticatedSessionUserAgentDevice.md -docs/AuthenticatedSessionUserAgentOs.md -docs/AuthenticatedSessionUserAgentUserAgent.md -docs/AuthenticationEnum.md -docs/AuthenticatorAttachmentEnum.md -docs/AuthenticatorDuoChallenge.md -docs/AuthenticatorDuoChallengeResponseRequest.md -docs/AuthenticatorDuoStage.md -docs/AuthenticatorDuoStageDeviceImportResponse.md -docs/AuthenticatorDuoStageManualDeviceImportRequest.md -docs/AuthenticatorDuoStageRequest.md -docs/AuthenticatorSMSChallenge.md -docs/AuthenticatorSMSChallengeResponseRequest.md -docs/AuthenticatorSMSStage.md -docs/AuthenticatorSMSStageRequest.md -docs/AuthenticatorStaticChallenge.md -docs/AuthenticatorStaticChallengeResponseRequest.md -docs/AuthenticatorStaticStage.md -docs/AuthenticatorStaticStageRequest.md -docs/AuthenticatorTOTPChallenge.md -docs/AuthenticatorTOTPChallengeResponseRequest.md -docs/AuthenticatorTOTPStage.md -docs/AuthenticatorTOTPStageRequest.md -docs/AuthenticatorValidateStage.md -docs/AuthenticatorValidateStageRequest.md -docs/AuthenticatorValidationChallenge.md -docs/AuthenticatorValidationChallengeResponseRequest.md -docs/AuthenticatorWebAuthnChallenge.md -docs/AuthenticatorWebAuthnChallengeResponseRequest.md -docs/AuthenticatorsAPI.md -docs/AutoSubmitChallengeResponseRequest.md -docs/AutosubmitChallenge.md -docs/BackendsEnum.md -docs/BindingTypeEnum.md -docs/BlueprintFile.md -docs/BlueprintInstance.md -docs/BlueprintInstanceRequest.md -docs/BlueprintInstanceStatusEnum.md -docs/Cache.md -docs/CapabilitiesEnum.md -docs/CaptchaChallenge.md -docs/CaptchaChallengeResponseRequest.md -docs/CaptchaStage.md -docs/CaptchaStageRequest.md -docs/CertificateData.md -docs/CertificateGenerationRequest.md -docs/CertificateKeyPair.md -docs/CertificateKeyPairRequest.md -docs/ChallengeChoices.md -docs/ChallengeTypes.md -docs/ClientTypeEnum.md -docs/Config.md -docs/ConsentChallenge.md -docs/ConsentChallengeResponseRequest.md -docs/ConsentPermission.md -docs/ConsentStage.md -docs/ConsentStageModeEnum.md -docs/ConsentStageRequest.md -docs/ContextualFlowInfo.md -docs/Coordinate.md -docs/CoreAPI.md -docs/CryptoAPI.md -docs/CurrentTenant.md -docs/DeniedActionEnum.md -docs/DenyStage.md -docs/DenyStageRequest.md -docs/Device.md -docs/DeviceChallenge.md -docs/DeviceChallengeRequest.md -docs/DeviceClassesEnum.md -docs/DigestAlgorithmEnum.md -docs/DigitsEnum.md -docs/DockerServiceConnection.md -docs/DockerServiceConnectionRequest.md -docs/DummyChallenge.md -docs/DummyChallengeResponseRequest.md -docs/DummyPolicy.md -docs/DummyPolicyRequest.md -docs/DummyStage.md -docs/DummyStageRequest.md -docs/DuoDevice.md -docs/DuoDeviceEnrollmentStatus.md -docs/DuoDeviceRequest.md -docs/DuoResponseEnum.md -docs/EmailChallenge.md -docs/EmailChallengeResponseRequest.md -docs/EmailStage.md -docs/EmailStageRequest.md -docs/EnterpriseAPI.md -docs/ErrorDetail.md -docs/ErrorReportingConfig.md -docs/Event.md -docs/EventActions.md -docs/EventMatcherPolicy.md -docs/EventMatcherPolicyRequest.md -docs/EventRequest.md -docs/EventTopPerUser.md -docs/EventsAPI.md -docs/ExpiringBaseGrantModel.md -docs/ExpressionPolicy.md -docs/ExpressionPolicyRequest.md -docs/ExtraRoleObjectPermission.md -docs/ExtraUserObjectPermission.md -docs/FilePathRequest.md -docs/Flow.md -docs/FlowChallengeResponseRequest.md -docs/FlowDesignationEnum.md -docs/FlowDiagram.md -docs/FlowErrorChallenge.md -docs/FlowImportResult.md -docs/FlowInspection.md -docs/FlowInspectorPlan.md -docs/FlowRequest.md -docs/FlowSet.md -docs/FlowSetRequest.md -docs/FlowStageBinding.md -docs/FlowStageBindingRequest.md -docs/FlowsAPI.md -docs/FooterLink.md -docs/GenericError.md -docs/Group.md -docs/GroupMember.md -docs/GroupMemberRequest.md -docs/GroupRequest.md -docs/IdentificationChallenge.md -docs/IdentificationChallengeResponseRequest.md -docs/IdentificationStage.md -docs/IdentificationStageRequest.md -docs/InstallID.md -docs/IntentEnum.md -docs/InvalidResponseActionEnum.md -docs/Invitation.md -docs/InvitationRequest.md -docs/InvitationStage.md -docs/InvitationStageRequest.md -docs/IssuerModeEnum.md -docs/KubernetesServiceConnection.md -docs/KubernetesServiceConnectionRequest.md -docs/LDAPAPIAccessMode.md -docs/LDAPDebug.md -docs/LDAPOutpostConfig.md -docs/LDAPPropertyMapping.md -docs/LDAPPropertyMappingRequest.md -docs/LDAPProvider.md -docs/LDAPProviderRequest.md -docs/LDAPSource.md -docs/LDAPSourceRequest.md -docs/LDAPSyncStatus.md -docs/LayoutEnum.md -docs/License.md -docs/LicenseForecast.md -docs/LicenseRequest.md -docs/LicenseSummary.md -docs/Link.md -docs/LoginChallengeTypes.md -docs/LoginMetrics.md -docs/LoginSource.md -docs/ManagedAPI.md -docs/Metadata.md -docs/ModelEnum.md -docs/ModelRequest.md -docs/NameIdPolicyEnum.md -docs/NotConfiguredActionEnum.md -docs/Notification.md -docs/NotificationRequest.md -docs/NotificationRule.md -docs/NotificationRuleRequest.md -docs/NotificationTransport.md -docs/NotificationTransportModeEnum.md -docs/NotificationTransportRequest.md -docs/NotificationTransportTest.md -docs/NotificationWebhookMapping.md -docs/NotificationWebhookMappingRequest.md -docs/OAuth2Provider.md -docs/OAuth2ProviderRequest.md -docs/OAuth2ProviderSetupURLs.md -docs/OAuthDeviceCodeChallenge.md -docs/OAuthDeviceCodeChallengeResponseRequest.md -docs/OAuthDeviceCodeFinishChallenge.md -docs/OAuthDeviceCodeFinishChallengeResponseRequest.md -docs/OAuthSource.md -docs/OAuthSourceRequest.md -docs/Oauth2API.md -docs/OpenIDConnectConfiguration.md -docs/Outpost.md -docs/OutpostDefaultConfig.md -docs/OutpostHealth.md -docs/OutpostRequest.md -docs/OutpostTypeEnum.md -docs/OutpostsAPI.md -docs/PaginatedApplicationList.md -docs/PaginatedAuthenticateWebAuthnStageList.md -docs/PaginatedAuthenticatedSessionList.md -docs/PaginatedAuthenticatorDuoStageList.md -docs/PaginatedAuthenticatorSMSStageList.md -docs/PaginatedAuthenticatorStaticStageList.md -docs/PaginatedAuthenticatorTOTPStageList.md -docs/PaginatedAuthenticatorValidateStageList.md -docs/PaginatedBlueprintInstanceList.md -docs/PaginatedCaptchaStageList.md -docs/PaginatedCertificateKeyPairList.md -docs/PaginatedConsentStageList.md -docs/PaginatedDenyStageList.md -docs/PaginatedDockerServiceConnectionList.md -docs/PaginatedDummyPolicyList.md -docs/PaginatedDummyStageList.md -docs/PaginatedDuoDeviceList.md -docs/PaginatedEmailStageList.md -docs/PaginatedEventList.md -docs/PaginatedEventMatcherPolicyList.md -docs/PaginatedExpiringBaseGrantModelList.md -docs/PaginatedExpressionPolicyList.md -docs/PaginatedExtraRoleObjectPermissionList.md -docs/PaginatedExtraUserObjectPermissionList.md -docs/PaginatedFlowList.md -docs/PaginatedFlowStageBindingList.md -docs/PaginatedGroupList.md -docs/PaginatedIdentificationStageList.md -docs/PaginatedInvitationList.md -docs/PaginatedInvitationStageList.md -docs/PaginatedKubernetesServiceConnectionList.md -docs/PaginatedLDAPOutpostConfigList.md -docs/PaginatedLDAPPropertyMappingList.md -docs/PaginatedLDAPProviderList.md -docs/PaginatedLDAPSourceList.md -docs/PaginatedLicenseList.md -docs/PaginatedNotificationList.md -docs/PaginatedNotificationRuleList.md -docs/PaginatedNotificationTransportList.md -docs/PaginatedNotificationWebhookMappingList.md -docs/PaginatedOAuth2ProviderList.md -docs/PaginatedOAuthSourceList.md -docs/PaginatedOutpostList.md -docs/PaginatedPasswordExpiryPolicyList.md -docs/PaginatedPasswordPolicyList.md -docs/PaginatedPasswordStageList.md -docs/PaginatedPermissionList.md -docs/PaginatedPlexSourceConnectionList.md -docs/PaginatedPlexSourceList.md -docs/PaginatedPolicyBindingList.md -docs/PaginatedPolicyList.md -docs/PaginatedPromptList.md -docs/PaginatedPromptStageList.md -docs/PaginatedPropertyMappingList.md -docs/PaginatedProviderList.md -docs/PaginatedProxyOutpostConfigList.md -docs/PaginatedProxyProviderList.md -docs/PaginatedRadiusOutpostConfigList.md -docs/PaginatedRadiusProviderList.md -docs/PaginatedReputationList.md -docs/PaginatedReputationPolicyList.md -docs/PaginatedRoleAssignedObjectPermissionList.md -docs/PaginatedRoleList.md -docs/PaginatedSAMLPropertyMappingList.md -docs/PaginatedSAMLProviderList.md -docs/PaginatedSAMLSourceList.md -docs/PaginatedSCIMMappingList.md -docs/PaginatedSCIMProviderList.md -docs/PaginatedSMSDeviceList.md -docs/PaginatedScopeMappingList.md -docs/PaginatedServiceConnectionList.md -docs/PaginatedSourceList.md -docs/PaginatedStageList.md -docs/PaginatedStaticDeviceList.md -docs/PaginatedTOTPDeviceList.md -docs/PaginatedTenantList.md -docs/PaginatedTokenList.md -docs/PaginatedTokenModelList.md -docs/PaginatedUserAssignedObjectPermissionList.md -docs/PaginatedUserConsentList.md -docs/PaginatedUserDeleteStageList.md -docs/PaginatedUserList.md -docs/PaginatedUserLoginStageList.md -docs/PaginatedUserLogoutStageList.md -docs/PaginatedUserOAuthSourceConnectionList.md -docs/PaginatedUserSAMLSourceConnectionList.md -docs/PaginatedUserSourceConnectionList.md -docs/PaginatedUserWriteStageList.md -docs/PaginatedWebAuthnDeviceList.md -docs/Pagination.md -docs/PasswordChallenge.md -docs/PasswordChallengeResponseRequest.md -docs/PasswordExpiryPolicy.md -docs/PasswordExpiryPolicyRequest.md -docs/PasswordPolicy.md -docs/PasswordPolicyRequest.md -docs/PasswordStage.md -docs/PasswordStageRequest.md -docs/PatchedApplicationRequest.md -docs/PatchedAuthenticateWebAuthnStageRequest.md -docs/PatchedAuthenticatorDuoStageRequest.md -docs/PatchedAuthenticatorSMSStageRequest.md -docs/PatchedAuthenticatorStaticStageRequest.md -docs/PatchedAuthenticatorTOTPStageRequest.md -docs/PatchedAuthenticatorValidateStageRequest.md -docs/PatchedBlueprintInstanceRequest.md -docs/PatchedCaptchaStageRequest.md -docs/PatchedCertificateKeyPairRequest.md -docs/PatchedConsentStageRequest.md -docs/PatchedDenyStageRequest.md -docs/PatchedDockerServiceConnectionRequest.md -docs/PatchedDummyPolicyRequest.md -docs/PatchedDummyStageRequest.md -docs/PatchedDuoDeviceRequest.md -docs/PatchedEmailStageRequest.md -docs/PatchedEventMatcherPolicyRequest.md -docs/PatchedEventRequest.md -docs/PatchedExpressionPolicyRequest.md -docs/PatchedFlowRequest.md -docs/PatchedFlowStageBindingRequest.md -docs/PatchedGroupRequest.md -docs/PatchedIdentificationStageRequest.md -docs/PatchedInvitationRequest.md -docs/PatchedInvitationStageRequest.md -docs/PatchedKubernetesServiceConnectionRequest.md -docs/PatchedLDAPPropertyMappingRequest.md -docs/PatchedLDAPProviderRequest.md -docs/PatchedLDAPSourceRequest.md -docs/PatchedLicenseRequest.md -docs/PatchedNotificationRequest.md -docs/PatchedNotificationRuleRequest.md -docs/PatchedNotificationTransportRequest.md -docs/PatchedNotificationWebhookMappingRequest.md -docs/PatchedOAuth2ProviderRequest.md -docs/PatchedOAuthSourceRequest.md -docs/PatchedOutpostRequest.md -docs/PatchedPasswordExpiryPolicyRequest.md -docs/PatchedPasswordPolicyRequest.md -docs/PatchedPasswordStageRequest.md -docs/PatchedPermissionAssignRequest.md -docs/PatchedPlexSourceConnectionRequest.md -docs/PatchedPlexSourceRequest.md -docs/PatchedPolicyBindingRequest.md -docs/PatchedPromptRequest.md -docs/PatchedPromptStageRequest.md -docs/PatchedProxyProviderRequest.md -docs/PatchedRadiusProviderRequest.md -docs/PatchedReputationPolicyRequest.md -docs/PatchedRoleRequest.md -docs/PatchedSAMLPropertyMappingRequest.md -docs/PatchedSAMLProviderRequest.md -docs/PatchedSAMLSourceRequest.md -docs/PatchedSCIMMappingRequest.md -docs/PatchedSCIMProviderRequest.md -docs/PatchedSMSDeviceRequest.md -docs/PatchedScopeMappingRequest.md -docs/PatchedStaticDeviceRequest.md -docs/PatchedTOTPDeviceRequest.md -docs/PatchedTenantRequest.md -docs/PatchedTokenRequest.md -docs/PatchedUserDeleteStageRequest.md -docs/PatchedUserLoginStageRequest.md -docs/PatchedUserLogoutStageRequest.md -docs/PatchedUserOAuthSourceConnectionRequest.md -docs/PatchedUserRequest.md -docs/PatchedUserSAMLSourceConnectionRequest.md -docs/PatchedUserWriteStageRequest.md -docs/PatchedWebAuthnDeviceRequest.md -docs/Permission.md -docs/PermissionAssignRequest.md -docs/PlexAuthenticationChallenge.md -docs/PlexAuthenticationChallengeResponseRequest.md -docs/PlexSource.md -docs/PlexSourceConnection.md -docs/PlexSourceConnectionRequest.md -docs/PlexSourceRequest.md -docs/PlexTokenRedeemRequest.md -docs/PoliciesAPI.md -docs/Policy.md -docs/PolicyBinding.md -docs/PolicyBindingRequest.md -docs/PolicyEngineMode.md -docs/PolicyRequest.md -docs/PolicyTestRequest.md -docs/PolicyTestResult.md -docs/Prompt.md -docs/PromptChallenge.md -docs/PromptChallengeResponseRequest.md -docs/PromptRequest.md -docs/PromptStage.md -docs/PromptStageRequest.md -docs/PromptTypeEnum.md -docs/PropertyMapping.md -docs/PropertyMappingPreview.md -docs/PropertyMappingTestResult.md -docs/PropertymappingsAPI.md -docs/Provider.md -docs/ProviderEnum.md -docs/ProviderModelEnum.md -docs/ProviderRequest.md -docs/ProviderTypeEnum.md -docs/ProvidersAPI.md -docs/ProxyMode.md -docs/ProxyOutpostConfig.md -docs/ProxyProvider.md -docs/ProxyProviderRequest.md -docs/RadiusOutpostConfig.md -docs/RadiusProvider.md -docs/RadiusProviderRequest.md -docs/RbacAPI.md -docs/RedirectChallenge.md -docs/Reputation.md -docs/ReputationPolicy.md -docs/ReputationPolicyRequest.md -docs/ResidentKeyRequirementEnum.md -docs/Role.md -docs/RoleAssignedObjectPermission.md -docs/RoleObjectPermission.md -docs/RoleRequest.md -docs/RootAPI.md -docs/SAMLMetadata.md -docs/SAMLPropertyMapping.md -docs/SAMLPropertyMappingRequest.md -docs/SAMLProvider.md -docs/SAMLProviderRequest.md -docs/SAMLSource.md -docs/SAMLSourceRequest.md -docs/SCIMMapping.md -docs/SCIMMappingRequest.md -docs/SCIMProvider.md -docs/SCIMProviderRequest.md -docs/SMSDevice.md -docs/SMSDeviceRequest.md -docs/SchemaAPI.md -docs/ScopeMapping.md -docs/ScopeMappingRequest.md -docs/SelectableStage.md -docs/ServiceConnection.md -docs/ServiceConnectionRequest.md -docs/ServiceConnectionState.md -docs/SessionUser.md -docs/SeverityEnum.md -docs/ShellChallenge.md -docs/SignatureAlgorithmEnum.md -docs/Source.md -docs/SourceRequest.md -docs/SourceType.md -docs/SourcesAPI.md -docs/SpBindingEnum.md -docs/Stage.md -docs/StagePrompt.md -docs/StageRequest.md -docs/StagesAPI.md -docs/StaticDevice.md -docs/StaticDeviceRequest.md -docs/StaticDeviceToken.md -docs/StaticDeviceTokenRequest.md -docs/SubModeEnum.md -docs/SystemInfo.md -docs/SystemInfoRuntime.md -docs/TOTPDevice.md -docs/TOTPDeviceRequest.md -docs/Task.md -docs/TaskStatusEnum.md -docs/Tenant.md -docs/TenantRequest.md -docs/Token.md -docs/TokenModel.md -docs/TokenRequest.md -docs/TokenSetKeyRequest.md -docs/TokenView.md -docs/TransactionApplicationRequest.md -docs/TransactionApplicationResponse.md -docs/TypeCreate.md -docs/UiThemeEnum.md -docs/UsedBy.md -docs/UsedByActionEnum.md -docs/User.md -docs/UserAccountRequest.md -docs/UserAssignedObjectPermission.md -docs/UserConsent.md -docs/UserCreationModeEnum.md -docs/UserDeleteStage.md -docs/UserDeleteStageRequest.md -docs/UserFieldsEnum.md -docs/UserGroup.md -docs/UserGroupRequest.md -docs/UserLoginChallenge.md -docs/UserLoginChallengeResponseRequest.md -docs/UserLoginStage.md -docs/UserLoginStageRequest.md -docs/UserLogoutStage.md -docs/UserLogoutStageRequest.md -docs/UserMatchingModeEnum.md -docs/UserMetrics.md -docs/UserOAuthSourceConnection.md -docs/UserOAuthSourceConnectionRequest.md -docs/UserObjectPermission.md -docs/UserPasswordSetRequest.md -docs/UserPath.md -docs/UserRequest.md -docs/UserSAMLSourceConnection.md -docs/UserSAMLSourceConnectionRequest.md -docs/UserSelf.md -docs/UserSelfGroups.md -docs/UserServiceAccountRequest.md -docs/UserServiceAccountResponse.md -docs/UserSetting.md -docs/UserSourceConnection.md -docs/UserTypeEnum.md -docs/UserVerificationEnum.md -docs/UserWriteStage.md -docs/UserWriteStageRequest.md -docs/ValidationError.md -docs/Version.md -docs/WebAuthnDevice.md -docs/WebAuthnDeviceRequest.md -docs/Workers.md -git_push.sh -project.yml +authentikClient/Package.swift +authentikClient/Sources/APIs/AdminAPI.swift +authentikClient/Sources/APIs/AuthenticatorsAPI.swift +authentikClient/Sources/APIs/CoreAPI.swift +authentikClient/Sources/APIs/CryptoAPI.swift +authentikClient/Sources/APIs/EnterpriseAPI.swift +authentikClient/Sources/APIs/EventsAPI.swift +authentikClient/Sources/APIs/FlowsAPI.swift +authentikClient/Sources/APIs/ManagedAPI.swift +authentikClient/Sources/APIs/Oauth2API.swift +authentikClient/Sources/APIs/OutpostsAPI.swift +authentikClient/Sources/APIs/PoliciesAPI.swift +authentikClient/Sources/APIs/PropertymappingsAPI.swift +authentikClient/Sources/APIs/ProvidersAPI.swift +authentikClient/Sources/APIs/RbacAPI.swift +authentikClient/Sources/APIs/RootAPI.swift +authentikClient/Sources/APIs/SchemaAPI.swift +authentikClient/Sources/APIs/SourcesAPI.swift +authentikClient/Sources/APIs/StagesAPI.swift +authentikClient/Sources/Models/AccessDeniedChallenge.swift +authentikClient/Sources/Models/App.swift +authentikClient/Sources/Models/AppEnum.swift +authentikClient/Sources/Models/AppleChallengeResponseRequest.swift +authentikClient/Sources/Models/AppleLoginChallenge.swift +authentikClient/Sources/Models/Application.swift +authentikClient/Sources/Models/ApplicationRequest.swift +authentikClient/Sources/Models/AuthTypeEnum.swift +authentikClient/Sources/Models/AuthenticateWebAuthnStage.swift +authentikClient/Sources/Models/AuthenticateWebAuthnStageRequest.swift +authentikClient/Sources/Models/AuthenticatedSession.swift +authentikClient/Sources/Models/AuthenticatedSessionGeoIp.swift +authentikClient/Sources/Models/AuthenticatedSessionUserAgent.swift +authentikClient/Sources/Models/AuthenticatedSessionUserAgentDevice.swift +authentikClient/Sources/Models/AuthenticatedSessionUserAgentOs.swift +authentikClient/Sources/Models/AuthenticatedSessionUserAgentUserAgent.swift +authentikClient/Sources/Models/AuthenticationEnum.swift +authentikClient/Sources/Models/AuthenticatorAttachmentEnum.swift +authentikClient/Sources/Models/AuthenticatorDuoChallenge.swift +authentikClient/Sources/Models/AuthenticatorDuoChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorDuoStage.swift +authentikClient/Sources/Models/AuthenticatorDuoStageDeviceImportResponse.swift +authentikClient/Sources/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift +authentikClient/Sources/Models/AuthenticatorDuoStageRequest.swift +authentikClient/Sources/Models/AuthenticatorMobileChallenge.swift +authentikClient/Sources/Models/AuthenticatorMobileChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorMobilePayloadChallenge.swift +authentikClient/Sources/Models/AuthenticatorMobileStage.swift +authentikClient/Sources/Models/AuthenticatorMobileStageRequest.swift +authentikClient/Sources/Models/AuthenticatorSMSChallenge.swift +authentikClient/Sources/Models/AuthenticatorSMSChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorSMSStage.swift +authentikClient/Sources/Models/AuthenticatorSMSStageRequest.swift +authentikClient/Sources/Models/AuthenticatorStaticChallenge.swift +authentikClient/Sources/Models/AuthenticatorStaticChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorStaticStage.swift +authentikClient/Sources/Models/AuthenticatorStaticStageRequest.swift +authentikClient/Sources/Models/AuthenticatorTOTPChallenge.swift +authentikClient/Sources/Models/AuthenticatorTOTPChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorTOTPStage.swift +authentikClient/Sources/Models/AuthenticatorTOTPStageRequest.swift +authentikClient/Sources/Models/AuthenticatorValidateStage.swift +authentikClient/Sources/Models/AuthenticatorValidateStageRequest.swift +authentikClient/Sources/Models/AuthenticatorValidationChallenge.swift +authentikClient/Sources/Models/AuthenticatorValidationChallengeResponseRequest.swift +authentikClient/Sources/Models/AuthenticatorWebAuthnChallenge.swift +authentikClient/Sources/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift +authentikClient/Sources/Models/AutoSubmitChallengeResponseRequest.swift +authentikClient/Sources/Models/AutosubmitChallenge.swift +authentikClient/Sources/Models/BackendsEnum.swift +authentikClient/Sources/Models/BindingTypeEnum.swift +authentikClient/Sources/Models/BlueprintFile.swift +authentikClient/Sources/Models/BlueprintInstance.swift +authentikClient/Sources/Models/BlueprintInstanceRequest.swift +authentikClient/Sources/Models/BlueprintInstanceStatusEnum.swift +authentikClient/Sources/Models/Cache.swift +authentikClient/Sources/Models/CapabilitiesEnum.swift +authentikClient/Sources/Models/CaptchaChallenge.swift +authentikClient/Sources/Models/CaptchaChallengeResponseRequest.swift +authentikClient/Sources/Models/CaptchaStage.swift +authentikClient/Sources/Models/CaptchaStageRequest.swift +authentikClient/Sources/Models/CertificateData.swift +authentikClient/Sources/Models/CertificateGenerationRequest.swift +authentikClient/Sources/Models/CertificateKeyPair.swift +authentikClient/Sources/Models/CertificateKeyPairRequest.swift +authentikClient/Sources/Models/ChallengeChoices.swift +authentikClient/Sources/Models/ChallengeTypes.swift +authentikClient/Sources/Models/ClientTypeEnum.swift +authentikClient/Sources/Models/Config.swift +authentikClient/Sources/Models/ConsentChallenge.swift +authentikClient/Sources/Models/ConsentChallengeResponseRequest.swift +authentikClient/Sources/Models/ConsentPermission.swift +authentikClient/Sources/Models/ConsentStage.swift +authentikClient/Sources/Models/ConsentStageModeEnum.swift +authentikClient/Sources/Models/ConsentStageRequest.swift +authentikClient/Sources/Models/ContextualFlowInfo.swift +authentikClient/Sources/Models/Coordinate.swift +authentikClient/Sources/Models/CurrentTenant.swift +authentikClient/Sources/Models/DeniedActionEnum.swift +authentikClient/Sources/Models/DenyStage.swift +authentikClient/Sources/Models/DenyStageRequest.swift +authentikClient/Sources/Models/Device.swift +authentikClient/Sources/Models/DeviceChallenge.swift +authentikClient/Sources/Models/DeviceChallengeRequest.swift +authentikClient/Sources/Models/DeviceClassesEnum.swift +authentikClient/Sources/Models/DigestAlgorithmEnum.swift +authentikClient/Sources/Models/DigitsEnum.swift +authentikClient/Sources/Models/DockerServiceConnection.swift +authentikClient/Sources/Models/DockerServiceConnectionRequest.swift +authentikClient/Sources/Models/DummyChallenge.swift +authentikClient/Sources/Models/DummyChallengeResponseRequest.swift +authentikClient/Sources/Models/DummyPolicy.swift +authentikClient/Sources/Models/DummyPolicyRequest.swift +authentikClient/Sources/Models/DummyStage.swift +authentikClient/Sources/Models/DummyStageRequest.swift +authentikClient/Sources/Models/DuoDevice.swift +authentikClient/Sources/Models/DuoDeviceEnrollmentStatus.swift +authentikClient/Sources/Models/DuoDeviceRequest.swift +authentikClient/Sources/Models/DuoResponseEnum.swift +authentikClient/Sources/Models/EmailChallenge.swift +authentikClient/Sources/Models/EmailChallengeResponseRequest.swift +authentikClient/Sources/Models/EmailStage.swift +authentikClient/Sources/Models/EmailStageRequest.swift +authentikClient/Sources/Models/ErrorDetail.swift +authentikClient/Sources/Models/ErrorReportingConfig.swift +authentikClient/Sources/Models/Event.swift +authentikClient/Sources/Models/EventActions.swift +authentikClient/Sources/Models/EventMatcherPolicy.swift +authentikClient/Sources/Models/EventMatcherPolicyRequest.swift +authentikClient/Sources/Models/EventRequest.swift +authentikClient/Sources/Models/EventTopPerUser.swift +authentikClient/Sources/Models/ExpiringBaseGrantModel.swift +authentikClient/Sources/Models/ExpressionPolicy.swift +authentikClient/Sources/Models/ExpressionPolicyRequest.swift +authentikClient/Sources/Models/ExtraRoleObjectPermission.swift +authentikClient/Sources/Models/ExtraUserObjectPermission.swift +authentikClient/Sources/Models/FilePathRequest.swift +authentikClient/Sources/Models/Flow.swift +authentikClient/Sources/Models/FlowChallengeResponseRequest.swift +authentikClient/Sources/Models/FlowDesignationEnum.swift +authentikClient/Sources/Models/FlowDiagram.swift +authentikClient/Sources/Models/FlowErrorChallenge.swift +authentikClient/Sources/Models/FlowImportResult.swift +authentikClient/Sources/Models/FlowInspection.swift +authentikClient/Sources/Models/FlowInspectorPlan.swift +authentikClient/Sources/Models/FlowRequest.swift +authentikClient/Sources/Models/FlowSet.swift +authentikClient/Sources/Models/FlowSetRequest.swift +authentikClient/Sources/Models/FlowStageBinding.swift +authentikClient/Sources/Models/FlowStageBindingRequest.swift +authentikClient/Sources/Models/FooterLink.swift +authentikClient/Sources/Models/GenericError.swift +authentikClient/Sources/Models/Group.swift +authentikClient/Sources/Models/GroupMember.swift +authentikClient/Sources/Models/GroupMemberRequest.swift +authentikClient/Sources/Models/GroupRequest.swift +authentikClient/Sources/Models/IdentificationChallenge.swift +authentikClient/Sources/Models/IdentificationChallengeResponseRequest.swift +authentikClient/Sources/Models/IdentificationStage.swift +authentikClient/Sources/Models/IdentificationStageRequest.swift +authentikClient/Sources/Models/InstallID.swift +authentikClient/Sources/Models/IntentEnum.swift +authentikClient/Sources/Models/InvalidResponseActionEnum.swift +authentikClient/Sources/Models/Invitation.swift +authentikClient/Sources/Models/InvitationRequest.swift +authentikClient/Sources/Models/InvitationStage.swift +authentikClient/Sources/Models/InvitationStageRequest.swift +authentikClient/Sources/Models/IssuerModeEnum.swift +authentikClient/Sources/Models/ItemMatchingModeEnum.swift +authentikClient/Sources/Models/KubernetesServiceConnection.swift +authentikClient/Sources/Models/KubernetesServiceConnectionRequest.swift +authentikClient/Sources/Models/LDAPAPIAccessMode.swift +authentikClient/Sources/Models/LDAPDebug.swift +authentikClient/Sources/Models/LDAPOutpostConfig.swift +authentikClient/Sources/Models/LDAPPropertyMapping.swift +authentikClient/Sources/Models/LDAPPropertyMappingRequest.swift +authentikClient/Sources/Models/LDAPProvider.swift +authentikClient/Sources/Models/LDAPProviderRequest.swift +authentikClient/Sources/Models/LDAPSource.swift +authentikClient/Sources/Models/LDAPSourceRequest.swift +authentikClient/Sources/Models/LDAPSyncStatus.swift +authentikClient/Sources/Models/LayoutEnum.swift +authentikClient/Sources/Models/License.swift +authentikClient/Sources/Models/LicenseForecast.swift +authentikClient/Sources/Models/LicenseRequest.swift +authentikClient/Sources/Models/LicenseSummary.swift +authentikClient/Sources/Models/Link.swift +authentikClient/Sources/Models/LoginChallengeTypes.swift +authentikClient/Sources/Models/LoginMetrics.swift +authentikClient/Sources/Models/LoginSource.swift +authentikClient/Sources/Models/Metadata.swift +authentikClient/Sources/Models/MobileDevice.swift +authentikClient/Sources/Models/MobileDeviceEnrollmentCallback.swift +authentikClient/Sources/Models/MobileDeviceEnrollmentRequest.swift +authentikClient/Sources/Models/MobileDeviceEnrollmentStatus.swift +authentikClient/Sources/Models/MobileDeviceEnrollmentStatusStatusEnum.swift +authentikClient/Sources/Models/MobileDeviceInfo.swift +authentikClient/Sources/Models/MobileDeviceInfoRequest.swift +authentikClient/Sources/Models/MobileDeviceRequest.swift +authentikClient/Sources/Models/MobileDeviceResponseRequest.swift +authentikClient/Sources/Models/MobileDeviceSetPushKeyRequest.swift +authentikClient/Sources/Models/ModelEnum.swift +authentikClient/Sources/Models/ModelRequest.swift +authentikClient/Sources/Models/NameIdPolicyEnum.swift +authentikClient/Sources/Models/NotConfiguredActionEnum.swift +authentikClient/Sources/Models/Notification.swift +authentikClient/Sources/Models/NotificationRequest.swift +authentikClient/Sources/Models/NotificationRule.swift +authentikClient/Sources/Models/NotificationRuleRequest.swift +authentikClient/Sources/Models/NotificationTransport.swift +authentikClient/Sources/Models/NotificationTransportModeEnum.swift +authentikClient/Sources/Models/NotificationTransportRequest.swift +authentikClient/Sources/Models/NotificationTransportTest.swift +authentikClient/Sources/Models/NotificationWebhookMapping.swift +authentikClient/Sources/Models/NotificationWebhookMappingRequest.swift +authentikClient/Sources/Models/OAuth2Provider.swift +authentikClient/Sources/Models/OAuth2ProviderRequest.swift +authentikClient/Sources/Models/OAuth2ProviderSetupURLs.swift +authentikClient/Sources/Models/OAuthDeviceCodeChallenge.swift +authentikClient/Sources/Models/OAuthDeviceCodeChallengeResponseRequest.swift +authentikClient/Sources/Models/OAuthDeviceCodeFinishChallenge.swift +authentikClient/Sources/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift +authentikClient/Sources/Models/OAuthSource.swift +authentikClient/Sources/Models/OAuthSourceRequest.swift +authentikClient/Sources/Models/OpenIDConnectConfiguration.swift +authentikClient/Sources/Models/Outpost.swift +authentikClient/Sources/Models/OutpostDefaultConfig.swift +authentikClient/Sources/Models/OutpostHealth.swift +authentikClient/Sources/Models/OutpostRequest.swift +authentikClient/Sources/Models/OutpostTypeEnum.swift +authentikClient/Sources/Models/PaginatedApplicationList.swift +authentikClient/Sources/Models/PaginatedAuthenticateWebAuthnStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatedSessionList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorDuoStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorMobileStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorSMSStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorStaticStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorTOTPStageList.swift +authentikClient/Sources/Models/PaginatedAuthenticatorValidateStageList.swift +authentikClient/Sources/Models/PaginatedBlueprintInstanceList.swift +authentikClient/Sources/Models/PaginatedCaptchaStageList.swift +authentikClient/Sources/Models/PaginatedCertificateKeyPairList.swift +authentikClient/Sources/Models/PaginatedConsentStageList.swift +authentikClient/Sources/Models/PaginatedDenyStageList.swift +authentikClient/Sources/Models/PaginatedDockerServiceConnectionList.swift +authentikClient/Sources/Models/PaginatedDummyPolicyList.swift +authentikClient/Sources/Models/PaginatedDummyStageList.swift +authentikClient/Sources/Models/PaginatedDuoDeviceList.swift +authentikClient/Sources/Models/PaginatedEmailStageList.swift +authentikClient/Sources/Models/PaginatedEventList.swift +authentikClient/Sources/Models/PaginatedEventMatcherPolicyList.swift +authentikClient/Sources/Models/PaginatedExpiringBaseGrantModelList.swift +authentikClient/Sources/Models/PaginatedExpressionPolicyList.swift +authentikClient/Sources/Models/PaginatedExtraRoleObjectPermissionList.swift +authentikClient/Sources/Models/PaginatedExtraUserObjectPermissionList.swift +authentikClient/Sources/Models/PaginatedFlowList.swift +authentikClient/Sources/Models/PaginatedFlowStageBindingList.swift +authentikClient/Sources/Models/PaginatedGroupList.swift +authentikClient/Sources/Models/PaginatedIdentificationStageList.swift +authentikClient/Sources/Models/PaginatedInvitationList.swift +authentikClient/Sources/Models/PaginatedInvitationStageList.swift +authentikClient/Sources/Models/PaginatedKubernetesServiceConnectionList.swift +authentikClient/Sources/Models/PaginatedLDAPOutpostConfigList.swift +authentikClient/Sources/Models/PaginatedLDAPPropertyMappingList.swift +authentikClient/Sources/Models/PaginatedLDAPProviderList.swift +authentikClient/Sources/Models/PaginatedLDAPSourceList.swift +authentikClient/Sources/Models/PaginatedLicenseList.swift +authentikClient/Sources/Models/PaginatedMobileDeviceList.swift +authentikClient/Sources/Models/PaginatedNotificationList.swift +authentikClient/Sources/Models/PaginatedNotificationRuleList.swift +authentikClient/Sources/Models/PaginatedNotificationTransportList.swift +authentikClient/Sources/Models/PaginatedNotificationWebhookMappingList.swift +authentikClient/Sources/Models/PaginatedOAuth2ProviderList.swift +authentikClient/Sources/Models/PaginatedOAuthSourceList.swift +authentikClient/Sources/Models/PaginatedOutpostList.swift +authentikClient/Sources/Models/PaginatedPasswordExpiryPolicyList.swift +authentikClient/Sources/Models/PaginatedPasswordPolicyList.swift +authentikClient/Sources/Models/PaginatedPasswordStageList.swift +authentikClient/Sources/Models/PaginatedPermissionList.swift +authentikClient/Sources/Models/PaginatedPlexSourceConnectionList.swift +authentikClient/Sources/Models/PaginatedPlexSourceList.swift +authentikClient/Sources/Models/PaginatedPolicyBindingList.swift +authentikClient/Sources/Models/PaginatedPolicyList.swift +authentikClient/Sources/Models/PaginatedPromptList.swift +authentikClient/Sources/Models/PaginatedPromptStageList.swift +authentikClient/Sources/Models/PaginatedPropertyMappingList.swift +authentikClient/Sources/Models/PaginatedProviderList.swift +authentikClient/Sources/Models/PaginatedProxyOutpostConfigList.swift +authentikClient/Sources/Models/PaginatedProxyProviderList.swift +authentikClient/Sources/Models/PaginatedRadiusOutpostConfigList.swift +authentikClient/Sources/Models/PaginatedRadiusProviderList.swift +authentikClient/Sources/Models/PaginatedReputationList.swift +authentikClient/Sources/Models/PaginatedReputationPolicyList.swift +authentikClient/Sources/Models/PaginatedRoleAssignedObjectPermissionList.swift +authentikClient/Sources/Models/PaginatedRoleList.swift +authentikClient/Sources/Models/PaginatedSAMLPropertyMappingList.swift +authentikClient/Sources/Models/PaginatedSAMLProviderList.swift +authentikClient/Sources/Models/PaginatedSAMLSourceList.swift +authentikClient/Sources/Models/PaginatedSCIMMappingList.swift +authentikClient/Sources/Models/PaginatedSCIMProviderList.swift +authentikClient/Sources/Models/PaginatedSMSDeviceList.swift +authentikClient/Sources/Models/PaginatedScopeMappingList.swift +authentikClient/Sources/Models/PaginatedServiceConnectionList.swift +authentikClient/Sources/Models/PaginatedSourceList.swift +authentikClient/Sources/Models/PaginatedStageList.swift +authentikClient/Sources/Models/PaginatedStaticDeviceList.swift +authentikClient/Sources/Models/PaginatedTOTPDeviceList.swift +authentikClient/Sources/Models/PaginatedTenantList.swift +authentikClient/Sources/Models/PaginatedTokenList.swift +authentikClient/Sources/Models/PaginatedTokenModelList.swift +authentikClient/Sources/Models/PaginatedUserAssignedObjectPermissionList.swift +authentikClient/Sources/Models/PaginatedUserConsentList.swift +authentikClient/Sources/Models/PaginatedUserDeleteStageList.swift +authentikClient/Sources/Models/PaginatedUserList.swift +authentikClient/Sources/Models/PaginatedUserLoginStageList.swift +authentikClient/Sources/Models/PaginatedUserLogoutStageList.swift +authentikClient/Sources/Models/PaginatedUserOAuthSourceConnectionList.swift +authentikClient/Sources/Models/PaginatedUserSAMLSourceConnectionList.swift +authentikClient/Sources/Models/PaginatedUserSourceConnectionList.swift +authentikClient/Sources/Models/PaginatedUserWriteStageList.swift +authentikClient/Sources/Models/PaginatedWebAuthnDeviceList.swift +authentikClient/Sources/Models/Pagination.swift +authentikClient/Sources/Models/PasswordChallenge.swift +authentikClient/Sources/Models/PasswordChallengeResponseRequest.swift +authentikClient/Sources/Models/PasswordExpiryPolicy.swift +authentikClient/Sources/Models/PasswordExpiryPolicyRequest.swift +authentikClient/Sources/Models/PasswordPolicy.swift +authentikClient/Sources/Models/PasswordPolicyRequest.swift +authentikClient/Sources/Models/PasswordStage.swift +authentikClient/Sources/Models/PasswordStageRequest.swift +authentikClient/Sources/Models/PatchedApplicationRequest.swift +authentikClient/Sources/Models/PatchedAuthenticateWebAuthnStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorDuoStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorMobileStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorSMSStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorStaticStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorTOTPStageRequest.swift +authentikClient/Sources/Models/PatchedAuthenticatorValidateStageRequest.swift +authentikClient/Sources/Models/PatchedBlueprintInstanceRequest.swift +authentikClient/Sources/Models/PatchedCaptchaStageRequest.swift +authentikClient/Sources/Models/PatchedCertificateKeyPairRequest.swift +authentikClient/Sources/Models/PatchedConsentStageRequest.swift +authentikClient/Sources/Models/PatchedDenyStageRequest.swift +authentikClient/Sources/Models/PatchedDockerServiceConnectionRequest.swift +authentikClient/Sources/Models/PatchedDummyPolicyRequest.swift +authentikClient/Sources/Models/PatchedDummyStageRequest.swift +authentikClient/Sources/Models/PatchedDuoDeviceRequest.swift +authentikClient/Sources/Models/PatchedEmailStageRequest.swift +authentikClient/Sources/Models/PatchedEventMatcherPolicyRequest.swift +authentikClient/Sources/Models/PatchedEventRequest.swift +authentikClient/Sources/Models/PatchedExpressionPolicyRequest.swift +authentikClient/Sources/Models/PatchedFlowRequest.swift +authentikClient/Sources/Models/PatchedFlowStageBindingRequest.swift +authentikClient/Sources/Models/PatchedGroupRequest.swift +authentikClient/Sources/Models/PatchedIdentificationStageRequest.swift +authentikClient/Sources/Models/PatchedInvitationRequest.swift +authentikClient/Sources/Models/PatchedInvitationStageRequest.swift +authentikClient/Sources/Models/PatchedKubernetesServiceConnectionRequest.swift +authentikClient/Sources/Models/PatchedLDAPPropertyMappingRequest.swift +authentikClient/Sources/Models/PatchedLDAPProviderRequest.swift +authentikClient/Sources/Models/PatchedLDAPSourceRequest.swift +authentikClient/Sources/Models/PatchedLicenseRequest.swift +authentikClient/Sources/Models/PatchedMobileDeviceRequest.swift +authentikClient/Sources/Models/PatchedNotificationRequest.swift +authentikClient/Sources/Models/PatchedNotificationRuleRequest.swift +authentikClient/Sources/Models/PatchedNotificationTransportRequest.swift +authentikClient/Sources/Models/PatchedNotificationWebhookMappingRequest.swift +authentikClient/Sources/Models/PatchedOAuth2ProviderRequest.swift +authentikClient/Sources/Models/PatchedOAuthSourceRequest.swift +authentikClient/Sources/Models/PatchedOutpostRequest.swift +authentikClient/Sources/Models/PatchedPasswordExpiryPolicyRequest.swift +authentikClient/Sources/Models/PatchedPasswordPolicyRequest.swift +authentikClient/Sources/Models/PatchedPasswordStageRequest.swift +authentikClient/Sources/Models/PatchedPermissionAssignRequest.swift +authentikClient/Sources/Models/PatchedPlexSourceConnectionRequest.swift +authentikClient/Sources/Models/PatchedPlexSourceRequest.swift +authentikClient/Sources/Models/PatchedPolicyBindingRequest.swift +authentikClient/Sources/Models/PatchedPromptRequest.swift +authentikClient/Sources/Models/PatchedPromptStageRequest.swift +authentikClient/Sources/Models/PatchedProxyProviderRequest.swift +authentikClient/Sources/Models/PatchedRadiusProviderRequest.swift +authentikClient/Sources/Models/PatchedReputationPolicyRequest.swift +authentikClient/Sources/Models/PatchedRoleRequest.swift +authentikClient/Sources/Models/PatchedSAMLPropertyMappingRequest.swift +authentikClient/Sources/Models/PatchedSAMLProviderRequest.swift +authentikClient/Sources/Models/PatchedSAMLSourceRequest.swift +authentikClient/Sources/Models/PatchedSCIMMappingRequest.swift +authentikClient/Sources/Models/PatchedSCIMProviderRequest.swift +authentikClient/Sources/Models/PatchedSMSDeviceRequest.swift +authentikClient/Sources/Models/PatchedScopeMappingRequest.swift +authentikClient/Sources/Models/PatchedStaticDeviceRequest.swift +authentikClient/Sources/Models/PatchedTOTPDeviceRequest.swift +authentikClient/Sources/Models/PatchedTenantRequest.swift +authentikClient/Sources/Models/PatchedTokenRequest.swift +authentikClient/Sources/Models/PatchedUserDeleteStageRequest.swift +authentikClient/Sources/Models/PatchedUserLoginStageRequest.swift +authentikClient/Sources/Models/PatchedUserLogoutStageRequest.swift +authentikClient/Sources/Models/PatchedUserOAuthSourceConnectionRequest.swift +authentikClient/Sources/Models/PatchedUserRequest.swift +authentikClient/Sources/Models/PatchedUserSAMLSourceConnectionRequest.swift +authentikClient/Sources/Models/PatchedUserWriteStageRequest.swift +authentikClient/Sources/Models/PatchedWebAuthnDeviceRequest.swift +authentikClient/Sources/Models/Permission.swift +authentikClient/Sources/Models/PermissionAssignRequest.swift +authentikClient/Sources/Models/PlatformEnum.swift +authentikClient/Sources/Models/PlexAuthenticationChallenge.swift +authentikClient/Sources/Models/PlexAuthenticationChallengeResponseRequest.swift +authentikClient/Sources/Models/PlexSource.swift +authentikClient/Sources/Models/PlexSourceConnection.swift +authentikClient/Sources/Models/PlexSourceConnectionRequest.swift +authentikClient/Sources/Models/PlexSourceRequest.swift +authentikClient/Sources/Models/PlexTokenRedeemRequest.swift +authentikClient/Sources/Models/Policy.swift +authentikClient/Sources/Models/PolicyBinding.swift +authentikClient/Sources/Models/PolicyBindingRequest.swift +authentikClient/Sources/Models/PolicyEngineMode.swift +authentikClient/Sources/Models/PolicyRequest.swift +authentikClient/Sources/Models/PolicyTestRequest.swift +authentikClient/Sources/Models/PolicyTestResult.swift +authentikClient/Sources/Models/Prompt.swift +authentikClient/Sources/Models/PromptChallenge.swift +authentikClient/Sources/Models/PromptChallengeResponseRequest.swift +authentikClient/Sources/Models/PromptRequest.swift +authentikClient/Sources/Models/PromptStage.swift +authentikClient/Sources/Models/PromptStageRequest.swift +authentikClient/Sources/Models/PromptTypeEnum.swift +authentikClient/Sources/Models/PropertyMapping.swift +authentikClient/Sources/Models/PropertyMappingPreview.swift +authentikClient/Sources/Models/PropertyMappingTestResult.swift +authentikClient/Sources/Models/Provider.swift +authentikClient/Sources/Models/ProviderEnum.swift +authentikClient/Sources/Models/ProviderModelEnum.swift +authentikClient/Sources/Models/ProviderRequest.swift +authentikClient/Sources/Models/ProviderTypeEnum.swift +authentikClient/Sources/Models/ProxyMode.swift +authentikClient/Sources/Models/ProxyOutpostConfig.swift +authentikClient/Sources/Models/ProxyProvider.swift +authentikClient/Sources/Models/ProxyProviderRequest.swift +authentikClient/Sources/Models/RadiusOutpostConfig.swift +authentikClient/Sources/Models/RadiusProvider.swift +authentikClient/Sources/Models/RadiusProviderRequest.swift +authentikClient/Sources/Models/RedirectChallenge.swift +authentikClient/Sources/Models/Reputation.swift +authentikClient/Sources/Models/ReputationPolicy.swift +authentikClient/Sources/Models/ReputationPolicyRequest.swift +authentikClient/Sources/Models/ResidentKeyRequirementEnum.swift +authentikClient/Sources/Models/Role.swift +authentikClient/Sources/Models/RoleAssignedObjectPermission.swift +authentikClient/Sources/Models/RoleObjectPermission.swift +authentikClient/Sources/Models/RoleRequest.swift +authentikClient/Sources/Models/SAMLMetadata.swift +authentikClient/Sources/Models/SAMLPropertyMapping.swift +authentikClient/Sources/Models/SAMLPropertyMappingRequest.swift +authentikClient/Sources/Models/SAMLProvider.swift +authentikClient/Sources/Models/SAMLProviderRequest.swift +authentikClient/Sources/Models/SAMLSource.swift +authentikClient/Sources/Models/SAMLSourceRequest.swift +authentikClient/Sources/Models/SCIMMapping.swift +authentikClient/Sources/Models/SCIMMappingRequest.swift +authentikClient/Sources/Models/SCIMProvider.swift +authentikClient/Sources/Models/SCIMProviderRequest.swift +authentikClient/Sources/Models/SMSDevice.swift +authentikClient/Sources/Models/SMSDeviceRequest.swift +authentikClient/Sources/Models/ScopeMapping.swift +authentikClient/Sources/Models/ScopeMappingRequest.swift +authentikClient/Sources/Models/SelectableStage.swift +authentikClient/Sources/Models/ServiceConnection.swift +authentikClient/Sources/Models/ServiceConnectionRequest.swift +authentikClient/Sources/Models/ServiceConnectionState.swift +authentikClient/Sources/Models/SessionUser.swift +authentikClient/Sources/Models/SeverityEnum.swift +authentikClient/Sources/Models/ShellChallenge.swift +authentikClient/Sources/Models/SignatureAlgorithmEnum.swift +authentikClient/Sources/Models/Source.swift +authentikClient/Sources/Models/SourceRequest.swift +authentikClient/Sources/Models/SourceType.swift +authentikClient/Sources/Models/SpBindingEnum.swift +authentikClient/Sources/Models/Stage.swift +authentikClient/Sources/Models/StagePrompt.swift +authentikClient/Sources/Models/StageRequest.swift +authentikClient/Sources/Models/StaticDevice.swift +authentikClient/Sources/Models/StaticDeviceRequest.swift +authentikClient/Sources/Models/StaticDeviceToken.swift +authentikClient/Sources/Models/StaticDeviceTokenRequest.swift +authentikClient/Sources/Models/SubModeEnum.swift +authentikClient/Sources/Models/SystemInfo.swift +authentikClient/Sources/Models/SystemInfoRuntime.swift +authentikClient/Sources/Models/TOTPDevice.swift +authentikClient/Sources/Models/TOTPDeviceRequest.swift +authentikClient/Sources/Models/Task.swift +authentikClient/Sources/Models/TaskStatusEnum.swift +authentikClient/Sources/Models/Tenant.swift +authentikClient/Sources/Models/TenantRequest.swift +authentikClient/Sources/Models/Token.swift +authentikClient/Sources/Models/TokenModel.swift +authentikClient/Sources/Models/TokenRequest.swift +authentikClient/Sources/Models/TokenSetKeyRequest.swift +authentikClient/Sources/Models/TokenView.swift +authentikClient/Sources/Models/TransactionApplicationRequest.swift +authentikClient/Sources/Models/TransactionApplicationResponse.swift +authentikClient/Sources/Models/TypeCreate.swift +authentikClient/Sources/Models/UiThemeEnum.swift +authentikClient/Sources/Models/UsedBy.swift +authentikClient/Sources/Models/UsedByActionEnum.swift +authentikClient/Sources/Models/User.swift +authentikClient/Sources/Models/UserAccountRequest.swift +authentikClient/Sources/Models/UserAssignedObjectPermission.swift +authentikClient/Sources/Models/UserConsent.swift +authentikClient/Sources/Models/UserCreationModeEnum.swift +authentikClient/Sources/Models/UserDeleteStage.swift +authentikClient/Sources/Models/UserDeleteStageRequest.swift +authentikClient/Sources/Models/UserFieldsEnum.swift +authentikClient/Sources/Models/UserGroup.swift +authentikClient/Sources/Models/UserGroupRequest.swift +authentikClient/Sources/Models/UserLoginChallenge.swift +authentikClient/Sources/Models/UserLoginChallengeResponseRequest.swift +authentikClient/Sources/Models/UserLoginStage.swift +authentikClient/Sources/Models/UserLoginStageRequest.swift +authentikClient/Sources/Models/UserLogoutStage.swift +authentikClient/Sources/Models/UserLogoutStageRequest.swift +authentikClient/Sources/Models/UserMatchingModeEnum.swift +authentikClient/Sources/Models/UserMetrics.swift +authentikClient/Sources/Models/UserOAuthSourceConnection.swift +authentikClient/Sources/Models/UserOAuthSourceConnectionRequest.swift +authentikClient/Sources/Models/UserObjectPermission.swift +authentikClient/Sources/Models/UserPasswordSetRequest.swift +authentikClient/Sources/Models/UserPath.swift +authentikClient/Sources/Models/UserRequest.swift +authentikClient/Sources/Models/UserSAMLSourceConnection.swift +authentikClient/Sources/Models/UserSAMLSourceConnectionRequest.swift +authentikClient/Sources/Models/UserSelf.swift +authentikClient/Sources/Models/UserSelfGroups.swift +authentikClient/Sources/Models/UserServiceAccountRequest.swift +authentikClient/Sources/Models/UserServiceAccountResponse.swift +authentikClient/Sources/Models/UserSetting.swift +authentikClient/Sources/Models/UserSourceConnection.swift +authentikClient/Sources/Models/UserTypeEnum.swift +authentikClient/Sources/Models/UserVerificationEnum.swift +authentikClient/Sources/Models/UserWriteStage.swift +authentikClient/Sources/Models/UserWriteStageRequest.swift +authentikClient/Sources/Models/ValidationError.swift +authentikClient/Sources/Models/Version.swift +authentikClient/Sources/Models/WebAuthnDevice.swift +authentikClient/Sources/Models/WebAuthnDeviceRequest.swift +authentikClient/Sources/Models/Workers.swift +authentikClient/Sources/Private/AnyDecodable.swift +authentikClient/Sources/Private/OpenISO8601DateFormatter.swift diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4ac4fde..fff4bdd 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.0 \ No newline at end of file +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 3f7e630..0000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 diff --git a/Makefile b/Makefile index d774227..795f7d2 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,9 @@ build: docker run \ --rm -v ${PWD}:/local \ --user ${UID}:${GID} \ - docker.io/openapitools/openapi-generator-cli:v6.2.0 generate \ + docker.io/openapitools/openapi-generator-cli:v7.2.0 generate \ -i /local/schema.yml \ - -g swift5 \ + -g swift-combine \ -o /local \ -c /local/config.yaml rm -rf ./test diff --git a/OpenAPITransport/Package.swift b/OpenAPITransport/Package.swift new file mode 100644 index 0000000..916f6df --- /dev/null +++ b/OpenAPITransport/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "OpenAPITransport", + platforms: [ + .iOS(.v13), + .macOS(.v10_15) + ], + products: [ + .library( + name: "OpenAPITransport", + targets: ["OpenAPITransport"] + ), + ], + dependencies: [], + targets: [ + .target( + name: "OpenAPITransport", + dependencies: [], + path: "Sources" + ), + ] +) diff --git a/OpenAPITransport/Sources/OpenAPITransport.swift b/OpenAPITransport/Sources/OpenAPITransport.swift new file mode 100644 index 0000000..cd2e819 --- /dev/null +++ b/OpenAPITransport/Sources/OpenAPITransport.swift @@ -0,0 +1,306 @@ +// OpenAPITransport.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine + +// MARK: - OpenAPITransport + +public protocol OpenAPITransport: AnyObject { + var baseURL: URL? { get } + + func send(request: URLRequest) -> AnyPublisher + + func cancelAll() +} + +public struct OpenAPITransportResponse { + public let data: Data + public let statusCode: Int + + public init(data: Data, statusCode: Int) { + self.data = data + self.statusCode = statusCode + } +} + +public struct OpenAPITransportError: Error, CustomStringConvertible, LocalizedError { + public let statusCode: Int + public let description: String + public let errorDescription: String? + /// It might be source network error + public let nestedError: Error? + /// Data may contain additional reason info (like json payload) + public let data: Data + + public init( + statusCode: Int, + description: String? = nil, + errorDescription: String? = nil, + nestedError: Error? = nil, + data: Data = Data() + ) { + self.statusCode = statusCode + self.errorDescription = errorDescription + self.nestedError = nestedError + self.data = data + if let description = description { + self.description = description + } else { + var summary = "OpenAPITransportError with status \(statusCode)" + if let nestedError = nestedError { + summary.append(contentsOf: ", \(nestedError.localizedDescription)") + } + self.description = summary + } + } +} + +// MARK: - Policy + +/// Policy to define whether response is successful or requires authentication +public protocol ResponsePolicy { + func defineState(for request: URLRequest, output: URLSession.DataTaskPublisher.Output) -> AnyPublisher +} + +public enum ResponseState { + /// Return success to client + case success + /// Return error to client + case failure + /// Repeat request + case retry +} + +// MARK: - Interceptor + +/// Define how to customize URL request before network call +public protocol Interceptor { + /// Customize request before performing. Add headers or encrypt body for example. + func intercept(request: URLRequest) -> AnyPublisher + + /// Customize response before handling. Decrypt body for example. + func intercept(output: URLSession.DataTaskPublisher.Output) -> AnyPublisher +} + +// MARK: - Transport delegate + +public protocol OpenAPITransportDelegate: AnyObject { + func willStart(request: URLRequest) + + func didFinish(request: URLRequest, response: HTTPURLResponse?, data: Data) + + func didFinish(request: URLRequest, error: Error) +} + +// MARK: - Implementation + +open class URLSessionOpenAPITransport: OpenAPITransport { + public struct Config { + public var baseURL: URL? + public var session: URLSession + public var processor: Interceptor + public var policy: ResponsePolicy + public weak var delegate: OpenAPITransportDelegate? + + public init( + baseURL: URL? = nil, + session: URLSession = .shared, + processor: Interceptor = DefaultInterceptor(), + policy: ResponsePolicy = DefaultResponsePolicy(), + delegate: OpenAPITransportDelegate? = nil + ) { + self.baseURL = baseURL + self.session = session + self.processor = processor + self.policy = policy + self.delegate = delegate + } + } + + private var cancellable = Set() + public var config: Config + public var baseURL: URL? { config.baseURL } + + public init(config: Config = .init()) { + self.config = config + } + + open func send(request: URLRequest) -> AnyPublisher { + config.processor + // Add custom headers or refresh token if needed + .intercept(request: request) + .flatMap { request -> AnyPublisher in + self.config.delegate?.willStart(request: request) + // Perform network call + return self.config.session.dataTaskPublisher(for: request) + .mapError { + self.config.delegate?.didFinish(request: request, error: $0) + return OpenAPITransportError(statusCode: $0.code.rawValue, description: "Network call finished fails") + } + .flatMap { output in + self.config.processor.intercept(output: output) + } + .flatMap { output -> AnyPublisher in + let response = output.response as? HTTPURLResponse + self.config.delegate?.didFinish(request: request, response: response, data: output.data) + return self.config.policy.defineState(for: request, output: output) + .setFailureType(to: OpenAPITransportError.self) + .flatMap { state -> AnyPublisher in + switch state { + case .success: + let transportResponse = OpenAPITransportResponse(data: output.data, statusCode: 200) + return Result.success(transportResponse).publisher.eraseToAnyPublisher() + case .retry: + return Fail(error: OpenAPITransportError.retryError).eraseToAnyPublisher() + case .failure: + let code = response?.statusCode ?? OpenAPITransportError.noResponseCode + let transportError = OpenAPITransportError(statusCode: code, data: output.data) + return Fail(error: transportError).eraseToAnyPublisher() + } + }.eraseToAnyPublisher() + } + .eraseToAnyPublisher() + } + .retry(times: 2) { error -> Bool in + return error.statusCode == OpenAPITransportError.retryError.statusCode + }.eraseToAnyPublisher() + } + + open func cancelAll() { + cancellable.removeAll() + } +} + +public final class DefaultInterceptor: Interceptor { + public init() {} + + public func intercept(request: URLRequest) -> AnyPublisher { + Just(request) + .setFailureType(to: OpenAPITransportError.self) + .eraseToAnyPublisher() + } + + public func intercept(output: URLSession.DataTaskPublisher.Output) -> AnyPublisher { + Just(output) + .setFailureType(to: OpenAPITransportError.self) + .eraseToAnyPublisher() + } +} + +public final class DefaultResponsePolicy: ResponsePolicy { + public init() {} + + public func defineState(for request: URLRequest, output: URLSession.DataTaskPublisher.Output) -> AnyPublisher { + let state: ResponseState + switch (output.response as? HTTPURLResponse)?.statusCode { + case .some(200...299): state = .success + default: state = .failure + } + return Just(state).eraseToAnyPublisher() + } +} + +/// Custom transport errors. It begins with 6.. not to conflict with HTTP codes +public extension OpenAPITransportError { + static let incorrectAuthenticationCode = 600 + static func incorrectAuthenticationError(_ nestedError: Error? = nil) -> OpenAPITransportError { + OpenAPITransportError( + statusCode: OpenAPITransportError.incorrectAuthenticationCode, + description: "Impossible to add authentication headers to request", + errorDescription: NSLocalizedString( + "Impossible to add authentication headers to request", + comment: "Incorrect authentication" + ), + nestedError: nestedError + ) + } + + static let failedAuthenticationRefreshCode = 601 + static func failedAuthenticationRefreshError(_ nestedError: Error? = nil) -> OpenAPITransportError { + OpenAPITransportError( + statusCode: OpenAPITransportError.failedAuthenticationRefreshCode, + description: "Error while refreshing authentication", + errorDescription: NSLocalizedString( + "Error while refreshing authentication", + comment: "Failed authentication refresh" + ), + nestedError: nestedError + ) + } + + static let noResponseCode = 603 + static func noResponseError(_ nestedError: Error? = nil) -> OpenAPITransportError { + OpenAPITransportError( + statusCode: OpenAPITransportError.noResponseCode, + description: "There is no HTTP URL response", + errorDescription: NSLocalizedString( + "There is no HTTP URL response", + comment: "No response" + ), + nestedError: nestedError + ) + } + + static let badURLCode = 604 + static func badURLError(_ nestedError: Error? = nil) -> OpenAPITransportError { + OpenAPITransportError( + statusCode: OpenAPITransportError.badURLCode, + description: "Request URL cannot be created with given parameters", + errorDescription: NSLocalizedString( + "Request URL cannot be created with given parameters", + comment: "Bad URL" + ), + nestedError: nestedError + ) + } + + static let invalidResponseMappingCode = 605 + static func invalidResponseMappingError(data: Data) -> OpenAPITransportError { + OpenAPITransportError( + statusCode: OpenAPITransportError.invalidResponseMappingCode, + description: "Response data cannot be expected object scheme", + errorDescription: NSLocalizedString( + "Response data cannot be expected object scheme", + comment: "Invalid response mapping" + ), + data: data + ) + } + + static let retryErrorCode = 606 + static let retryError = OpenAPITransportError(statusCode: OpenAPITransportError.retryErrorCode) +} + +// MARK: - Private + +private extension Publishers { + struct RetryIf: Publisher { + typealias Output = P.Output + typealias Failure = P.Failure + + let publisher: P + let times: Int + let condition: (P.Failure) -> Bool + + func receive(subscriber: S) where S : Subscriber, Failure == S.Failure, Output == S.Input { + guard times > 0 else { return publisher.receive(subscriber: subscriber) } + + publisher.catch { (error: P.Failure) -> AnyPublisher in + if condition(error) { + return RetryIf(publisher: publisher, times: times - 1, condition: condition).eraseToAnyPublisher() + } else { + return Fail(error: error).eraseToAnyPublisher() + } + }.receive(subscriber: subscriber) + } + } +} + +private extension Publisher { + func retry(times: Int, if condition: @escaping (Failure) -> Bool) -> Publishers.RetryIf { + Publishers.RetryIf(publisher: self, times: times, condition: condition) + } +} diff --git a/Package.swift b/Package.swift index f505a29..a770ec7 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "authentikClient", platforms: [ - .iOS(.v9), + .iOS(.v13), .macOS(.v10_11), .tvOS(.v9), .watchOS(.v3), @@ -16,18 +16,23 @@ let package = Package( name: "authentikClient", targets: ["authentikClient"] ), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .library( + name: "OpenAPITransport", + targets: ["OpenAPITransport"] + ), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "authentikClient", - dependencies: ["AnyCodable", ], - path: "authentikClient/Classes" + dependencies: ["OpenAPITransport", ], + path: "authentikClient/Sources" + ), + .target( + name: "OpenAPITransport", + dependencies: [], + path: "OpenAPITransport/Sources" ), ] ) diff --git a/README.md b/README.md index 7370e4a..d1ac95e 100644 --- a/README.md +++ b/README.md @@ -23,1182 +23,1227 @@ All URIs are relative to *http://localhost/api/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminAPI* | [**adminAppsList**](docs/AdminAPI.md#adminappslist) | **GET** /admin/apps/ | -*AdminAPI* | [**adminMetricsRetrieve**](docs/AdminAPI.md#adminmetricsretrieve) | **GET** /admin/metrics/ | -*AdminAPI* | [**adminModelsList**](docs/AdminAPI.md#adminmodelslist) | **GET** /admin/models/ | -*AdminAPI* | [**adminSystemCreate**](docs/AdminAPI.md#adminsystemcreate) | **POST** /admin/system/ | -*AdminAPI* | [**adminSystemRetrieve**](docs/AdminAPI.md#adminsystemretrieve) | **GET** /admin/system/ | -*AdminAPI* | [**adminSystemTasksList**](docs/AdminAPI.md#adminsystemtaskslist) | **GET** /admin/system_tasks/ | -*AdminAPI* | [**adminSystemTasksRetrieve**](docs/AdminAPI.md#adminsystemtasksretrieve) | **GET** /admin/system_tasks/{id}/ | -*AdminAPI* | [**adminSystemTasksRetryCreate**](docs/AdminAPI.md#adminsystemtasksretrycreate) | **POST** /admin/system_tasks/{id}/retry/ | -*AdminAPI* | [**adminVersionRetrieve**](docs/AdminAPI.md#adminversionretrieve) | **GET** /admin/version/ | -*AdminAPI* | [**adminWorkersRetrieve**](docs/AdminAPI.md#adminworkersretrieve) | **GET** /admin/workers/ | -*AuthenticatorsAPI* | [**authenticatorsAdminAllList**](docs/AuthenticatorsAPI.md#authenticatorsadminalllist) | **GET** /authenticators/admin/all/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoCreate**](docs/AuthenticatorsAPI.md#authenticatorsadminduocreate) | **POST** /authenticators/admin/duo/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoDestroy**](docs/AuthenticatorsAPI.md#authenticatorsadminduodestroy) | **DELETE** /authenticators/admin/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoList**](docs/AuthenticatorsAPI.md#authenticatorsadminduolist) | **GET** /authenticators/admin/duo/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminduopartialupdate) | **PATCH** /authenticators/admin/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsadminduoretrieve) | **GET** /authenticators/admin/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminDuoUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminduoupdate) | **PUT** /authenticators/admin/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsCreate**](docs/AuthenticatorsAPI.md#authenticatorsadminsmscreate) | **POST** /authenticators/admin/sms/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsDestroy**](docs/AuthenticatorsAPI.md#authenticatorsadminsmsdestroy) | **DELETE** /authenticators/admin/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsList**](docs/AuthenticatorsAPI.md#authenticatorsadminsmslist) | **GET** /authenticators/admin/sms/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminsmspartialupdate) | **PATCH** /authenticators/admin/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsadminsmsretrieve) | **GET** /authenticators/admin/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminSmsUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminsmsupdate) | **PUT** /authenticators/admin/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticCreate**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticcreate) | **POST** /authenticators/admin/static/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticDestroy**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticdestroy) | **DELETE** /authenticators/admin/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticList**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticlist) | **GET** /authenticators/admin/static/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticpartialupdate) | **PATCH** /authenticators/admin/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticretrieve) | **GET** /authenticators/admin/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminStaticUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminstaticupdate) | **PUT** /authenticators/admin/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpCreate**](docs/AuthenticatorsAPI.md#authenticatorsadmintotpcreate) | **POST** /authenticators/admin/totp/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpDestroy**](docs/AuthenticatorsAPI.md#authenticatorsadmintotpdestroy) | **DELETE** /authenticators/admin/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpList**](docs/AuthenticatorsAPI.md#authenticatorsadmintotplist) | **GET** /authenticators/admin/totp/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadmintotppartialupdate) | **PATCH** /authenticators/admin/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsadmintotpretrieve) | **GET** /authenticators/admin/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminTotpUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadmintotpupdate) | **PUT** /authenticators/admin/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnCreate**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthncreate) | **POST** /authenticators/admin/webauthn/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnDestroy**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthndestroy) | **DELETE** /authenticators/admin/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnList**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthnlist) | **GET** /authenticators/admin/webauthn/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthnpartialupdate) | **PATCH** /authenticators/admin/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthnretrieve) | **GET** /authenticators/admin/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnUpdate**](docs/AuthenticatorsAPI.md#authenticatorsadminwebauthnupdate) | **PUT** /authenticators/admin/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsAllList**](docs/AuthenticatorsAPI.md#authenticatorsalllist) | **GET** /authenticators/all/ | -*AuthenticatorsAPI* | [**authenticatorsDuoDestroy**](docs/AuthenticatorsAPI.md#authenticatorsduodestroy) | **DELETE** /authenticators/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsDuoList**](docs/AuthenticatorsAPI.md#authenticatorsduolist) | **GET** /authenticators/duo/ | -*AuthenticatorsAPI* | [**authenticatorsDuoPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsduopartialupdate) | **PATCH** /authenticators/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsDuoRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsduoretrieve) | **GET** /authenticators/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsDuoUpdate**](docs/AuthenticatorsAPI.md#authenticatorsduoupdate) | **PUT** /authenticators/duo/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsDuoUsedByList**](docs/AuthenticatorsAPI.md#authenticatorsduousedbylist) | **GET** /authenticators/duo/{id}/used_by/ | -*AuthenticatorsAPI* | [**authenticatorsSmsDestroy**](docs/AuthenticatorsAPI.md#authenticatorssmsdestroy) | **DELETE** /authenticators/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsSmsList**](docs/AuthenticatorsAPI.md#authenticatorssmslist) | **GET** /authenticators/sms/ | -*AuthenticatorsAPI* | [**authenticatorsSmsPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorssmspartialupdate) | **PATCH** /authenticators/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsSmsRetrieve**](docs/AuthenticatorsAPI.md#authenticatorssmsretrieve) | **GET** /authenticators/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsSmsUpdate**](docs/AuthenticatorsAPI.md#authenticatorssmsupdate) | **PUT** /authenticators/sms/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsSmsUsedByList**](docs/AuthenticatorsAPI.md#authenticatorssmsusedbylist) | **GET** /authenticators/sms/{id}/used_by/ | -*AuthenticatorsAPI* | [**authenticatorsStaticDestroy**](docs/AuthenticatorsAPI.md#authenticatorsstaticdestroy) | **DELETE** /authenticators/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsStaticList**](docs/AuthenticatorsAPI.md#authenticatorsstaticlist) | **GET** /authenticators/static/ | -*AuthenticatorsAPI* | [**authenticatorsStaticPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorsstaticpartialupdate) | **PATCH** /authenticators/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsStaticRetrieve**](docs/AuthenticatorsAPI.md#authenticatorsstaticretrieve) | **GET** /authenticators/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsStaticUpdate**](docs/AuthenticatorsAPI.md#authenticatorsstaticupdate) | **PUT** /authenticators/static/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsStaticUsedByList**](docs/AuthenticatorsAPI.md#authenticatorsstaticusedbylist) | **GET** /authenticators/static/{id}/used_by/ | -*AuthenticatorsAPI* | [**authenticatorsTotpDestroy**](docs/AuthenticatorsAPI.md#authenticatorstotpdestroy) | **DELETE** /authenticators/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsTotpList**](docs/AuthenticatorsAPI.md#authenticatorstotplist) | **GET** /authenticators/totp/ | -*AuthenticatorsAPI* | [**authenticatorsTotpPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorstotppartialupdate) | **PATCH** /authenticators/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsTotpRetrieve**](docs/AuthenticatorsAPI.md#authenticatorstotpretrieve) | **GET** /authenticators/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsTotpUpdate**](docs/AuthenticatorsAPI.md#authenticatorstotpupdate) | **PUT** /authenticators/totp/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsTotpUsedByList**](docs/AuthenticatorsAPI.md#authenticatorstotpusedbylist) | **GET** /authenticators/totp/{id}/used_by/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnDestroy**](docs/AuthenticatorsAPI.md#authenticatorswebauthndestroy) | **DELETE** /authenticators/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnList**](docs/AuthenticatorsAPI.md#authenticatorswebauthnlist) | **GET** /authenticators/webauthn/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnPartialUpdate**](docs/AuthenticatorsAPI.md#authenticatorswebauthnpartialupdate) | **PATCH** /authenticators/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnRetrieve**](docs/AuthenticatorsAPI.md#authenticatorswebauthnretrieve) | **GET** /authenticators/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnUpdate**](docs/AuthenticatorsAPI.md#authenticatorswebauthnupdate) | **PUT** /authenticators/webauthn/{id}/ | -*AuthenticatorsAPI* | [**authenticatorsWebauthnUsedByList**](docs/AuthenticatorsAPI.md#authenticatorswebauthnusedbylist) | **GET** /authenticators/webauthn/{id}/used_by/ | -*CoreAPI* | [**coreApplicationsCheckAccessRetrieve**](docs/CoreAPI.md#coreapplicationscheckaccessretrieve) | **GET** /core/applications/{slug}/check_access/ | -*CoreAPI* | [**coreApplicationsCreate**](docs/CoreAPI.md#coreapplicationscreate) | **POST** /core/applications/ | -*CoreAPI* | [**coreApplicationsDestroy**](docs/CoreAPI.md#coreapplicationsdestroy) | **DELETE** /core/applications/{slug}/ | -*CoreAPI* | [**coreApplicationsList**](docs/CoreAPI.md#coreapplicationslist) | **GET** /core/applications/ | -*CoreAPI* | [**coreApplicationsMetricsList**](docs/CoreAPI.md#coreapplicationsmetricslist) | **GET** /core/applications/{slug}/metrics/ | -*CoreAPI* | [**coreApplicationsPartialUpdate**](docs/CoreAPI.md#coreapplicationspartialupdate) | **PATCH** /core/applications/{slug}/ | -*CoreAPI* | [**coreApplicationsRetrieve**](docs/CoreAPI.md#coreapplicationsretrieve) | **GET** /core/applications/{slug}/ | -*CoreAPI* | [**coreApplicationsSetIconCreate**](docs/CoreAPI.md#coreapplicationsseticoncreate) | **POST** /core/applications/{slug}/set_icon/ | -*CoreAPI* | [**coreApplicationsSetIconUrlCreate**](docs/CoreAPI.md#coreapplicationsseticonurlcreate) | **POST** /core/applications/{slug}/set_icon_url/ | -*CoreAPI* | [**coreApplicationsUpdate**](docs/CoreAPI.md#coreapplicationsupdate) | **PUT** /core/applications/{slug}/ | -*CoreAPI* | [**coreApplicationsUsedByList**](docs/CoreAPI.md#coreapplicationsusedbylist) | **GET** /core/applications/{slug}/used_by/ | -*CoreAPI* | [**coreAuthenticatedSessionsDestroy**](docs/CoreAPI.md#coreauthenticatedsessionsdestroy) | **DELETE** /core/authenticated_sessions/{uuid}/ | -*CoreAPI* | [**coreAuthenticatedSessionsList**](docs/CoreAPI.md#coreauthenticatedsessionslist) | **GET** /core/authenticated_sessions/ | -*CoreAPI* | [**coreAuthenticatedSessionsRetrieve**](docs/CoreAPI.md#coreauthenticatedsessionsretrieve) | **GET** /core/authenticated_sessions/{uuid}/ | -*CoreAPI* | [**coreAuthenticatedSessionsUsedByList**](docs/CoreAPI.md#coreauthenticatedsessionsusedbylist) | **GET** /core/authenticated_sessions/{uuid}/used_by/ | -*CoreAPI* | [**coreGroupsAddUserCreate**](docs/CoreAPI.md#coregroupsaddusercreate) | **POST** /core/groups/{group_uuid}/add_user/ | -*CoreAPI* | [**coreGroupsCreate**](docs/CoreAPI.md#coregroupscreate) | **POST** /core/groups/ | -*CoreAPI* | [**coreGroupsDestroy**](docs/CoreAPI.md#coregroupsdestroy) | **DELETE** /core/groups/{group_uuid}/ | -*CoreAPI* | [**coreGroupsList**](docs/CoreAPI.md#coregroupslist) | **GET** /core/groups/ | -*CoreAPI* | [**coreGroupsPartialUpdate**](docs/CoreAPI.md#coregroupspartialupdate) | **PATCH** /core/groups/{group_uuid}/ | -*CoreAPI* | [**coreGroupsRemoveUserCreate**](docs/CoreAPI.md#coregroupsremoveusercreate) | **POST** /core/groups/{group_uuid}/remove_user/ | -*CoreAPI* | [**coreGroupsRetrieve**](docs/CoreAPI.md#coregroupsretrieve) | **GET** /core/groups/{group_uuid}/ | -*CoreAPI* | [**coreGroupsUpdate**](docs/CoreAPI.md#coregroupsupdate) | **PUT** /core/groups/{group_uuid}/ | -*CoreAPI* | [**coreGroupsUsedByList**](docs/CoreAPI.md#coregroupsusedbylist) | **GET** /core/groups/{group_uuid}/used_by/ | -*CoreAPI* | [**coreTenantsCreate**](docs/CoreAPI.md#coretenantscreate) | **POST** /core/tenants/ | -*CoreAPI* | [**coreTenantsCurrentRetrieve**](docs/CoreAPI.md#coretenantscurrentretrieve) | **GET** /core/tenants/current/ | -*CoreAPI* | [**coreTenantsDestroy**](docs/CoreAPI.md#coretenantsdestroy) | **DELETE** /core/tenants/{tenant_uuid}/ | -*CoreAPI* | [**coreTenantsList**](docs/CoreAPI.md#coretenantslist) | **GET** /core/tenants/ | -*CoreAPI* | [**coreTenantsPartialUpdate**](docs/CoreAPI.md#coretenantspartialupdate) | **PATCH** /core/tenants/{tenant_uuid}/ | -*CoreAPI* | [**coreTenantsRetrieve**](docs/CoreAPI.md#coretenantsretrieve) | **GET** /core/tenants/{tenant_uuid}/ | -*CoreAPI* | [**coreTenantsUpdate**](docs/CoreAPI.md#coretenantsupdate) | **PUT** /core/tenants/{tenant_uuid}/ | -*CoreAPI* | [**coreTenantsUsedByList**](docs/CoreAPI.md#coretenantsusedbylist) | **GET** /core/tenants/{tenant_uuid}/used_by/ | -*CoreAPI* | [**coreTokensCreate**](docs/CoreAPI.md#coretokenscreate) | **POST** /core/tokens/ | -*CoreAPI* | [**coreTokensDestroy**](docs/CoreAPI.md#coretokensdestroy) | **DELETE** /core/tokens/{identifier}/ | -*CoreAPI* | [**coreTokensList**](docs/CoreAPI.md#coretokenslist) | **GET** /core/tokens/ | -*CoreAPI* | [**coreTokensPartialUpdate**](docs/CoreAPI.md#coretokenspartialupdate) | **PATCH** /core/tokens/{identifier}/ | -*CoreAPI* | [**coreTokensRetrieve**](docs/CoreAPI.md#coretokensretrieve) | **GET** /core/tokens/{identifier}/ | -*CoreAPI* | [**coreTokensSetKeyCreate**](docs/CoreAPI.md#coretokenssetkeycreate) | **POST** /core/tokens/{identifier}/set_key/ | -*CoreAPI* | [**coreTokensUpdate**](docs/CoreAPI.md#coretokensupdate) | **PUT** /core/tokens/{identifier}/ | -*CoreAPI* | [**coreTokensUsedByList**](docs/CoreAPI.md#coretokensusedbylist) | **GET** /core/tokens/{identifier}/used_by/ | -*CoreAPI* | [**coreTokensViewKeyRetrieve**](docs/CoreAPI.md#coretokensviewkeyretrieve) | **GET** /core/tokens/{identifier}/view_key/ | -*CoreAPI* | [**coreTransactionalApplicationsUpdate**](docs/CoreAPI.md#coretransactionalapplicationsupdate) | **PUT** /core/transactional/applications/ | -*CoreAPI* | [**coreUserConsentDestroy**](docs/CoreAPI.md#coreuserconsentdestroy) | **DELETE** /core/user_consent/{id}/ | -*CoreAPI* | [**coreUserConsentList**](docs/CoreAPI.md#coreuserconsentlist) | **GET** /core/user_consent/ | -*CoreAPI* | [**coreUserConsentRetrieve**](docs/CoreAPI.md#coreuserconsentretrieve) | **GET** /core/user_consent/{id}/ | -*CoreAPI* | [**coreUserConsentUsedByList**](docs/CoreAPI.md#coreuserconsentusedbylist) | **GET** /core/user_consent/{id}/used_by/ | -*CoreAPI* | [**coreUsersCreate**](docs/CoreAPI.md#coreuserscreate) | **POST** /core/users/ | -*CoreAPI* | [**coreUsersDestroy**](docs/CoreAPI.md#coreusersdestroy) | **DELETE** /core/users/{id}/ | -*CoreAPI* | [**coreUsersImpersonateCreate**](docs/CoreAPI.md#coreusersimpersonatecreate) | **POST** /core/users/{id}/impersonate/ | -*CoreAPI* | [**coreUsersImpersonateEndRetrieve**](docs/CoreAPI.md#coreusersimpersonateendretrieve) | **GET** /core/users/impersonate_end/ | -*CoreAPI* | [**coreUsersList**](docs/CoreAPI.md#coreuserslist) | **GET** /core/users/ | -*CoreAPI* | [**coreUsersMeRetrieve**](docs/CoreAPI.md#coreusersmeretrieve) | **GET** /core/users/me/ | -*CoreAPI* | [**coreUsersMetricsRetrieve**](docs/CoreAPI.md#coreusersmetricsretrieve) | **GET** /core/users/{id}/metrics/ | -*CoreAPI* | [**coreUsersPartialUpdate**](docs/CoreAPI.md#coreuserspartialupdate) | **PATCH** /core/users/{id}/ | -*CoreAPI* | [**coreUsersPathsRetrieve**](docs/CoreAPI.md#coreuserspathsretrieve) | **GET** /core/users/paths/ | -*CoreAPI* | [**coreUsersRecoveryEmailRetrieve**](docs/CoreAPI.md#coreusersrecoveryemailretrieve) | **GET** /core/users/{id}/recovery_email/ | -*CoreAPI* | [**coreUsersRecoveryRetrieve**](docs/CoreAPI.md#coreusersrecoveryretrieve) | **GET** /core/users/{id}/recovery/ | -*CoreAPI* | [**coreUsersRetrieve**](docs/CoreAPI.md#coreusersretrieve) | **GET** /core/users/{id}/ | -*CoreAPI* | [**coreUsersServiceAccountCreate**](docs/CoreAPI.md#coreusersserviceaccountcreate) | **POST** /core/users/service_account/ | -*CoreAPI* | [**coreUsersSetPasswordCreate**](docs/CoreAPI.md#coreuserssetpasswordcreate) | **POST** /core/users/{id}/set_password/ | -*CoreAPI* | [**coreUsersUpdate**](docs/CoreAPI.md#coreusersupdate) | **PUT** /core/users/{id}/ | -*CoreAPI* | [**coreUsersUsedByList**](docs/CoreAPI.md#coreusersusedbylist) | **GET** /core/users/{id}/used_by/ | -*CryptoAPI* | [**cryptoCertificatekeypairsCreate**](docs/CryptoAPI.md#cryptocertificatekeypairscreate) | **POST** /crypto/certificatekeypairs/ | -*CryptoAPI* | [**cryptoCertificatekeypairsDestroy**](docs/CryptoAPI.md#cryptocertificatekeypairsdestroy) | **DELETE** /crypto/certificatekeypairs/{kp_uuid}/ | -*CryptoAPI* | [**cryptoCertificatekeypairsGenerateCreate**](docs/CryptoAPI.md#cryptocertificatekeypairsgeneratecreate) | **POST** /crypto/certificatekeypairs/generate/ | -*CryptoAPI* | [**cryptoCertificatekeypairsList**](docs/CryptoAPI.md#cryptocertificatekeypairslist) | **GET** /crypto/certificatekeypairs/ | -*CryptoAPI* | [**cryptoCertificatekeypairsPartialUpdate**](docs/CryptoAPI.md#cryptocertificatekeypairspartialupdate) | **PATCH** /crypto/certificatekeypairs/{kp_uuid}/ | -*CryptoAPI* | [**cryptoCertificatekeypairsRetrieve**](docs/CryptoAPI.md#cryptocertificatekeypairsretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/ | -*CryptoAPI* | [**cryptoCertificatekeypairsUpdate**](docs/CryptoAPI.md#cryptocertificatekeypairsupdate) | **PUT** /crypto/certificatekeypairs/{kp_uuid}/ | -*CryptoAPI* | [**cryptoCertificatekeypairsUsedByList**](docs/CryptoAPI.md#cryptocertificatekeypairsusedbylist) | **GET** /crypto/certificatekeypairs/{kp_uuid}/used_by/ | -*CryptoAPI* | [**cryptoCertificatekeypairsViewCertificateRetrieve**](docs/CryptoAPI.md#cryptocertificatekeypairsviewcertificateretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_certificate/ | -*CryptoAPI* | [**cryptoCertificatekeypairsViewPrivateKeyRetrieve**](docs/CryptoAPI.md#cryptocertificatekeypairsviewprivatekeyretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_private_key/ | -*EnterpriseAPI* | [**enterpriseLicenseCreate**](docs/EnterpriseAPI.md#enterpriselicensecreate) | **POST** /enterprise/license/ | -*EnterpriseAPI* | [**enterpriseLicenseDestroy**](docs/EnterpriseAPI.md#enterpriselicensedestroy) | **DELETE** /enterprise/license/{license_uuid}/ | -*EnterpriseAPI* | [**enterpriseLicenseForecastRetrieve**](docs/EnterpriseAPI.md#enterpriselicenseforecastretrieve) | **GET** /enterprise/license/forecast/ | -*EnterpriseAPI* | [**enterpriseLicenseGetInstallIdRetrieve**](docs/EnterpriseAPI.md#enterpriselicensegetinstallidretrieve) | **GET** /enterprise/license/get_install_id/ | -*EnterpriseAPI* | [**enterpriseLicenseList**](docs/EnterpriseAPI.md#enterpriselicenselist) | **GET** /enterprise/license/ | -*EnterpriseAPI* | [**enterpriseLicensePartialUpdate**](docs/EnterpriseAPI.md#enterpriselicensepartialupdate) | **PATCH** /enterprise/license/{license_uuid}/ | -*EnterpriseAPI* | [**enterpriseLicenseRetrieve**](docs/EnterpriseAPI.md#enterpriselicenseretrieve) | **GET** /enterprise/license/{license_uuid}/ | -*EnterpriseAPI* | [**enterpriseLicenseSummaryRetrieve**](docs/EnterpriseAPI.md#enterpriselicensesummaryretrieve) | **GET** /enterprise/license/summary/ | -*EnterpriseAPI* | [**enterpriseLicenseUpdate**](docs/EnterpriseAPI.md#enterpriselicenseupdate) | **PUT** /enterprise/license/{license_uuid}/ | -*EnterpriseAPI* | [**enterpriseLicenseUsedByList**](docs/EnterpriseAPI.md#enterpriselicenseusedbylist) | **GET** /enterprise/license/{license_uuid}/used_by/ | -*EventsAPI* | [**eventsEventsActionsList**](docs/EventsAPI.md#eventseventsactionslist) | **GET** /events/events/actions/ | -*EventsAPI* | [**eventsEventsCreate**](docs/EventsAPI.md#eventseventscreate) | **POST** /events/events/ | -*EventsAPI* | [**eventsEventsDestroy**](docs/EventsAPI.md#eventseventsdestroy) | **DELETE** /events/events/{event_uuid}/ | -*EventsAPI* | [**eventsEventsList**](docs/EventsAPI.md#eventseventslist) | **GET** /events/events/ | -*EventsAPI* | [**eventsEventsPartialUpdate**](docs/EventsAPI.md#eventseventspartialupdate) | **PATCH** /events/events/{event_uuid}/ | -*EventsAPI* | [**eventsEventsPerMonthList**](docs/EventsAPI.md#eventseventspermonthlist) | **GET** /events/events/per_month/ | -*EventsAPI* | [**eventsEventsRetrieve**](docs/EventsAPI.md#eventseventsretrieve) | **GET** /events/events/{event_uuid}/ | -*EventsAPI* | [**eventsEventsTopPerUserList**](docs/EventsAPI.md#eventseventstopperuserlist) | **GET** /events/events/top_per_user/ | -*EventsAPI* | [**eventsEventsUpdate**](docs/EventsAPI.md#eventseventsupdate) | **PUT** /events/events/{event_uuid}/ | -*EventsAPI* | [**eventsEventsVolumeList**](docs/EventsAPI.md#eventseventsvolumelist) | **GET** /events/events/volume/ | -*EventsAPI* | [**eventsNotificationsDestroy**](docs/EventsAPI.md#eventsnotificationsdestroy) | **DELETE** /events/notifications/{uuid}/ | -*EventsAPI* | [**eventsNotificationsList**](docs/EventsAPI.md#eventsnotificationslist) | **GET** /events/notifications/ | -*EventsAPI* | [**eventsNotificationsMarkAllSeenCreate**](docs/EventsAPI.md#eventsnotificationsmarkallseencreate) | **POST** /events/notifications/mark_all_seen/ | -*EventsAPI* | [**eventsNotificationsPartialUpdate**](docs/EventsAPI.md#eventsnotificationspartialupdate) | **PATCH** /events/notifications/{uuid}/ | -*EventsAPI* | [**eventsNotificationsRetrieve**](docs/EventsAPI.md#eventsnotificationsretrieve) | **GET** /events/notifications/{uuid}/ | -*EventsAPI* | [**eventsNotificationsUpdate**](docs/EventsAPI.md#eventsnotificationsupdate) | **PUT** /events/notifications/{uuid}/ | -*EventsAPI* | [**eventsNotificationsUsedByList**](docs/EventsAPI.md#eventsnotificationsusedbylist) | **GET** /events/notifications/{uuid}/used_by/ | -*EventsAPI* | [**eventsRulesCreate**](docs/EventsAPI.md#eventsrulescreate) | **POST** /events/rules/ | -*EventsAPI* | [**eventsRulesDestroy**](docs/EventsAPI.md#eventsrulesdestroy) | **DELETE** /events/rules/{pbm_uuid}/ | -*EventsAPI* | [**eventsRulesList**](docs/EventsAPI.md#eventsruleslist) | **GET** /events/rules/ | -*EventsAPI* | [**eventsRulesPartialUpdate**](docs/EventsAPI.md#eventsrulespartialupdate) | **PATCH** /events/rules/{pbm_uuid}/ | -*EventsAPI* | [**eventsRulesRetrieve**](docs/EventsAPI.md#eventsrulesretrieve) | **GET** /events/rules/{pbm_uuid}/ | -*EventsAPI* | [**eventsRulesUpdate**](docs/EventsAPI.md#eventsrulesupdate) | **PUT** /events/rules/{pbm_uuid}/ | -*EventsAPI* | [**eventsRulesUsedByList**](docs/EventsAPI.md#eventsrulesusedbylist) | **GET** /events/rules/{pbm_uuid}/used_by/ | -*EventsAPI* | [**eventsTransportsCreate**](docs/EventsAPI.md#eventstransportscreate) | **POST** /events/transports/ | -*EventsAPI* | [**eventsTransportsDestroy**](docs/EventsAPI.md#eventstransportsdestroy) | **DELETE** /events/transports/{uuid}/ | -*EventsAPI* | [**eventsTransportsList**](docs/EventsAPI.md#eventstransportslist) | **GET** /events/transports/ | -*EventsAPI* | [**eventsTransportsPartialUpdate**](docs/EventsAPI.md#eventstransportspartialupdate) | **PATCH** /events/transports/{uuid}/ | -*EventsAPI* | [**eventsTransportsRetrieve**](docs/EventsAPI.md#eventstransportsretrieve) | **GET** /events/transports/{uuid}/ | -*EventsAPI* | [**eventsTransportsTestCreate**](docs/EventsAPI.md#eventstransportstestcreate) | **POST** /events/transports/{uuid}/test/ | -*EventsAPI* | [**eventsTransportsUpdate**](docs/EventsAPI.md#eventstransportsupdate) | **PUT** /events/transports/{uuid}/ | -*EventsAPI* | [**eventsTransportsUsedByList**](docs/EventsAPI.md#eventstransportsusedbylist) | **GET** /events/transports/{uuid}/used_by/ | -*FlowsAPI* | [**flowsBindingsCreate**](docs/FlowsAPI.md#flowsbindingscreate) | **POST** /flows/bindings/ | -*FlowsAPI* | [**flowsBindingsDestroy**](docs/FlowsAPI.md#flowsbindingsdestroy) | **DELETE** /flows/bindings/{fsb_uuid}/ | -*FlowsAPI* | [**flowsBindingsList**](docs/FlowsAPI.md#flowsbindingslist) | **GET** /flows/bindings/ | -*FlowsAPI* | [**flowsBindingsPartialUpdate**](docs/FlowsAPI.md#flowsbindingspartialupdate) | **PATCH** /flows/bindings/{fsb_uuid}/ | -*FlowsAPI* | [**flowsBindingsRetrieve**](docs/FlowsAPI.md#flowsbindingsretrieve) | **GET** /flows/bindings/{fsb_uuid}/ | -*FlowsAPI* | [**flowsBindingsUpdate**](docs/FlowsAPI.md#flowsbindingsupdate) | **PUT** /flows/bindings/{fsb_uuid}/ | -*FlowsAPI* | [**flowsBindingsUsedByList**](docs/FlowsAPI.md#flowsbindingsusedbylist) | **GET** /flows/bindings/{fsb_uuid}/used_by/ | -*FlowsAPI* | [**flowsExecutorGet**](docs/FlowsAPI.md#flowsexecutorget) | **GET** /flows/executor/{flow_slug}/ | -*FlowsAPI* | [**flowsExecutorSolve**](docs/FlowsAPI.md#flowsexecutorsolve) | **POST** /flows/executor/{flow_slug}/ | -*FlowsAPI* | [**flowsInspectorGet**](docs/FlowsAPI.md#flowsinspectorget) | **GET** /flows/inspector/{flow_slug}/ | -*FlowsAPI* | [**flowsInstancesCacheClearCreate**](docs/FlowsAPI.md#flowsinstancescacheclearcreate) | **POST** /flows/instances/cache_clear/ | -*FlowsAPI* | [**flowsInstancesCacheInfoRetrieve**](docs/FlowsAPI.md#flowsinstancescacheinforetrieve) | **GET** /flows/instances/cache_info/ | -*FlowsAPI* | [**flowsInstancesCreate**](docs/FlowsAPI.md#flowsinstancescreate) | **POST** /flows/instances/ | -*FlowsAPI* | [**flowsInstancesDestroy**](docs/FlowsAPI.md#flowsinstancesdestroy) | **DELETE** /flows/instances/{slug}/ | -*FlowsAPI* | [**flowsInstancesDiagramRetrieve**](docs/FlowsAPI.md#flowsinstancesdiagramretrieve) | **GET** /flows/instances/{slug}/diagram/ | -*FlowsAPI* | [**flowsInstancesExecuteRetrieve**](docs/FlowsAPI.md#flowsinstancesexecuteretrieve) | **GET** /flows/instances/{slug}/execute/ | -*FlowsAPI* | [**flowsInstancesExportRetrieve**](docs/FlowsAPI.md#flowsinstancesexportretrieve) | **GET** /flows/instances/{slug}/export/ | -*FlowsAPI* | [**flowsInstancesImportCreate**](docs/FlowsAPI.md#flowsinstancesimportcreate) | **POST** /flows/instances/import/ | -*FlowsAPI* | [**flowsInstancesList**](docs/FlowsAPI.md#flowsinstanceslist) | **GET** /flows/instances/ | -*FlowsAPI* | [**flowsInstancesPartialUpdate**](docs/FlowsAPI.md#flowsinstancespartialupdate) | **PATCH** /flows/instances/{slug}/ | -*FlowsAPI* | [**flowsInstancesRetrieve**](docs/FlowsAPI.md#flowsinstancesretrieve) | **GET** /flows/instances/{slug}/ | -*FlowsAPI* | [**flowsInstancesSetBackgroundCreate**](docs/FlowsAPI.md#flowsinstancessetbackgroundcreate) | **POST** /flows/instances/{slug}/set_background/ | -*FlowsAPI* | [**flowsInstancesSetBackgroundUrlCreate**](docs/FlowsAPI.md#flowsinstancessetbackgroundurlcreate) | **POST** /flows/instances/{slug}/set_background_url/ | -*FlowsAPI* | [**flowsInstancesUpdate**](docs/FlowsAPI.md#flowsinstancesupdate) | **PUT** /flows/instances/{slug}/ | -*FlowsAPI* | [**flowsInstancesUsedByList**](docs/FlowsAPI.md#flowsinstancesusedbylist) | **GET** /flows/instances/{slug}/used_by/ | -*ManagedAPI* | [**managedBlueprintsApplyCreate**](docs/ManagedAPI.md#managedblueprintsapplycreate) | **POST** /managed/blueprints/{instance_uuid}/apply/ | -*ManagedAPI* | [**managedBlueprintsAvailableList**](docs/ManagedAPI.md#managedblueprintsavailablelist) | **GET** /managed/blueprints/available/ | -*ManagedAPI* | [**managedBlueprintsCreate**](docs/ManagedAPI.md#managedblueprintscreate) | **POST** /managed/blueprints/ | -*ManagedAPI* | [**managedBlueprintsDestroy**](docs/ManagedAPI.md#managedblueprintsdestroy) | **DELETE** /managed/blueprints/{instance_uuid}/ | -*ManagedAPI* | [**managedBlueprintsList**](docs/ManagedAPI.md#managedblueprintslist) | **GET** /managed/blueprints/ | -*ManagedAPI* | [**managedBlueprintsPartialUpdate**](docs/ManagedAPI.md#managedblueprintspartialupdate) | **PATCH** /managed/blueprints/{instance_uuid}/ | -*ManagedAPI* | [**managedBlueprintsRetrieve**](docs/ManagedAPI.md#managedblueprintsretrieve) | **GET** /managed/blueprints/{instance_uuid}/ | -*ManagedAPI* | [**managedBlueprintsUpdate**](docs/ManagedAPI.md#managedblueprintsupdate) | **PUT** /managed/blueprints/{instance_uuid}/ | -*ManagedAPI* | [**managedBlueprintsUsedByList**](docs/ManagedAPI.md#managedblueprintsusedbylist) | **GET** /managed/blueprints/{instance_uuid}/used_by/ | -*Oauth2API* | [**oauth2AccessTokensDestroy**](docs/Oauth2API.md#oauth2accesstokensdestroy) | **DELETE** /oauth2/access_tokens/{id}/ | -*Oauth2API* | [**oauth2AccessTokensList**](docs/Oauth2API.md#oauth2accesstokenslist) | **GET** /oauth2/access_tokens/ | -*Oauth2API* | [**oauth2AccessTokensRetrieve**](docs/Oauth2API.md#oauth2accesstokensretrieve) | **GET** /oauth2/access_tokens/{id}/ | -*Oauth2API* | [**oauth2AccessTokensUsedByList**](docs/Oauth2API.md#oauth2accesstokensusedbylist) | **GET** /oauth2/access_tokens/{id}/used_by/ | -*Oauth2API* | [**oauth2AuthorizationCodesDestroy**](docs/Oauth2API.md#oauth2authorizationcodesdestroy) | **DELETE** /oauth2/authorization_codes/{id}/ | -*Oauth2API* | [**oauth2AuthorizationCodesList**](docs/Oauth2API.md#oauth2authorizationcodeslist) | **GET** /oauth2/authorization_codes/ | -*Oauth2API* | [**oauth2AuthorizationCodesRetrieve**](docs/Oauth2API.md#oauth2authorizationcodesretrieve) | **GET** /oauth2/authorization_codes/{id}/ | -*Oauth2API* | [**oauth2AuthorizationCodesUsedByList**](docs/Oauth2API.md#oauth2authorizationcodesusedbylist) | **GET** /oauth2/authorization_codes/{id}/used_by/ | -*Oauth2API* | [**oauth2RefreshTokensDestroy**](docs/Oauth2API.md#oauth2refreshtokensdestroy) | **DELETE** /oauth2/refresh_tokens/{id}/ | -*Oauth2API* | [**oauth2RefreshTokensList**](docs/Oauth2API.md#oauth2refreshtokenslist) | **GET** /oauth2/refresh_tokens/ | -*Oauth2API* | [**oauth2RefreshTokensRetrieve**](docs/Oauth2API.md#oauth2refreshtokensretrieve) | **GET** /oauth2/refresh_tokens/{id}/ | -*Oauth2API* | [**oauth2RefreshTokensUsedByList**](docs/Oauth2API.md#oauth2refreshtokensusedbylist) | **GET** /oauth2/refresh_tokens/{id}/used_by/ | -*OutpostsAPI* | [**outpostsInstancesCreate**](docs/OutpostsAPI.md#outpostsinstancescreate) | **POST** /outposts/instances/ | -*OutpostsAPI* | [**outpostsInstancesDefaultSettingsRetrieve**](docs/OutpostsAPI.md#outpostsinstancesdefaultsettingsretrieve) | **GET** /outposts/instances/default_settings/ | -*OutpostsAPI* | [**outpostsInstancesDestroy**](docs/OutpostsAPI.md#outpostsinstancesdestroy) | **DELETE** /outposts/instances/{uuid}/ | -*OutpostsAPI* | [**outpostsInstancesHealthList**](docs/OutpostsAPI.md#outpostsinstanceshealthlist) | **GET** /outposts/instances/{uuid}/health/ | -*OutpostsAPI* | [**outpostsInstancesList**](docs/OutpostsAPI.md#outpostsinstanceslist) | **GET** /outposts/instances/ | -*OutpostsAPI* | [**outpostsInstancesPartialUpdate**](docs/OutpostsAPI.md#outpostsinstancespartialupdate) | **PATCH** /outposts/instances/{uuid}/ | -*OutpostsAPI* | [**outpostsInstancesRetrieve**](docs/OutpostsAPI.md#outpostsinstancesretrieve) | **GET** /outposts/instances/{uuid}/ | -*OutpostsAPI* | [**outpostsInstancesUpdate**](docs/OutpostsAPI.md#outpostsinstancesupdate) | **PUT** /outposts/instances/{uuid}/ | -*OutpostsAPI* | [**outpostsInstancesUsedByList**](docs/OutpostsAPI.md#outpostsinstancesusedbylist) | **GET** /outposts/instances/{uuid}/used_by/ | -*OutpostsAPI* | [**outpostsLdapList**](docs/OutpostsAPI.md#outpostsldaplist) | **GET** /outposts/ldap/ | -*OutpostsAPI* | [**outpostsLdapRetrieve**](docs/OutpostsAPI.md#outpostsldapretrieve) | **GET** /outposts/ldap/{id}/ | -*OutpostsAPI* | [**outpostsProxyList**](docs/OutpostsAPI.md#outpostsproxylist) | **GET** /outposts/proxy/ | -*OutpostsAPI* | [**outpostsProxyRetrieve**](docs/OutpostsAPI.md#outpostsproxyretrieve) | **GET** /outposts/proxy/{id}/ | -*OutpostsAPI* | [**outpostsRadiusList**](docs/OutpostsAPI.md#outpostsradiuslist) | **GET** /outposts/radius/ | -*OutpostsAPI* | [**outpostsRadiusRetrieve**](docs/OutpostsAPI.md#outpostsradiusretrieve) | **GET** /outposts/radius/{id}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllDestroy**](docs/OutpostsAPI.md#outpostsserviceconnectionsalldestroy) | **DELETE** /outposts/service_connections/all/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllList**](docs/OutpostsAPI.md#outpostsserviceconnectionsalllist) | **GET** /outposts/service_connections/all/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllRetrieve**](docs/OutpostsAPI.md#outpostsserviceconnectionsallretrieve) | **GET** /outposts/service_connections/all/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllStateRetrieve**](docs/OutpostsAPI.md#outpostsserviceconnectionsallstateretrieve) | **GET** /outposts/service_connections/all/{uuid}/state/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllTypesList**](docs/OutpostsAPI.md#outpostsserviceconnectionsalltypeslist) | **GET** /outposts/service_connections/all/types/ | -*OutpostsAPI* | [**outpostsServiceConnectionsAllUsedByList**](docs/OutpostsAPI.md#outpostsserviceconnectionsallusedbylist) | **GET** /outposts/service_connections/all/{uuid}/used_by/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerCreate**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockercreate) | **POST** /outposts/service_connections/docker/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerDestroy**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerdestroy) | **DELETE** /outposts/service_connections/docker/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerList**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerlist) | **GET** /outposts/service_connections/docker/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerPartialUpdate**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerpartialupdate) | **PATCH** /outposts/service_connections/docker/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerRetrieve**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerretrieve) | **GET** /outposts/service_connections/docker/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerUpdate**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerupdate) | **PUT** /outposts/service_connections/docker/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsDockerUsedByList**](docs/OutpostsAPI.md#outpostsserviceconnectionsdockerusedbylist) | **GET** /outposts/service_connections/docker/{uuid}/used_by/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesCreate**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetescreate) | **POST** /outposts/service_connections/kubernetes/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesDestroy**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetesdestroy) | **DELETE** /outposts/service_connections/kubernetes/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesList**](docs/OutpostsAPI.md#outpostsserviceconnectionskuberneteslist) | **GET** /outposts/service_connections/kubernetes/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesPartialUpdate**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetespartialupdate) | **PATCH** /outposts/service_connections/kubernetes/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesRetrieve**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetesretrieve) | **GET** /outposts/service_connections/kubernetes/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesUpdate**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetesupdate) | **PUT** /outposts/service_connections/kubernetes/{uuid}/ | -*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesUsedByList**](docs/OutpostsAPI.md#outpostsserviceconnectionskubernetesusedbylist) | **GET** /outposts/service_connections/kubernetes/{uuid}/used_by/ | -*PoliciesAPI* | [**policiesAllCacheClearCreate**](docs/PoliciesAPI.md#policiesallcacheclearcreate) | **POST** /policies/all/cache_clear/ | -*PoliciesAPI* | [**policiesAllCacheInfoRetrieve**](docs/PoliciesAPI.md#policiesallcacheinforetrieve) | **GET** /policies/all/cache_info/ | -*PoliciesAPI* | [**policiesAllDestroy**](docs/PoliciesAPI.md#policiesalldestroy) | **DELETE** /policies/all/{policy_uuid}/ | -*PoliciesAPI* | [**policiesAllList**](docs/PoliciesAPI.md#policiesalllist) | **GET** /policies/all/ | -*PoliciesAPI* | [**policiesAllRetrieve**](docs/PoliciesAPI.md#policiesallretrieve) | **GET** /policies/all/{policy_uuid}/ | -*PoliciesAPI* | [**policiesAllTestCreate**](docs/PoliciesAPI.md#policiesalltestcreate) | **POST** /policies/all/{policy_uuid}/test/ | -*PoliciesAPI* | [**policiesAllTypesList**](docs/PoliciesAPI.md#policiesalltypeslist) | **GET** /policies/all/types/ | -*PoliciesAPI* | [**policiesAllUsedByList**](docs/PoliciesAPI.md#policiesallusedbylist) | **GET** /policies/all/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesBindingsCreate**](docs/PoliciesAPI.md#policiesbindingscreate) | **POST** /policies/bindings/ | -*PoliciesAPI* | [**policiesBindingsDestroy**](docs/PoliciesAPI.md#policiesbindingsdestroy) | **DELETE** /policies/bindings/{policy_binding_uuid}/ | -*PoliciesAPI* | [**policiesBindingsList**](docs/PoliciesAPI.md#policiesbindingslist) | **GET** /policies/bindings/ | -*PoliciesAPI* | [**policiesBindingsPartialUpdate**](docs/PoliciesAPI.md#policiesbindingspartialupdate) | **PATCH** /policies/bindings/{policy_binding_uuid}/ | -*PoliciesAPI* | [**policiesBindingsRetrieve**](docs/PoliciesAPI.md#policiesbindingsretrieve) | **GET** /policies/bindings/{policy_binding_uuid}/ | -*PoliciesAPI* | [**policiesBindingsUpdate**](docs/PoliciesAPI.md#policiesbindingsupdate) | **PUT** /policies/bindings/{policy_binding_uuid}/ | -*PoliciesAPI* | [**policiesBindingsUsedByList**](docs/PoliciesAPI.md#policiesbindingsusedbylist) | **GET** /policies/bindings/{policy_binding_uuid}/used_by/ | -*PoliciesAPI* | [**policiesDummyCreate**](docs/PoliciesAPI.md#policiesdummycreate) | **POST** /policies/dummy/ | -*PoliciesAPI* | [**policiesDummyDestroy**](docs/PoliciesAPI.md#policiesdummydestroy) | **DELETE** /policies/dummy/{policy_uuid}/ | -*PoliciesAPI* | [**policiesDummyList**](docs/PoliciesAPI.md#policiesdummylist) | **GET** /policies/dummy/ | -*PoliciesAPI* | [**policiesDummyPartialUpdate**](docs/PoliciesAPI.md#policiesdummypartialupdate) | **PATCH** /policies/dummy/{policy_uuid}/ | -*PoliciesAPI* | [**policiesDummyRetrieve**](docs/PoliciesAPI.md#policiesdummyretrieve) | **GET** /policies/dummy/{policy_uuid}/ | -*PoliciesAPI* | [**policiesDummyUpdate**](docs/PoliciesAPI.md#policiesdummyupdate) | **PUT** /policies/dummy/{policy_uuid}/ | -*PoliciesAPI* | [**policiesDummyUsedByList**](docs/PoliciesAPI.md#policiesdummyusedbylist) | **GET** /policies/dummy/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesEventMatcherCreate**](docs/PoliciesAPI.md#policieseventmatchercreate) | **POST** /policies/event_matcher/ | -*PoliciesAPI* | [**policiesEventMatcherDestroy**](docs/PoliciesAPI.md#policieseventmatcherdestroy) | **DELETE** /policies/event_matcher/{policy_uuid}/ | -*PoliciesAPI* | [**policiesEventMatcherList**](docs/PoliciesAPI.md#policieseventmatcherlist) | **GET** /policies/event_matcher/ | -*PoliciesAPI* | [**policiesEventMatcherPartialUpdate**](docs/PoliciesAPI.md#policieseventmatcherpartialupdate) | **PATCH** /policies/event_matcher/{policy_uuid}/ | -*PoliciesAPI* | [**policiesEventMatcherRetrieve**](docs/PoliciesAPI.md#policieseventmatcherretrieve) | **GET** /policies/event_matcher/{policy_uuid}/ | -*PoliciesAPI* | [**policiesEventMatcherUpdate**](docs/PoliciesAPI.md#policieseventmatcherupdate) | **PUT** /policies/event_matcher/{policy_uuid}/ | -*PoliciesAPI* | [**policiesEventMatcherUsedByList**](docs/PoliciesAPI.md#policieseventmatcherusedbylist) | **GET** /policies/event_matcher/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesExpressionCreate**](docs/PoliciesAPI.md#policiesexpressioncreate) | **POST** /policies/expression/ | -*PoliciesAPI* | [**policiesExpressionDestroy**](docs/PoliciesAPI.md#policiesexpressiondestroy) | **DELETE** /policies/expression/{policy_uuid}/ | -*PoliciesAPI* | [**policiesExpressionList**](docs/PoliciesAPI.md#policiesexpressionlist) | **GET** /policies/expression/ | -*PoliciesAPI* | [**policiesExpressionPartialUpdate**](docs/PoliciesAPI.md#policiesexpressionpartialupdate) | **PATCH** /policies/expression/{policy_uuid}/ | -*PoliciesAPI* | [**policiesExpressionRetrieve**](docs/PoliciesAPI.md#policiesexpressionretrieve) | **GET** /policies/expression/{policy_uuid}/ | -*PoliciesAPI* | [**policiesExpressionUpdate**](docs/PoliciesAPI.md#policiesexpressionupdate) | **PUT** /policies/expression/{policy_uuid}/ | -*PoliciesAPI* | [**policiesExpressionUsedByList**](docs/PoliciesAPI.md#policiesexpressionusedbylist) | **GET** /policies/expression/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesPasswordCreate**](docs/PoliciesAPI.md#policiespasswordcreate) | **POST** /policies/password/ | -*PoliciesAPI* | [**policiesPasswordDestroy**](docs/PoliciesAPI.md#policiespassworddestroy) | **DELETE** /policies/password/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordExpiryCreate**](docs/PoliciesAPI.md#policiespasswordexpirycreate) | **POST** /policies/password_expiry/ | -*PoliciesAPI* | [**policiesPasswordExpiryDestroy**](docs/PoliciesAPI.md#policiespasswordexpirydestroy) | **DELETE** /policies/password_expiry/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordExpiryList**](docs/PoliciesAPI.md#policiespasswordexpirylist) | **GET** /policies/password_expiry/ | -*PoliciesAPI* | [**policiesPasswordExpiryPartialUpdate**](docs/PoliciesAPI.md#policiespasswordexpirypartialupdate) | **PATCH** /policies/password_expiry/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordExpiryRetrieve**](docs/PoliciesAPI.md#policiespasswordexpiryretrieve) | **GET** /policies/password_expiry/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordExpiryUpdate**](docs/PoliciesAPI.md#policiespasswordexpiryupdate) | **PUT** /policies/password_expiry/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordExpiryUsedByList**](docs/PoliciesAPI.md#policiespasswordexpiryusedbylist) | **GET** /policies/password_expiry/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesPasswordList**](docs/PoliciesAPI.md#policiespasswordlist) | **GET** /policies/password/ | -*PoliciesAPI* | [**policiesPasswordPartialUpdate**](docs/PoliciesAPI.md#policiespasswordpartialupdate) | **PATCH** /policies/password/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordRetrieve**](docs/PoliciesAPI.md#policiespasswordretrieve) | **GET** /policies/password/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordUpdate**](docs/PoliciesAPI.md#policiespasswordupdate) | **PUT** /policies/password/{policy_uuid}/ | -*PoliciesAPI* | [**policiesPasswordUsedByList**](docs/PoliciesAPI.md#policiespasswordusedbylist) | **GET** /policies/password/{policy_uuid}/used_by/ | -*PoliciesAPI* | [**policiesReputationCreate**](docs/PoliciesAPI.md#policiesreputationcreate) | **POST** /policies/reputation/ | -*PoliciesAPI* | [**policiesReputationDestroy**](docs/PoliciesAPI.md#policiesreputationdestroy) | **DELETE** /policies/reputation/{policy_uuid}/ | -*PoliciesAPI* | [**policiesReputationList**](docs/PoliciesAPI.md#policiesreputationlist) | **GET** /policies/reputation/ | -*PoliciesAPI* | [**policiesReputationPartialUpdate**](docs/PoliciesAPI.md#policiesreputationpartialupdate) | **PATCH** /policies/reputation/{policy_uuid}/ | -*PoliciesAPI* | [**policiesReputationRetrieve**](docs/PoliciesAPI.md#policiesreputationretrieve) | **GET** /policies/reputation/{policy_uuid}/ | -*PoliciesAPI* | [**policiesReputationScoresDestroy**](docs/PoliciesAPI.md#policiesreputationscoresdestroy) | **DELETE** /policies/reputation/scores/{reputation_uuid}/ | -*PoliciesAPI* | [**policiesReputationScoresList**](docs/PoliciesAPI.md#policiesreputationscoreslist) | **GET** /policies/reputation/scores/ | -*PoliciesAPI* | [**policiesReputationScoresRetrieve**](docs/PoliciesAPI.md#policiesreputationscoresretrieve) | **GET** /policies/reputation/scores/{reputation_uuid}/ | -*PoliciesAPI* | [**policiesReputationScoresUsedByList**](docs/PoliciesAPI.md#policiesreputationscoresusedbylist) | **GET** /policies/reputation/scores/{reputation_uuid}/used_by/ | -*PoliciesAPI* | [**policiesReputationUpdate**](docs/PoliciesAPI.md#policiesreputationupdate) | **PUT** /policies/reputation/{policy_uuid}/ | -*PoliciesAPI* | [**policiesReputationUsedByList**](docs/PoliciesAPI.md#policiesreputationusedbylist) | **GET** /policies/reputation/{policy_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsAllDestroy**](docs/PropertymappingsAPI.md#propertymappingsalldestroy) | **DELETE** /propertymappings/all/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsAllList**](docs/PropertymappingsAPI.md#propertymappingsalllist) | **GET** /propertymappings/all/ | -*PropertymappingsAPI* | [**propertymappingsAllRetrieve**](docs/PropertymappingsAPI.md#propertymappingsallretrieve) | **GET** /propertymappings/all/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsAllTestCreate**](docs/PropertymappingsAPI.md#propertymappingsalltestcreate) | **POST** /propertymappings/all/{pm_uuid}/test/ | -*PropertymappingsAPI* | [**propertymappingsAllTypesList**](docs/PropertymappingsAPI.md#propertymappingsalltypeslist) | **GET** /propertymappings/all/types/ | -*PropertymappingsAPI* | [**propertymappingsAllUsedByList**](docs/PropertymappingsAPI.md#propertymappingsallusedbylist) | **GET** /propertymappings/all/{pm_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsLdapCreate**](docs/PropertymappingsAPI.md#propertymappingsldapcreate) | **POST** /propertymappings/ldap/ | -*PropertymappingsAPI* | [**propertymappingsLdapDestroy**](docs/PropertymappingsAPI.md#propertymappingsldapdestroy) | **DELETE** /propertymappings/ldap/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsLdapList**](docs/PropertymappingsAPI.md#propertymappingsldaplist) | **GET** /propertymappings/ldap/ | -*PropertymappingsAPI* | [**propertymappingsLdapPartialUpdate**](docs/PropertymappingsAPI.md#propertymappingsldappartialupdate) | **PATCH** /propertymappings/ldap/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsLdapRetrieve**](docs/PropertymappingsAPI.md#propertymappingsldapretrieve) | **GET** /propertymappings/ldap/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsLdapUpdate**](docs/PropertymappingsAPI.md#propertymappingsldapupdate) | **PUT** /propertymappings/ldap/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsLdapUsedByList**](docs/PropertymappingsAPI.md#propertymappingsldapusedbylist) | **GET** /propertymappings/ldap/{pm_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsNotificationCreate**](docs/PropertymappingsAPI.md#propertymappingsnotificationcreate) | **POST** /propertymappings/notification/ | -*PropertymappingsAPI* | [**propertymappingsNotificationDestroy**](docs/PropertymappingsAPI.md#propertymappingsnotificationdestroy) | **DELETE** /propertymappings/notification/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsNotificationList**](docs/PropertymappingsAPI.md#propertymappingsnotificationlist) | **GET** /propertymappings/notification/ | -*PropertymappingsAPI* | [**propertymappingsNotificationPartialUpdate**](docs/PropertymappingsAPI.md#propertymappingsnotificationpartialupdate) | **PATCH** /propertymappings/notification/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsNotificationRetrieve**](docs/PropertymappingsAPI.md#propertymappingsnotificationretrieve) | **GET** /propertymappings/notification/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsNotificationUpdate**](docs/PropertymappingsAPI.md#propertymappingsnotificationupdate) | **PUT** /propertymappings/notification/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsNotificationUsedByList**](docs/PropertymappingsAPI.md#propertymappingsnotificationusedbylist) | **GET** /propertymappings/notification/{pm_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsSamlCreate**](docs/PropertymappingsAPI.md#propertymappingssamlcreate) | **POST** /propertymappings/saml/ | -*PropertymappingsAPI* | [**propertymappingsSamlDestroy**](docs/PropertymappingsAPI.md#propertymappingssamldestroy) | **DELETE** /propertymappings/saml/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsSamlList**](docs/PropertymappingsAPI.md#propertymappingssamllist) | **GET** /propertymappings/saml/ | -*PropertymappingsAPI* | [**propertymappingsSamlPartialUpdate**](docs/PropertymappingsAPI.md#propertymappingssamlpartialupdate) | **PATCH** /propertymappings/saml/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsSamlRetrieve**](docs/PropertymappingsAPI.md#propertymappingssamlretrieve) | **GET** /propertymappings/saml/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsSamlUpdate**](docs/PropertymappingsAPI.md#propertymappingssamlupdate) | **PUT** /propertymappings/saml/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsSamlUsedByList**](docs/PropertymappingsAPI.md#propertymappingssamlusedbylist) | **GET** /propertymappings/saml/{pm_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsScimCreate**](docs/PropertymappingsAPI.md#propertymappingsscimcreate) | **POST** /propertymappings/scim/ | -*PropertymappingsAPI* | [**propertymappingsScimDestroy**](docs/PropertymappingsAPI.md#propertymappingsscimdestroy) | **DELETE** /propertymappings/scim/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScimList**](docs/PropertymappingsAPI.md#propertymappingsscimlist) | **GET** /propertymappings/scim/ | -*PropertymappingsAPI* | [**propertymappingsScimPartialUpdate**](docs/PropertymappingsAPI.md#propertymappingsscimpartialupdate) | **PATCH** /propertymappings/scim/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScimRetrieve**](docs/PropertymappingsAPI.md#propertymappingsscimretrieve) | **GET** /propertymappings/scim/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScimUpdate**](docs/PropertymappingsAPI.md#propertymappingsscimupdate) | **PUT** /propertymappings/scim/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScimUsedByList**](docs/PropertymappingsAPI.md#propertymappingsscimusedbylist) | **GET** /propertymappings/scim/{pm_uuid}/used_by/ | -*PropertymappingsAPI* | [**propertymappingsScopeCreate**](docs/PropertymappingsAPI.md#propertymappingsscopecreate) | **POST** /propertymappings/scope/ | -*PropertymappingsAPI* | [**propertymappingsScopeDestroy**](docs/PropertymappingsAPI.md#propertymappingsscopedestroy) | **DELETE** /propertymappings/scope/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScopeList**](docs/PropertymappingsAPI.md#propertymappingsscopelist) | **GET** /propertymappings/scope/ | -*PropertymappingsAPI* | [**propertymappingsScopePartialUpdate**](docs/PropertymappingsAPI.md#propertymappingsscopepartialupdate) | **PATCH** /propertymappings/scope/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScopeRetrieve**](docs/PropertymappingsAPI.md#propertymappingsscoperetrieve) | **GET** /propertymappings/scope/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScopeUpdate**](docs/PropertymappingsAPI.md#propertymappingsscopeupdate) | **PUT** /propertymappings/scope/{pm_uuid}/ | -*PropertymappingsAPI* | [**propertymappingsScopeUsedByList**](docs/PropertymappingsAPI.md#propertymappingsscopeusedbylist) | **GET** /propertymappings/scope/{pm_uuid}/used_by/ | -*ProvidersAPI* | [**providersAllDestroy**](docs/ProvidersAPI.md#providersalldestroy) | **DELETE** /providers/all/{id}/ | -*ProvidersAPI* | [**providersAllList**](docs/ProvidersAPI.md#providersalllist) | **GET** /providers/all/ | -*ProvidersAPI* | [**providersAllRetrieve**](docs/ProvidersAPI.md#providersallretrieve) | **GET** /providers/all/{id}/ | -*ProvidersAPI* | [**providersAllTypesList**](docs/ProvidersAPI.md#providersalltypeslist) | **GET** /providers/all/types/ | -*ProvidersAPI* | [**providersAllUsedByList**](docs/ProvidersAPI.md#providersallusedbylist) | **GET** /providers/all/{id}/used_by/ | -*ProvidersAPI* | [**providersLdapCreate**](docs/ProvidersAPI.md#providersldapcreate) | **POST** /providers/ldap/ | -*ProvidersAPI* | [**providersLdapDestroy**](docs/ProvidersAPI.md#providersldapdestroy) | **DELETE** /providers/ldap/{id}/ | -*ProvidersAPI* | [**providersLdapList**](docs/ProvidersAPI.md#providersldaplist) | **GET** /providers/ldap/ | -*ProvidersAPI* | [**providersLdapPartialUpdate**](docs/ProvidersAPI.md#providersldappartialupdate) | **PATCH** /providers/ldap/{id}/ | -*ProvidersAPI* | [**providersLdapRetrieve**](docs/ProvidersAPI.md#providersldapretrieve) | **GET** /providers/ldap/{id}/ | -*ProvidersAPI* | [**providersLdapUpdate**](docs/ProvidersAPI.md#providersldapupdate) | **PUT** /providers/ldap/{id}/ | -*ProvidersAPI* | [**providersLdapUsedByList**](docs/ProvidersAPI.md#providersldapusedbylist) | **GET** /providers/ldap/{id}/used_by/ | -*ProvidersAPI* | [**providersOauth2Create**](docs/ProvidersAPI.md#providersoauth2create) | **POST** /providers/oauth2/ | -*ProvidersAPI* | [**providersOauth2Destroy**](docs/ProvidersAPI.md#providersoauth2destroy) | **DELETE** /providers/oauth2/{id}/ | -*ProvidersAPI* | [**providersOauth2List**](docs/ProvidersAPI.md#providersoauth2list) | **GET** /providers/oauth2/ | -*ProvidersAPI* | [**providersOauth2PartialUpdate**](docs/ProvidersAPI.md#providersoauth2partialupdate) | **PATCH** /providers/oauth2/{id}/ | -*ProvidersAPI* | [**providersOauth2PreviewUserRetrieve**](docs/ProvidersAPI.md#providersoauth2previewuserretrieve) | **GET** /providers/oauth2/{id}/preview_user/ | -*ProvidersAPI* | [**providersOauth2Retrieve**](docs/ProvidersAPI.md#providersoauth2retrieve) | **GET** /providers/oauth2/{id}/ | -*ProvidersAPI* | [**providersOauth2SetupUrlsRetrieve**](docs/ProvidersAPI.md#providersoauth2setupurlsretrieve) | **GET** /providers/oauth2/{id}/setup_urls/ | -*ProvidersAPI* | [**providersOauth2Update**](docs/ProvidersAPI.md#providersoauth2update) | **PUT** /providers/oauth2/{id}/ | -*ProvidersAPI* | [**providersOauth2UsedByList**](docs/ProvidersAPI.md#providersoauth2usedbylist) | **GET** /providers/oauth2/{id}/used_by/ | -*ProvidersAPI* | [**providersProxyCreate**](docs/ProvidersAPI.md#providersproxycreate) | **POST** /providers/proxy/ | -*ProvidersAPI* | [**providersProxyDestroy**](docs/ProvidersAPI.md#providersproxydestroy) | **DELETE** /providers/proxy/{id}/ | -*ProvidersAPI* | [**providersProxyList**](docs/ProvidersAPI.md#providersproxylist) | **GET** /providers/proxy/ | -*ProvidersAPI* | [**providersProxyPartialUpdate**](docs/ProvidersAPI.md#providersproxypartialupdate) | **PATCH** /providers/proxy/{id}/ | -*ProvidersAPI* | [**providersProxyRetrieve**](docs/ProvidersAPI.md#providersproxyretrieve) | **GET** /providers/proxy/{id}/ | -*ProvidersAPI* | [**providersProxyUpdate**](docs/ProvidersAPI.md#providersproxyupdate) | **PUT** /providers/proxy/{id}/ | -*ProvidersAPI* | [**providersProxyUsedByList**](docs/ProvidersAPI.md#providersproxyusedbylist) | **GET** /providers/proxy/{id}/used_by/ | -*ProvidersAPI* | [**providersRadiusCreate**](docs/ProvidersAPI.md#providersradiuscreate) | **POST** /providers/radius/ | -*ProvidersAPI* | [**providersRadiusDestroy**](docs/ProvidersAPI.md#providersradiusdestroy) | **DELETE** /providers/radius/{id}/ | -*ProvidersAPI* | [**providersRadiusList**](docs/ProvidersAPI.md#providersradiuslist) | **GET** /providers/radius/ | -*ProvidersAPI* | [**providersRadiusPartialUpdate**](docs/ProvidersAPI.md#providersradiuspartialupdate) | **PATCH** /providers/radius/{id}/ | -*ProvidersAPI* | [**providersRadiusRetrieve**](docs/ProvidersAPI.md#providersradiusretrieve) | **GET** /providers/radius/{id}/ | -*ProvidersAPI* | [**providersRadiusUpdate**](docs/ProvidersAPI.md#providersradiusupdate) | **PUT** /providers/radius/{id}/ | -*ProvidersAPI* | [**providersRadiusUsedByList**](docs/ProvidersAPI.md#providersradiususedbylist) | **GET** /providers/radius/{id}/used_by/ | -*ProvidersAPI* | [**providersSamlCreate**](docs/ProvidersAPI.md#providerssamlcreate) | **POST** /providers/saml/ | -*ProvidersAPI* | [**providersSamlDestroy**](docs/ProvidersAPI.md#providerssamldestroy) | **DELETE** /providers/saml/{id}/ | -*ProvidersAPI* | [**providersSamlImportMetadataCreate**](docs/ProvidersAPI.md#providerssamlimportmetadatacreate) | **POST** /providers/saml/import_metadata/ | -*ProvidersAPI* | [**providersSamlList**](docs/ProvidersAPI.md#providerssamllist) | **GET** /providers/saml/ | -*ProvidersAPI* | [**providersSamlMetadataRetrieve**](docs/ProvidersAPI.md#providerssamlmetadataretrieve) | **GET** /providers/saml/{id}/metadata/ | -*ProvidersAPI* | [**providersSamlPartialUpdate**](docs/ProvidersAPI.md#providerssamlpartialupdate) | **PATCH** /providers/saml/{id}/ | -*ProvidersAPI* | [**providersSamlPreviewUserRetrieve**](docs/ProvidersAPI.md#providerssamlpreviewuserretrieve) | **GET** /providers/saml/{id}/preview_user/ | -*ProvidersAPI* | [**providersSamlRetrieve**](docs/ProvidersAPI.md#providerssamlretrieve) | **GET** /providers/saml/{id}/ | -*ProvidersAPI* | [**providersSamlUpdate**](docs/ProvidersAPI.md#providerssamlupdate) | **PUT** /providers/saml/{id}/ | -*ProvidersAPI* | [**providersSamlUsedByList**](docs/ProvidersAPI.md#providerssamlusedbylist) | **GET** /providers/saml/{id}/used_by/ | -*ProvidersAPI* | [**providersScimCreate**](docs/ProvidersAPI.md#providersscimcreate) | **POST** /providers/scim/ | -*ProvidersAPI* | [**providersScimDestroy**](docs/ProvidersAPI.md#providersscimdestroy) | **DELETE** /providers/scim/{id}/ | -*ProvidersAPI* | [**providersScimList**](docs/ProvidersAPI.md#providersscimlist) | **GET** /providers/scim/ | -*ProvidersAPI* | [**providersScimPartialUpdate**](docs/ProvidersAPI.md#providersscimpartialupdate) | **PATCH** /providers/scim/{id}/ | -*ProvidersAPI* | [**providersScimRetrieve**](docs/ProvidersAPI.md#providersscimretrieve) | **GET** /providers/scim/{id}/ | -*ProvidersAPI* | [**providersScimSyncStatusRetrieve**](docs/ProvidersAPI.md#providersscimsyncstatusretrieve) | **GET** /providers/scim/{id}/sync_status/ | -*ProvidersAPI* | [**providersScimUpdate**](docs/ProvidersAPI.md#providersscimupdate) | **PUT** /providers/scim/{id}/ | -*ProvidersAPI* | [**providersScimUsedByList**](docs/ProvidersAPI.md#providersscimusedbylist) | **GET** /providers/scim/{id}/used_by/ | -*RbacAPI* | [**rbacPermissionsAssignedByRolesAssignCreate**](docs/RbacAPI.md#rbacpermissionsassignedbyrolesassigncreate) | **POST** /rbac/permissions/assigned_by_roles/{uuid}/assign/ | -*RbacAPI* | [**rbacPermissionsAssignedByRolesList**](docs/RbacAPI.md#rbacpermissionsassignedbyroleslist) | **GET** /rbac/permissions/assigned_by_roles/ | -*RbacAPI* | [**rbacPermissionsAssignedByRolesUnassignPartialUpdate**](docs/RbacAPI.md#rbacpermissionsassignedbyrolesunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_roles/{uuid}/unassign/ | -*RbacAPI* | [**rbacPermissionsAssignedByUsersAssignCreate**](docs/RbacAPI.md#rbacpermissionsassignedbyusersassigncreate) | **POST** /rbac/permissions/assigned_by_users/{id}/assign/ | -*RbacAPI* | [**rbacPermissionsAssignedByUsersList**](docs/RbacAPI.md#rbacpermissionsassignedbyuserslist) | **GET** /rbac/permissions/assigned_by_users/ | -*RbacAPI* | [**rbacPermissionsAssignedByUsersUnassignPartialUpdate**](docs/RbacAPI.md#rbacpermissionsassignedbyusersunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_users/{id}/unassign/ | -*RbacAPI* | [**rbacPermissionsList**](docs/RbacAPI.md#rbacpermissionslist) | **GET** /rbac/permissions/ | -*RbacAPI* | [**rbacPermissionsRetrieve**](docs/RbacAPI.md#rbacpermissionsretrieve) | **GET** /rbac/permissions/{id}/ | -*RbacAPI* | [**rbacPermissionsRolesList**](docs/RbacAPI.md#rbacpermissionsroleslist) | **GET** /rbac/permissions/roles/ | -*RbacAPI* | [**rbacPermissionsUsersList**](docs/RbacAPI.md#rbacpermissionsuserslist) | **GET** /rbac/permissions/users/ | -*RbacAPI* | [**rbacRolesCreate**](docs/RbacAPI.md#rbacrolescreate) | **POST** /rbac/roles/ | -*RbacAPI* | [**rbacRolesDestroy**](docs/RbacAPI.md#rbacrolesdestroy) | **DELETE** /rbac/roles/{uuid}/ | -*RbacAPI* | [**rbacRolesList**](docs/RbacAPI.md#rbacroleslist) | **GET** /rbac/roles/ | -*RbacAPI* | [**rbacRolesPartialUpdate**](docs/RbacAPI.md#rbacrolespartialupdate) | **PATCH** /rbac/roles/{uuid}/ | -*RbacAPI* | [**rbacRolesRetrieve**](docs/RbacAPI.md#rbacrolesretrieve) | **GET** /rbac/roles/{uuid}/ | -*RbacAPI* | [**rbacRolesUpdate**](docs/RbacAPI.md#rbacrolesupdate) | **PUT** /rbac/roles/{uuid}/ | -*RbacAPI* | [**rbacRolesUsedByList**](docs/RbacAPI.md#rbacrolesusedbylist) | **GET** /rbac/roles/{uuid}/used_by/ | -*RootAPI* | [**rootConfigRetrieve**](docs/RootAPI.md#rootconfigretrieve) | **GET** /root/config/ | -*SchemaAPI* | [**schemaRetrieve**](docs/SchemaAPI.md#schemaretrieve) | **GET** /schema/ | -*SourcesAPI* | [**sourcesAllDestroy**](docs/SourcesAPI.md#sourcesalldestroy) | **DELETE** /sources/all/{slug}/ | -*SourcesAPI* | [**sourcesAllList**](docs/SourcesAPI.md#sourcesalllist) | **GET** /sources/all/ | -*SourcesAPI* | [**sourcesAllRetrieve**](docs/SourcesAPI.md#sourcesallretrieve) | **GET** /sources/all/{slug}/ | -*SourcesAPI* | [**sourcesAllSetIconCreate**](docs/SourcesAPI.md#sourcesallseticoncreate) | **POST** /sources/all/{slug}/set_icon/ | -*SourcesAPI* | [**sourcesAllSetIconUrlCreate**](docs/SourcesAPI.md#sourcesallseticonurlcreate) | **POST** /sources/all/{slug}/set_icon_url/ | -*SourcesAPI* | [**sourcesAllTypesList**](docs/SourcesAPI.md#sourcesalltypeslist) | **GET** /sources/all/types/ | -*SourcesAPI* | [**sourcesAllUsedByList**](docs/SourcesAPI.md#sourcesallusedbylist) | **GET** /sources/all/{slug}/used_by/ | -*SourcesAPI* | [**sourcesAllUserSettingsList**](docs/SourcesAPI.md#sourcesallusersettingslist) | **GET** /sources/all/user_settings/ | -*SourcesAPI* | [**sourcesLdapCreate**](docs/SourcesAPI.md#sourcesldapcreate) | **POST** /sources/ldap/ | -*SourcesAPI* | [**sourcesLdapDebugRetrieve**](docs/SourcesAPI.md#sourcesldapdebugretrieve) | **GET** /sources/ldap/{slug}/debug/ | -*SourcesAPI* | [**sourcesLdapDestroy**](docs/SourcesAPI.md#sourcesldapdestroy) | **DELETE** /sources/ldap/{slug}/ | -*SourcesAPI* | [**sourcesLdapList**](docs/SourcesAPI.md#sourcesldaplist) | **GET** /sources/ldap/ | -*SourcesAPI* | [**sourcesLdapPartialUpdate**](docs/SourcesAPI.md#sourcesldappartialupdate) | **PATCH** /sources/ldap/{slug}/ | -*SourcesAPI* | [**sourcesLdapRetrieve**](docs/SourcesAPI.md#sourcesldapretrieve) | **GET** /sources/ldap/{slug}/ | -*SourcesAPI* | [**sourcesLdapSyncStatusRetrieve**](docs/SourcesAPI.md#sourcesldapsyncstatusretrieve) | **GET** /sources/ldap/{slug}/sync_status/ | -*SourcesAPI* | [**sourcesLdapUpdate**](docs/SourcesAPI.md#sourcesldapupdate) | **PUT** /sources/ldap/{slug}/ | -*SourcesAPI* | [**sourcesLdapUsedByList**](docs/SourcesAPI.md#sourcesldapusedbylist) | **GET** /sources/ldap/{slug}/used_by/ | -*SourcesAPI* | [**sourcesOauthCreate**](docs/SourcesAPI.md#sourcesoauthcreate) | **POST** /sources/oauth/ | -*SourcesAPI* | [**sourcesOauthDestroy**](docs/SourcesAPI.md#sourcesoauthdestroy) | **DELETE** /sources/oauth/{slug}/ | -*SourcesAPI* | [**sourcesOauthList**](docs/SourcesAPI.md#sourcesoauthlist) | **GET** /sources/oauth/ | -*SourcesAPI* | [**sourcesOauthPartialUpdate**](docs/SourcesAPI.md#sourcesoauthpartialupdate) | **PATCH** /sources/oauth/{slug}/ | -*SourcesAPI* | [**sourcesOauthRetrieve**](docs/SourcesAPI.md#sourcesoauthretrieve) | **GET** /sources/oauth/{slug}/ | -*SourcesAPI* | [**sourcesOauthSourceTypesList**](docs/SourcesAPI.md#sourcesoauthsourcetypeslist) | **GET** /sources/oauth/source_types/ | -*SourcesAPI* | [**sourcesOauthUpdate**](docs/SourcesAPI.md#sourcesoauthupdate) | **PUT** /sources/oauth/{slug}/ | -*SourcesAPI* | [**sourcesOauthUsedByList**](docs/SourcesAPI.md#sourcesoauthusedbylist) | **GET** /sources/oauth/{slug}/used_by/ | -*SourcesAPI* | [**sourcesPlexCreate**](docs/SourcesAPI.md#sourcesplexcreate) | **POST** /sources/plex/ | -*SourcesAPI* | [**sourcesPlexDestroy**](docs/SourcesAPI.md#sourcesplexdestroy) | **DELETE** /sources/plex/{slug}/ | -*SourcesAPI* | [**sourcesPlexList**](docs/SourcesAPI.md#sourcesplexlist) | **GET** /sources/plex/ | -*SourcesAPI* | [**sourcesPlexPartialUpdate**](docs/SourcesAPI.md#sourcesplexpartialupdate) | **PATCH** /sources/plex/{slug}/ | -*SourcesAPI* | [**sourcesPlexRedeemTokenAuthenticatedCreate**](docs/SourcesAPI.md#sourcesplexredeemtokenauthenticatedcreate) | **POST** /sources/plex/redeem_token_authenticated/ | -*SourcesAPI* | [**sourcesPlexRedeemTokenCreate**](docs/SourcesAPI.md#sourcesplexredeemtokencreate) | **POST** /sources/plex/redeem_token/ | -*SourcesAPI* | [**sourcesPlexRetrieve**](docs/SourcesAPI.md#sourcesplexretrieve) | **GET** /sources/plex/{slug}/ | -*SourcesAPI* | [**sourcesPlexUpdate**](docs/SourcesAPI.md#sourcesplexupdate) | **PUT** /sources/plex/{slug}/ | -*SourcesAPI* | [**sourcesPlexUsedByList**](docs/SourcesAPI.md#sourcesplexusedbylist) | **GET** /sources/plex/{slug}/used_by/ | -*SourcesAPI* | [**sourcesSamlCreate**](docs/SourcesAPI.md#sourcessamlcreate) | **POST** /sources/saml/ | -*SourcesAPI* | [**sourcesSamlDestroy**](docs/SourcesAPI.md#sourcessamldestroy) | **DELETE** /sources/saml/{slug}/ | -*SourcesAPI* | [**sourcesSamlList**](docs/SourcesAPI.md#sourcessamllist) | **GET** /sources/saml/ | -*SourcesAPI* | [**sourcesSamlMetadataRetrieve**](docs/SourcesAPI.md#sourcessamlmetadataretrieve) | **GET** /sources/saml/{slug}/metadata/ | -*SourcesAPI* | [**sourcesSamlPartialUpdate**](docs/SourcesAPI.md#sourcessamlpartialupdate) | **PATCH** /sources/saml/{slug}/ | -*SourcesAPI* | [**sourcesSamlRetrieve**](docs/SourcesAPI.md#sourcessamlretrieve) | **GET** /sources/saml/{slug}/ | -*SourcesAPI* | [**sourcesSamlUpdate**](docs/SourcesAPI.md#sourcessamlupdate) | **PUT** /sources/saml/{slug}/ | -*SourcesAPI* | [**sourcesSamlUsedByList**](docs/SourcesAPI.md#sourcessamlusedbylist) | **GET** /sources/saml/{slug}/used_by/ | -*SourcesAPI* | [**sourcesUserConnectionsAllDestroy**](docs/SourcesAPI.md#sourcesuserconnectionsalldestroy) | **DELETE** /sources/user_connections/all/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsAllList**](docs/SourcesAPI.md#sourcesuserconnectionsalllist) | **GET** /sources/user_connections/all/ | -*SourcesAPI* | [**sourcesUserConnectionsAllPartialUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsallpartialupdate) | **PATCH** /sources/user_connections/all/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsAllRetrieve**](docs/SourcesAPI.md#sourcesuserconnectionsallretrieve) | **GET** /sources/user_connections/all/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsAllUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsallupdate) | **PUT** /sources/user_connections/all/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsAllUsedByList**](docs/SourcesAPI.md#sourcesuserconnectionsallusedbylist) | **GET** /sources/user_connections/all/{id}/used_by/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthCreate**](docs/SourcesAPI.md#sourcesuserconnectionsoauthcreate) | **POST** /sources/user_connections/oauth/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthDestroy**](docs/SourcesAPI.md#sourcesuserconnectionsoauthdestroy) | **DELETE** /sources/user_connections/oauth/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthList**](docs/SourcesAPI.md#sourcesuserconnectionsoauthlist) | **GET** /sources/user_connections/oauth/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthPartialUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsoauthpartialupdate) | **PATCH** /sources/user_connections/oauth/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthRetrieve**](docs/SourcesAPI.md#sourcesuserconnectionsoauthretrieve) | **GET** /sources/user_connections/oauth/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsoauthupdate) | **PUT** /sources/user_connections/oauth/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsOauthUsedByList**](docs/SourcesAPI.md#sourcesuserconnectionsoauthusedbylist) | **GET** /sources/user_connections/oauth/{id}/used_by/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexCreate**](docs/SourcesAPI.md#sourcesuserconnectionsplexcreate) | **POST** /sources/user_connections/plex/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexDestroy**](docs/SourcesAPI.md#sourcesuserconnectionsplexdestroy) | **DELETE** /sources/user_connections/plex/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexList**](docs/SourcesAPI.md#sourcesuserconnectionsplexlist) | **GET** /sources/user_connections/plex/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexPartialUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsplexpartialupdate) | **PATCH** /sources/user_connections/plex/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexRetrieve**](docs/SourcesAPI.md#sourcesuserconnectionsplexretrieve) | **GET** /sources/user_connections/plex/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexUpdate**](docs/SourcesAPI.md#sourcesuserconnectionsplexupdate) | **PUT** /sources/user_connections/plex/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsPlexUsedByList**](docs/SourcesAPI.md#sourcesuserconnectionsplexusedbylist) | **GET** /sources/user_connections/plex/{id}/used_by/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlCreate**](docs/SourcesAPI.md#sourcesuserconnectionssamlcreate) | **POST** /sources/user_connections/saml/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlDestroy**](docs/SourcesAPI.md#sourcesuserconnectionssamldestroy) | **DELETE** /sources/user_connections/saml/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlList**](docs/SourcesAPI.md#sourcesuserconnectionssamllist) | **GET** /sources/user_connections/saml/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlPartialUpdate**](docs/SourcesAPI.md#sourcesuserconnectionssamlpartialupdate) | **PATCH** /sources/user_connections/saml/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlRetrieve**](docs/SourcesAPI.md#sourcesuserconnectionssamlretrieve) | **GET** /sources/user_connections/saml/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlUpdate**](docs/SourcesAPI.md#sourcesuserconnectionssamlupdate) | **PUT** /sources/user_connections/saml/{id}/ | -*SourcesAPI* | [**sourcesUserConnectionsSamlUsedByList**](docs/SourcesAPI.md#sourcesuserconnectionssamlusedbylist) | **GET** /sources/user_connections/saml/{id}/used_by/ | -*StagesAPI* | [**stagesAllDestroy**](docs/StagesAPI.md#stagesalldestroy) | **DELETE** /stages/all/{stage_uuid}/ | -*StagesAPI* | [**stagesAllList**](docs/StagesAPI.md#stagesalllist) | **GET** /stages/all/ | -*StagesAPI* | [**stagesAllRetrieve**](docs/StagesAPI.md#stagesallretrieve) | **GET** /stages/all/{stage_uuid}/ | -*StagesAPI* | [**stagesAllTypesList**](docs/StagesAPI.md#stagesalltypeslist) | **GET** /stages/all/types/ | -*StagesAPI* | [**stagesAllUsedByList**](docs/StagesAPI.md#stagesallusedbylist) | **GET** /stages/all/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAllUserSettingsList**](docs/StagesAPI.md#stagesallusersettingslist) | **GET** /stages/all/user_settings/ | -*StagesAPI* | [**stagesAuthenticatorDuoCreate**](docs/StagesAPI.md#stagesauthenticatorduocreate) | **POST** /stages/authenticator/duo/ | -*StagesAPI* | [**stagesAuthenticatorDuoDestroy**](docs/StagesAPI.md#stagesauthenticatorduodestroy) | **DELETE** /stages/authenticator/duo/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorDuoEnrollmentStatusCreate**](docs/StagesAPI.md#stagesauthenticatorduoenrollmentstatuscreate) | **POST** /stages/authenticator/duo/{stage_uuid}/enrollment_status/ | -*StagesAPI* | [**stagesAuthenticatorDuoImportDeviceManualCreate**](docs/StagesAPI.md#stagesauthenticatorduoimportdevicemanualcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_device_manual/ | -*StagesAPI* | [**stagesAuthenticatorDuoImportDevicesAutomaticCreate**](docs/StagesAPI.md#stagesauthenticatorduoimportdevicesautomaticcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/ | -*StagesAPI* | [**stagesAuthenticatorDuoList**](docs/StagesAPI.md#stagesauthenticatorduolist) | **GET** /stages/authenticator/duo/ | -*StagesAPI* | [**stagesAuthenticatorDuoPartialUpdate**](docs/StagesAPI.md#stagesauthenticatorduopartialupdate) | **PATCH** /stages/authenticator/duo/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorDuoRetrieve**](docs/StagesAPI.md#stagesauthenticatorduoretrieve) | **GET** /stages/authenticator/duo/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorDuoUpdate**](docs/StagesAPI.md#stagesauthenticatorduoupdate) | **PUT** /stages/authenticator/duo/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorDuoUsedByList**](docs/StagesAPI.md#stagesauthenticatorduousedbylist) | **GET** /stages/authenticator/duo/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAuthenticatorSmsCreate**](docs/StagesAPI.md#stagesauthenticatorsmscreate) | **POST** /stages/authenticator/sms/ | -*StagesAPI* | [**stagesAuthenticatorSmsDestroy**](docs/StagesAPI.md#stagesauthenticatorsmsdestroy) | **DELETE** /stages/authenticator/sms/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorSmsList**](docs/StagesAPI.md#stagesauthenticatorsmslist) | **GET** /stages/authenticator/sms/ | -*StagesAPI* | [**stagesAuthenticatorSmsPartialUpdate**](docs/StagesAPI.md#stagesauthenticatorsmspartialupdate) | **PATCH** /stages/authenticator/sms/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorSmsRetrieve**](docs/StagesAPI.md#stagesauthenticatorsmsretrieve) | **GET** /stages/authenticator/sms/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorSmsUpdate**](docs/StagesAPI.md#stagesauthenticatorsmsupdate) | **PUT** /stages/authenticator/sms/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorSmsUsedByList**](docs/StagesAPI.md#stagesauthenticatorsmsusedbylist) | **GET** /stages/authenticator/sms/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAuthenticatorStaticCreate**](docs/StagesAPI.md#stagesauthenticatorstaticcreate) | **POST** /stages/authenticator/static/ | -*StagesAPI* | [**stagesAuthenticatorStaticDestroy**](docs/StagesAPI.md#stagesauthenticatorstaticdestroy) | **DELETE** /stages/authenticator/static/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorStaticList**](docs/StagesAPI.md#stagesauthenticatorstaticlist) | **GET** /stages/authenticator/static/ | -*StagesAPI* | [**stagesAuthenticatorStaticPartialUpdate**](docs/StagesAPI.md#stagesauthenticatorstaticpartialupdate) | **PATCH** /stages/authenticator/static/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorStaticRetrieve**](docs/StagesAPI.md#stagesauthenticatorstaticretrieve) | **GET** /stages/authenticator/static/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorStaticUpdate**](docs/StagesAPI.md#stagesauthenticatorstaticupdate) | **PUT** /stages/authenticator/static/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorStaticUsedByList**](docs/StagesAPI.md#stagesauthenticatorstaticusedbylist) | **GET** /stages/authenticator/static/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAuthenticatorTotpCreate**](docs/StagesAPI.md#stagesauthenticatortotpcreate) | **POST** /stages/authenticator/totp/ | -*StagesAPI* | [**stagesAuthenticatorTotpDestroy**](docs/StagesAPI.md#stagesauthenticatortotpdestroy) | **DELETE** /stages/authenticator/totp/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorTotpList**](docs/StagesAPI.md#stagesauthenticatortotplist) | **GET** /stages/authenticator/totp/ | -*StagesAPI* | [**stagesAuthenticatorTotpPartialUpdate**](docs/StagesAPI.md#stagesauthenticatortotppartialupdate) | **PATCH** /stages/authenticator/totp/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorTotpRetrieve**](docs/StagesAPI.md#stagesauthenticatortotpretrieve) | **GET** /stages/authenticator/totp/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorTotpUpdate**](docs/StagesAPI.md#stagesauthenticatortotpupdate) | **PUT** /stages/authenticator/totp/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorTotpUsedByList**](docs/StagesAPI.md#stagesauthenticatortotpusedbylist) | **GET** /stages/authenticator/totp/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAuthenticatorValidateCreate**](docs/StagesAPI.md#stagesauthenticatorvalidatecreate) | **POST** /stages/authenticator/validate/ | -*StagesAPI* | [**stagesAuthenticatorValidateDestroy**](docs/StagesAPI.md#stagesauthenticatorvalidatedestroy) | **DELETE** /stages/authenticator/validate/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorValidateList**](docs/StagesAPI.md#stagesauthenticatorvalidatelist) | **GET** /stages/authenticator/validate/ | -*StagesAPI* | [**stagesAuthenticatorValidatePartialUpdate**](docs/StagesAPI.md#stagesauthenticatorvalidatepartialupdate) | **PATCH** /stages/authenticator/validate/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorValidateRetrieve**](docs/StagesAPI.md#stagesauthenticatorvalidateretrieve) | **GET** /stages/authenticator/validate/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorValidateUpdate**](docs/StagesAPI.md#stagesauthenticatorvalidateupdate) | **PUT** /stages/authenticator/validate/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorValidateUsedByList**](docs/StagesAPI.md#stagesauthenticatorvalidateusedbylist) | **GET** /stages/authenticator/validate/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnCreate**](docs/StagesAPI.md#stagesauthenticatorwebauthncreate) | **POST** /stages/authenticator/webauthn/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnDestroy**](docs/StagesAPI.md#stagesauthenticatorwebauthndestroy) | **DELETE** /stages/authenticator/webauthn/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnList**](docs/StagesAPI.md#stagesauthenticatorwebauthnlist) | **GET** /stages/authenticator/webauthn/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnPartialUpdate**](docs/StagesAPI.md#stagesauthenticatorwebauthnpartialupdate) | **PATCH** /stages/authenticator/webauthn/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnRetrieve**](docs/StagesAPI.md#stagesauthenticatorwebauthnretrieve) | **GET** /stages/authenticator/webauthn/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnUpdate**](docs/StagesAPI.md#stagesauthenticatorwebauthnupdate) | **PUT** /stages/authenticator/webauthn/{stage_uuid}/ | -*StagesAPI* | [**stagesAuthenticatorWebauthnUsedByList**](docs/StagesAPI.md#stagesauthenticatorwebauthnusedbylist) | **GET** /stages/authenticator/webauthn/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesCaptchaCreate**](docs/StagesAPI.md#stagescaptchacreate) | **POST** /stages/captcha/ | -*StagesAPI* | [**stagesCaptchaDestroy**](docs/StagesAPI.md#stagescaptchadestroy) | **DELETE** /stages/captcha/{stage_uuid}/ | -*StagesAPI* | [**stagesCaptchaList**](docs/StagesAPI.md#stagescaptchalist) | **GET** /stages/captcha/ | -*StagesAPI* | [**stagesCaptchaPartialUpdate**](docs/StagesAPI.md#stagescaptchapartialupdate) | **PATCH** /stages/captcha/{stage_uuid}/ | -*StagesAPI* | [**stagesCaptchaRetrieve**](docs/StagesAPI.md#stagescaptcharetrieve) | **GET** /stages/captcha/{stage_uuid}/ | -*StagesAPI* | [**stagesCaptchaUpdate**](docs/StagesAPI.md#stagescaptchaupdate) | **PUT** /stages/captcha/{stage_uuid}/ | -*StagesAPI* | [**stagesCaptchaUsedByList**](docs/StagesAPI.md#stagescaptchausedbylist) | **GET** /stages/captcha/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesConsentCreate**](docs/StagesAPI.md#stagesconsentcreate) | **POST** /stages/consent/ | -*StagesAPI* | [**stagesConsentDestroy**](docs/StagesAPI.md#stagesconsentdestroy) | **DELETE** /stages/consent/{stage_uuid}/ | -*StagesAPI* | [**stagesConsentList**](docs/StagesAPI.md#stagesconsentlist) | **GET** /stages/consent/ | -*StagesAPI* | [**stagesConsentPartialUpdate**](docs/StagesAPI.md#stagesconsentpartialupdate) | **PATCH** /stages/consent/{stage_uuid}/ | -*StagesAPI* | [**stagesConsentRetrieve**](docs/StagesAPI.md#stagesconsentretrieve) | **GET** /stages/consent/{stage_uuid}/ | -*StagesAPI* | [**stagesConsentUpdate**](docs/StagesAPI.md#stagesconsentupdate) | **PUT** /stages/consent/{stage_uuid}/ | -*StagesAPI* | [**stagesConsentUsedByList**](docs/StagesAPI.md#stagesconsentusedbylist) | **GET** /stages/consent/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesDenyCreate**](docs/StagesAPI.md#stagesdenycreate) | **POST** /stages/deny/ | -*StagesAPI* | [**stagesDenyDestroy**](docs/StagesAPI.md#stagesdenydestroy) | **DELETE** /stages/deny/{stage_uuid}/ | -*StagesAPI* | [**stagesDenyList**](docs/StagesAPI.md#stagesdenylist) | **GET** /stages/deny/ | -*StagesAPI* | [**stagesDenyPartialUpdate**](docs/StagesAPI.md#stagesdenypartialupdate) | **PATCH** /stages/deny/{stage_uuid}/ | -*StagesAPI* | [**stagesDenyRetrieve**](docs/StagesAPI.md#stagesdenyretrieve) | **GET** /stages/deny/{stage_uuid}/ | -*StagesAPI* | [**stagesDenyUpdate**](docs/StagesAPI.md#stagesdenyupdate) | **PUT** /stages/deny/{stage_uuid}/ | -*StagesAPI* | [**stagesDenyUsedByList**](docs/StagesAPI.md#stagesdenyusedbylist) | **GET** /stages/deny/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesDummyCreate**](docs/StagesAPI.md#stagesdummycreate) | **POST** /stages/dummy/ | -*StagesAPI* | [**stagesDummyDestroy**](docs/StagesAPI.md#stagesdummydestroy) | **DELETE** /stages/dummy/{stage_uuid}/ | -*StagesAPI* | [**stagesDummyList**](docs/StagesAPI.md#stagesdummylist) | **GET** /stages/dummy/ | -*StagesAPI* | [**stagesDummyPartialUpdate**](docs/StagesAPI.md#stagesdummypartialupdate) | **PATCH** /stages/dummy/{stage_uuid}/ | -*StagesAPI* | [**stagesDummyRetrieve**](docs/StagesAPI.md#stagesdummyretrieve) | **GET** /stages/dummy/{stage_uuid}/ | -*StagesAPI* | [**stagesDummyUpdate**](docs/StagesAPI.md#stagesdummyupdate) | **PUT** /stages/dummy/{stage_uuid}/ | -*StagesAPI* | [**stagesDummyUsedByList**](docs/StagesAPI.md#stagesdummyusedbylist) | **GET** /stages/dummy/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesEmailCreate**](docs/StagesAPI.md#stagesemailcreate) | **POST** /stages/email/ | -*StagesAPI* | [**stagesEmailDestroy**](docs/StagesAPI.md#stagesemaildestroy) | **DELETE** /stages/email/{stage_uuid}/ | -*StagesAPI* | [**stagesEmailList**](docs/StagesAPI.md#stagesemaillist) | **GET** /stages/email/ | -*StagesAPI* | [**stagesEmailPartialUpdate**](docs/StagesAPI.md#stagesemailpartialupdate) | **PATCH** /stages/email/{stage_uuid}/ | -*StagesAPI* | [**stagesEmailRetrieve**](docs/StagesAPI.md#stagesemailretrieve) | **GET** /stages/email/{stage_uuid}/ | -*StagesAPI* | [**stagesEmailTemplatesList**](docs/StagesAPI.md#stagesemailtemplateslist) | **GET** /stages/email/templates/ | -*StagesAPI* | [**stagesEmailUpdate**](docs/StagesAPI.md#stagesemailupdate) | **PUT** /stages/email/{stage_uuid}/ | -*StagesAPI* | [**stagesEmailUsedByList**](docs/StagesAPI.md#stagesemailusedbylist) | **GET** /stages/email/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesIdentificationCreate**](docs/StagesAPI.md#stagesidentificationcreate) | **POST** /stages/identification/ | -*StagesAPI* | [**stagesIdentificationDestroy**](docs/StagesAPI.md#stagesidentificationdestroy) | **DELETE** /stages/identification/{stage_uuid}/ | -*StagesAPI* | [**stagesIdentificationList**](docs/StagesAPI.md#stagesidentificationlist) | **GET** /stages/identification/ | -*StagesAPI* | [**stagesIdentificationPartialUpdate**](docs/StagesAPI.md#stagesidentificationpartialupdate) | **PATCH** /stages/identification/{stage_uuid}/ | -*StagesAPI* | [**stagesIdentificationRetrieve**](docs/StagesAPI.md#stagesidentificationretrieve) | **GET** /stages/identification/{stage_uuid}/ | -*StagesAPI* | [**stagesIdentificationUpdate**](docs/StagesAPI.md#stagesidentificationupdate) | **PUT** /stages/identification/{stage_uuid}/ | -*StagesAPI* | [**stagesIdentificationUsedByList**](docs/StagesAPI.md#stagesidentificationusedbylist) | **GET** /stages/identification/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesInvitationInvitationsCreate**](docs/StagesAPI.md#stagesinvitationinvitationscreate) | **POST** /stages/invitation/invitations/ | -*StagesAPI* | [**stagesInvitationInvitationsDestroy**](docs/StagesAPI.md#stagesinvitationinvitationsdestroy) | **DELETE** /stages/invitation/invitations/{invite_uuid}/ | -*StagesAPI* | [**stagesInvitationInvitationsList**](docs/StagesAPI.md#stagesinvitationinvitationslist) | **GET** /stages/invitation/invitations/ | -*StagesAPI* | [**stagesInvitationInvitationsPartialUpdate**](docs/StagesAPI.md#stagesinvitationinvitationspartialupdate) | **PATCH** /stages/invitation/invitations/{invite_uuid}/ | -*StagesAPI* | [**stagesInvitationInvitationsRetrieve**](docs/StagesAPI.md#stagesinvitationinvitationsretrieve) | **GET** /stages/invitation/invitations/{invite_uuid}/ | -*StagesAPI* | [**stagesInvitationInvitationsUpdate**](docs/StagesAPI.md#stagesinvitationinvitationsupdate) | **PUT** /stages/invitation/invitations/{invite_uuid}/ | -*StagesAPI* | [**stagesInvitationInvitationsUsedByList**](docs/StagesAPI.md#stagesinvitationinvitationsusedbylist) | **GET** /stages/invitation/invitations/{invite_uuid}/used_by/ | -*StagesAPI* | [**stagesInvitationStagesCreate**](docs/StagesAPI.md#stagesinvitationstagescreate) | **POST** /stages/invitation/stages/ | -*StagesAPI* | [**stagesInvitationStagesDestroy**](docs/StagesAPI.md#stagesinvitationstagesdestroy) | **DELETE** /stages/invitation/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesInvitationStagesList**](docs/StagesAPI.md#stagesinvitationstageslist) | **GET** /stages/invitation/stages/ | -*StagesAPI* | [**stagesInvitationStagesPartialUpdate**](docs/StagesAPI.md#stagesinvitationstagespartialupdate) | **PATCH** /stages/invitation/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesInvitationStagesRetrieve**](docs/StagesAPI.md#stagesinvitationstagesretrieve) | **GET** /stages/invitation/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesInvitationStagesUpdate**](docs/StagesAPI.md#stagesinvitationstagesupdate) | **PUT** /stages/invitation/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesInvitationStagesUsedByList**](docs/StagesAPI.md#stagesinvitationstagesusedbylist) | **GET** /stages/invitation/stages/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesPasswordCreate**](docs/StagesAPI.md#stagespasswordcreate) | **POST** /stages/password/ | -*StagesAPI* | [**stagesPasswordDestroy**](docs/StagesAPI.md#stagespassworddestroy) | **DELETE** /stages/password/{stage_uuid}/ | -*StagesAPI* | [**stagesPasswordList**](docs/StagesAPI.md#stagespasswordlist) | **GET** /stages/password/ | -*StagesAPI* | [**stagesPasswordPartialUpdate**](docs/StagesAPI.md#stagespasswordpartialupdate) | **PATCH** /stages/password/{stage_uuid}/ | -*StagesAPI* | [**stagesPasswordRetrieve**](docs/StagesAPI.md#stagespasswordretrieve) | **GET** /stages/password/{stage_uuid}/ | -*StagesAPI* | [**stagesPasswordUpdate**](docs/StagesAPI.md#stagespasswordupdate) | **PUT** /stages/password/{stage_uuid}/ | -*StagesAPI* | [**stagesPasswordUsedByList**](docs/StagesAPI.md#stagespasswordusedbylist) | **GET** /stages/password/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesPromptPromptsCreate**](docs/StagesAPI.md#stagespromptpromptscreate) | **POST** /stages/prompt/prompts/ | -*StagesAPI* | [**stagesPromptPromptsDestroy**](docs/StagesAPI.md#stagespromptpromptsdestroy) | **DELETE** /stages/prompt/prompts/{prompt_uuid}/ | -*StagesAPI* | [**stagesPromptPromptsList**](docs/StagesAPI.md#stagespromptpromptslist) | **GET** /stages/prompt/prompts/ | -*StagesAPI* | [**stagesPromptPromptsPartialUpdate**](docs/StagesAPI.md#stagespromptpromptspartialupdate) | **PATCH** /stages/prompt/prompts/{prompt_uuid}/ | -*StagesAPI* | [**stagesPromptPromptsPreviewCreate**](docs/StagesAPI.md#stagespromptpromptspreviewcreate) | **POST** /stages/prompt/prompts/preview/ | -*StagesAPI* | [**stagesPromptPromptsRetrieve**](docs/StagesAPI.md#stagespromptpromptsretrieve) | **GET** /stages/prompt/prompts/{prompt_uuid}/ | -*StagesAPI* | [**stagesPromptPromptsUpdate**](docs/StagesAPI.md#stagespromptpromptsupdate) | **PUT** /stages/prompt/prompts/{prompt_uuid}/ | -*StagesAPI* | [**stagesPromptPromptsUsedByList**](docs/StagesAPI.md#stagespromptpromptsusedbylist) | **GET** /stages/prompt/prompts/{prompt_uuid}/used_by/ | -*StagesAPI* | [**stagesPromptStagesCreate**](docs/StagesAPI.md#stagespromptstagescreate) | **POST** /stages/prompt/stages/ | -*StagesAPI* | [**stagesPromptStagesDestroy**](docs/StagesAPI.md#stagespromptstagesdestroy) | **DELETE** /stages/prompt/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesPromptStagesList**](docs/StagesAPI.md#stagespromptstageslist) | **GET** /stages/prompt/stages/ | -*StagesAPI* | [**stagesPromptStagesPartialUpdate**](docs/StagesAPI.md#stagespromptstagespartialupdate) | **PATCH** /stages/prompt/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesPromptStagesRetrieve**](docs/StagesAPI.md#stagespromptstagesretrieve) | **GET** /stages/prompt/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesPromptStagesUpdate**](docs/StagesAPI.md#stagespromptstagesupdate) | **PUT** /stages/prompt/stages/{stage_uuid}/ | -*StagesAPI* | [**stagesPromptStagesUsedByList**](docs/StagesAPI.md#stagespromptstagesusedbylist) | **GET** /stages/prompt/stages/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesUserDeleteCreate**](docs/StagesAPI.md#stagesuserdeletecreate) | **POST** /stages/user_delete/ | -*StagesAPI* | [**stagesUserDeleteDestroy**](docs/StagesAPI.md#stagesuserdeletedestroy) | **DELETE** /stages/user_delete/{stage_uuid}/ | -*StagesAPI* | [**stagesUserDeleteList**](docs/StagesAPI.md#stagesuserdeletelist) | **GET** /stages/user_delete/ | -*StagesAPI* | [**stagesUserDeletePartialUpdate**](docs/StagesAPI.md#stagesuserdeletepartialupdate) | **PATCH** /stages/user_delete/{stage_uuid}/ | -*StagesAPI* | [**stagesUserDeleteRetrieve**](docs/StagesAPI.md#stagesuserdeleteretrieve) | **GET** /stages/user_delete/{stage_uuid}/ | -*StagesAPI* | [**stagesUserDeleteUpdate**](docs/StagesAPI.md#stagesuserdeleteupdate) | **PUT** /stages/user_delete/{stage_uuid}/ | -*StagesAPI* | [**stagesUserDeleteUsedByList**](docs/StagesAPI.md#stagesuserdeleteusedbylist) | **GET** /stages/user_delete/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesUserLoginCreate**](docs/StagesAPI.md#stagesuserlogincreate) | **POST** /stages/user_login/ | -*StagesAPI* | [**stagesUserLoginDestroy**](docs/StagesAPI.md#stagesuserlogindestroy) | **DELETE** /stages/user_login/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLoginList**](docs/StagesAPI.md#stagesuserloginlist) | **GET** /stages/user_login/ | -*StagesAPI* | [**stagesUserLoginPartialUpdate**](docs/StagesAPI.md#stagesuserloginpartialupdate) | **PATCH** /stages/user_login/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLoginRetrieve**](docs/StagesAPI.md#stagesuserloginretrieve) | **GET** /stages/user_login/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLoginUpdate**](docs/StagesAPI.md#stagesuserloginupdate) | **PUT** /stages/user_login/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLoginUsedByList**](docs/StagesAPI.md#stagesuserloginusedbylist) | **GET** /stages/user_login/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesUserLogoutCreate**](docs/StagesAPI.md#stagesuserlogoutcreate) | **POST** /stages/user_logout/ | -*StagesAPI* | [**stagesUserLogoutDestroy**](docs/StagesAPI.md#stagesuserlogoutdestroy) | **DELETE** /stages/user_logout/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLogoutList**](docs/StagesAPI.md#stagesuserlogoutlist) | **GET** /stages/user_logout/ | -*StagesAPI* | [**stagesUserLogoutPartialUpdate**](docs/StagesAPI.md#stagesuserlogoutpartialupdate) | **PATCH** /stages/user_logout/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLogoutRetrieve**](docs/StagesAPI.md#stagesuserlogoutretrieve) | **GET** /stages/user_logout/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLogoutUpdate**](docs/StagesAPI.md#stagesuserlogoutupdate) | **PUT** /stages/user_logout/{stage_uuid}/ | -*StagesAPI* | [**stagesUserLogoutUsedByList**](docs/StagesAPI.md#stagesuserlogoutusedbylist) | **GET** /stages/user_logout/{stage_uuid}/used_by/ | -*StagesAPI* | [**stagesUserWriteCreate**](docs/StagesAPI.md#stagesuserwritecreate) | **POST** /stages/user_write/ | -*StagesAPI* | [**stagesUserWriteDestroy**](docs/StagesAPI.md#stagesuserwritedestroy) | **DELETE** /stages/user_write/{stage_uuid}/ | -*StagesAPI* | [**stagesUserWriteList**](docs/StagesAPI.md#stagesuserwritelist) | **GET** /stages/user_write/ | -*StagesAPI* | [**stagesUserWritePartialUpdate**](docs/StagesAPI.md#stagesuserwritepartialupdate) | **PATCH** /stages/user_write/{stage_uuid}/ | -*StagesAPI* | [**stagesUserWriteRetrieve**](docs/StagesAPI.md#stagesuserwriteretrieve) | **GET** /stages/user_write/{stage_uuid}/ | -*StagesAPI* | [**stagesUserWriteUpdate**](docs/StagesAPI.md#stagesuserwriteupdate) | **PUT** /stages/user_write/{stage_uuid}/ | -*StagesAPI* | [**stagesUserWriteUsedByList**](docs/StagesAPI.md#stagesuserwriteusedbylist) | **GET** /stages/user_write/{stage_uuid}/used_by/ | +*AdminAPI* | [**adminAppsList**](AdminAPI.md#adminappslist) | **GET** /admin/apps/ | +*AdminAPI* | [**adminMetricsRetrieve**](AdminAPI.md#adminmetricsretrieve) | **GET** /admin/metrics/ | +*AdminAPI* | [**adminModelsList**](AdminAPI.md#adminmodelslist) | **GET** /admin/models/ | +*AdminAPI* | [**adminSystemCreate**](AdminAPI.md#adminsystemcreate) | **POST** /admin/system/ | +*AdminAPI* | [**adminSystemRetrieve**](AdminAPI.md#adminsystemretrieve) | **GET** /admin/system/ | +*AdminAPI* | [**adminSystemTasksList**](AdminAPI.md#adminsystemtaskslist) | **GET** /admin/system_tasks/ | +*AdminAPI* | [**adminSystemTasksRetrieve**](AdminAPI.md#adminsystemtasksretrieve) | **GET** /admin/system_tasks/{id}/ | +*AdminAPI* | [**adminSystemTasksRetryCreate**](AdminAPI.md#adminsystemtasksretrycreate) | **POST** /admin/system_tasks/{id}/retry/ | +*AdminAPI* | [**adminVersionRetrieve**](AdminAPI.md#adminversionretrieve) | **GET** /admin/version/ | +*AdminAPI* | [**adminWorkersRetrieve**](AdminAPI.md#adminworkersretrieve) | **GET** /admin/workers/ | +*AuthenticatorsAPI* | [**authenticatorsAdminAllList**](AuthenticatorsAPI.md#authenticatorsadminalllist) | **GET** /authenticators/admin/all/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoCreate**](AuthenticatorsAPI.md#authenticatorsadminduocreate) | **POST** /authenticators/admin/duo/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoDestroy**](AuthenticatorsAPI.md#authenticatorsadminduodestroy) | **DELETE** /authenticators/admin/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoList**](AuthenticatorsAPI.md#authenticatorsadminduolist) | **GET** /authenticators/admin/duo/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminduopartialupdate) | **PATCH** /authenticators/admin/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoRetrieve**](AuthenticatorsAPI.md#authenticatorsadminduoretrieve) | **GET** /authenticators/admin/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminDuoUpdate**](AuthenticatorsAPI.md#authenticatorsadminduoupdate) | **PUT** /authenticators/admin/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobileCreate**](AuthenticatorsAPI.md#authenticatorsadminmobilecreate) | **POST** /authenticators/admin/mobile/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobileDestroy**](AuthenticatorsAPI.md#authenticatorsadminmobiledestroy) | **DELETE** /authenticators/admin/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobileList**](AuthenticatorsAPI.md#authenticatorsadminmobilelist) | **GET** /authenticators/admin/mobile/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobilePartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminmobilepartialupdate) | **PATCH** /authenticators/admin/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobileRetrieve**](AuthenticatorsAPI.md#authenticatorsadminmobileretrieve) | **GET** /authenticators/admin/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminMobileUpdate**](AuthenticatorsAPI.md#authenticatorsadminmobileupdate) | **PUT** /authenticators/admin/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsCreate**](AuthenticatorsAPI.md#authenticatorsadminsmscreate) | **POST** /authenticators/admin/sms/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsDestroy**](AuthenticatorsAPI.md#authenticatorsadminsmsdestroy) | **DELETE** /authenticators/admin/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsList**](AuthenticatorsAPI.md#authenticatorsadminsmslist) | **GET** /authenticators/admin/sms/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminsmspartialupdate) | **PATCH** /authenticators/admin/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsRetrieve**](AuthenticatorsAPI.md#authenticatorsadminsmsretrieve) | **GET** /authenticators/admin/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminSmsUpdate**](AuthenticatorsAPI.md#authenticatorsadminsmsupdate) | **PUT** /authenticators/admin/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticCreate**](AuthenticatorsAPI.md#authenticatorsadminstaticcreate) | **POST** /authenticators/admin/static/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticDestroy**](AuthenticatorsAPI.md#authenticatorsadminstaticdestroy) | **DELETE** /authenticators/admin/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticList**](AuthenticatorsAPI.md#authenticatorsadminstaticlist) | **GET** /authenticators/admin/static/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminstaticpartialupdate) | **PATCH** /authenticators/admin/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticRetrieve**](AuthenticatorsAPI.md#authenticatorsadminstaticretrieve) | **GET** /authenticators/admin/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminStaticUpdate**](AuthenticatorsAPI.md#authenticatorsadminstaticupdate) | **PUT** /authenticators/admin/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpCreate**](AuthenticatorsAPI.md#authenticatorsadmintotpcreate) | **POST** /authenticators/admin/totp/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpDestroy**](AuthenticatorsAPI.md#authenticatorsadmintotpdestroy) | **DELETE** /authenticators/admin/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpList**](AuthenticatorsAPI.md#authenticatorsadmintotplist) | **GET** /authenticators/admin/totp/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadmintotppartialupdate) | **PATCH** /authenticators/admin/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpRetrieve**](AuthenticatorsAPI.md#authenticatorsadmintotpretrieve) | **GET** /authenticators/admin/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminTotpUpdate**](AuthenticatorsAPI.md#authenticatorsadmintotpupdate) | **PUT** /authenticators/admin/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnCreate**](AuthenticatorsAPI.md#authenticatorsadminwebauthncreate) | **POST** /authenticators/admin/webauthn/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnDestroy**](AuthenticatorsAPI.md#authenticatorsadminwebauthndestroy) | **DELETE** /authenticators/admin/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnList**](AuthenticatorsAPI.md#authenticatorsadminwebauthnlist) | **GET** /authenticators/admin/webauthn/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminwebauthnpartialupdate) | **PATCH** /authenticators/admin/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnRetrieve**](AuthenticatorsAPI.md#authenticatorsadminwebauthnretrieve) | **GET** /authenticators/admin/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAdminWebauthnUpdate**](AuthenticatorsAPI.md#authenticatorsadminwebauthnupdate) | **PUT** /authenticators/admin/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsAllList**](AuthenticatorsAPI.md#authenticatorsalllist) | **GET** /authenticators/all/ | +*AuthenticatorsAPI* | [**authenticatorsDuoDestroy**](AuthenticatorsAPI.md#authenticatorsduodestroy) | **DELETE** /authenticators/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsDuoList**](AuthenticatorsAPI.md#authenticatorsduolist) | **GET** /authenticators/duo/ | +*AuthenticatorsAPI* | [**authenticatorsDuoPartialUpdate**](AuthenticatorsAPI.md#authenticatorsduopartialupdate) | **PATCH** /authenticators/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsDuoRetrieve**](AuthenticatorsAPI.md#authenticatorsduoretrieve) | **GET** /authenticators/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsDuoUpdate**](AuthenticatorsAPI.md#authenticatorsduoupdate) | **PUT** /authenticators/duo/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsDuoUsedByList**](AuthenticatorsAPI.md#authenticatorsduousedbylist) | **GET** /authenticators/duo/{id}/used_by/ | +*AuthenticatorsAPI* | [**authenticatorsMobileCheckInCreate**](AuthenticatorsAPI.md#authenticatorsmobilecheckincreate) | **POST** /authenticators/mobile/{uuid}/check_in/ | +*AuthenticatorsAPI* | [**authenticatorsMobileDestroy**](AuthenticatorsAPI.md#authenticatorsmobiledestroy) | **DELETE** /authenticators/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsMobileEnrollmentCallbackCreate**](AuthenticatorsAPI.md#authenticatorsmobileenrollmentcallbackcreate) | **POST** /authenticators/mobile/{uuid}/enrollment_callback/ | +*AuthenticatorsAPI* | [**authenticatorsMobileEnrollmentStatusCreate**](AuthenticatorsAPI.md#authenticatorsmobileenrollmentstatuscreate) | **POST** /authenticators/mobile/{uuid}/enrollment_status/ | +*AuthenticatorsAPI* | [**authenticatorsMobileList**](AuthenticatorsAPI.md#authenticatorsmobilelist) | **GET** /authenticators/mobile/ | +*AuthenticatorsAPI* | [**authenticatorsMobilePartialUpdate**](AuthenticatorsAPI.md#authenticatorsmobilepartialupdate) | **PATCH** /authenticators/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsMobileReceiveResponseCreate**](AuthenticatorsAPI.md#authenticatorsmobilereceiveresponsecreate) | **POST** /authenticators/mobile/{uuid}/receive_response/ | +*AuthenticatorsAPI* | [**authenticatorsMobileRetrieve**](AuthenticatorsAPI.md#authenticatorsmobileretrieve) | **GET** /authenticators/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsMobileSetNotificationKeyCreate**](AuthenticatorsAPI.md#authenticatorsmobilesetnotificationkeycreate) | **POST** /authenticators/mobile/{uuid}/set_notification_key/ | +*AuthenticatorsAPI* | [**authenticatorsMobileUpdate**](AuthenticatorsAPI.md#authenticatorsmobileupdate) | **PUT** /authenticators/mobile/{uuid}/ | +*AuthenticatorsAPI* | [**authenticatorsMobileUsedByList**](AuthenticatorsAPI.md#authenticatorsmobileusedbylist) | **GET** /authenticators/mobile/{uuid}/used_by/ | +*AuthenticatorsAPI* | [**authenticatorsSmsDestroy**](AuthenticatorsAPI.md#authenticatorssmsdestroy) | **DELETE** /authenticators/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsSmsList**](AuthenticatorsAPI.md#authenticatorssmslist) | **GET** /authenticators/sms/ | +*AuthenticatorsAPI* | [**authenticatorsSmsPartialUpdate**](AuthenticatorsAPI.md#authenticatorssmspartialupdate) | **PATCH** /authenticators/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsSmsRetrieve**](AuthenticatorsAPI.md#authenticatorssmsretrieve) | **GET** /authenticators/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsSmsUpdate**](AuthenticatorsAPI.md#authenticatorssmsupdate) | **PUT** /authenticators/sms/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsSmsUsedByList**](AuthenticatorsAPI.md#authenticatorssmsusedbylist) | **GET** /authenticators/sms/{id}/used_by/ | +*AuthenticatorsAPI* | [**authenticatorsStaticDestroy**](AuthenticatorsAPI.md#authenticatorsstaticdestroy) | **DELETE** /authenticators/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsStaticList**](AuthenticatorsAPI.md#authenticatorsstaticlist) | **GET** /authenticators/static/ | +*AuthenticatorsAPI* | [**authenticatorsStaticPartialUpdate**](AuthenticatorsAPI.md#authenticatorsstaticpartialupdate) | **PATCH** /authenticators/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsStaticRetrieve**](AuthenticatorsAPI.md#authenticatorsstaticretrieve) | **GET** /authenticators/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsStaticUpdate**](AuthenticatorsAPI.md#authenticatorsstaticupdate) | **PUT** /authenticators/static/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsStaticUsedByList**](AuthenticatorsAPI.md#authenticatorsstaticusedbylist) | **GET** /authenticators/static/{id}/used_by/ | +*AuthenticatorsAPI* | [**authenticatorsTotpDestroy**](AuthenticatorsAPI.md#authenticatorstotpdestroy) | **DELETE** /authenticators/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsTotpList**](AuthenticatorsAPI.md#authenticatorstotplist) | **GET** /authenticators/totp/ | +*AuthenticatorsAPI* | [**authenticatorsTotpPartialUpdate**](AuthenticatorsAPI.md#authenticatorstotppartialupdate) | **PATCH** /authenticators/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsTotpRetrieve**](AuthenticatorsAPI.md#authenticatorstotpretrieve) | **GET** /authenticators/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsTotpUpdate**](AuthenticatorsAPI.md#authenticatorstotpupdate) | **PUT** /authenticators/totp/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsTotpUsedByList**](AuthenticatorsAPI.md#authenticatorstotpusedbylist) | **GET** /authenticators/totp/{id}/used_by/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnDestroy**](AuthenticatorsAPI.md#authenticatorswebauthndestroy) | **DELETE** /authenticators/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnList**](AuthenticatorsAPI.md#authenticatorswebauthnlist) | **GET** /authenticators/webauthn/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnPartialUpdate**](AuthenticatorsAPI.md#authenticatorswebauthnpartialupdate) | **PATCH** /authenticators/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnRetrieve**](AuthenticatorsAPI.md#authenticatorswebauthnretrieve) | **GET** /authenticators/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnUpdate**](AuthenticatorsAPI.md#authenticatorswebauthnupdate) | **PUT** /authenticators/webauthn/{id}/ | +*AuthenticatorsAPI* | [**authenticatorsWebauthnUsedByList**](AuthenticatorsAPI.md#authenticatorswebauthnusedbylist) | **GET** /authenticators/webauthn/{id}/used_by/ | +*CoreAPI* | [**coreApplicationsCheckAccessRetrieve**](CoreAPI.md#coreapplicationscheckaccessretrieve) | **GET** /core/applications/{slug}/check_access/ | +*CoreAPI* | [**coreApplicationsCreate**](CoreAPI.md#coreapplicationscreate) | **POST** /core/applications/ | +*CoreAPI* | [**coreApplicationsDestroy**](CoreAPI.md#coreapplicationsdestroy) | **DELETE** /core/applications/{slug}/ | +*CoreAPI* | [**coreApplicationsList**](CoreAPI.md#coreapplicationslist) | **GET** /core/applications/ | +*CoreAPI* | [**coreApplicationsMetricsList**](CoreAPI.md#coreapplicationsmetricslist) | **GET** /core/applications/{slug}/metrics/ | +*CoreAPI* | [**coreApplicationsPartialUpdate**](CoreAPI.md#coreapplicationspartialupdate) | **PATCH** /core/applications/{slug}/ | +*CoreAPI* | [**coreApplicationsRetrieve**](CoreAPI.md#coreapplicationsretrieve) | **GET** /core/applications/{slug}/ | +*CoreAPI* | [**coreApplicationsSetIconCreate**](CoreAPI.md#coreapplicationsseticoncreate) | **POST** /core/applications/{slug}/set_icon/ | +*CoreAPI* | [**coreApplicationsSetIconUrlCreate**](CoreAPI.md#coreapplicationsseticonurlcreate) | **POST** /core/applications/{slug}/set_icon_url/ | +*CoreAPI* | [**coreApplicationsUpdate**](CoreAPI.md#coreapplicationsupdate) | **PUT** /core/applications/{slug}/ | +*CoreAPI* | [**coreApplicationsUsedByList**](CoreAPI.md#coreapplicationsusedbylist) | **GET** /core/applications/{slug}/used_by/ | +*CoreAPI* | [**coreAuthenticatedSessionsDestroy**](CoreAPI.md#coreauthenticatedsessionsdestroy) | **DELETE** /core/authenticated_sessions/{uuid}/ | +*CoreAPI* | [**coreAuthenticatedSessionsList**](CoreAPI.md#coreauthenticatedsessionslist) | **GET** /core/authenticated_sessions/ | +*CoreAPI* | [**coreAuthenticatedSessionsRetrieve**](CoreAPI.md#coreauthenticatedsessionsretrieve) | **GET** /core/authenticated_sessions/{uuid}/ | +*CoreAPI* | [**coreAuthenticatedSessionsUsedByList**](CoreAPI.md#coreauthenticatedsessionsusedbylist) | **GET** /core/authenticated_sessions/{uuid}/used_by/ | +*CoreAPI* | [**coreGroupsAddUserCreate**](CoreAPI.md#coregroupsaddusercreate) | **POST** /core/groups/{group_uuid}/add_user/ | +*CoreAPI* | [**coreGroupsCreate**](CoreAPI.md#coregroupscreate) | **POST** /core/groups/ | +*CoreAPI* | [**coreGroupsDestroy**](CoreAPI.md#coregroupsdestroy) | **DELETE** /core/groups/{group_uuid}/ | +*CoreAPI* | [**coreGroupsList**](CoreAPI.md#coregroupslist) | **GET** /core/groups/ | +*CoreAPI* | [**coreGroupsPartialUpdate**](CoreAPI.md#coregroupspartialupdate) | **PATCH** /core/groups/{group_uuid}/ | +*CoreAPI* | [**coreGroupsRemoveUserCreate**](CoreAPI.md#coregroupsremoveusercreate) | **POST** /core/groups/{group_uuid}/remove_user/ | +*CoreAPI* | [**coreGroupsRetrieve**](CoreAPI.md#coregroupsretrieve) | **GET** /core/groups/{group_uuid}/ | +*CoreAPI* | [**coreGroupsUpdate**](CoreAPI.md#coregroupsupdate) | **PUT** /core/groups/{group_uuid}/ | +*CoreAPI* | [**coreGroupsUsedByList**](CoreAPI.md#coregroupsusedbylist) | **GET** /core/groups/{group_uuid}/used_by/ | +*CoreAPI* | [**coreTenantsCreate**](CoreAPI.md#coretenantscreate) | **POST** /core/tenants/ | +*CoreAPI* | [**coreTenantsCurrentRetrieve**](CoreAPI.md#coretenantscurrentretrieve) | **GET** /core/tenants/current/ | +*CoreAPI* | [**coreTenantsDestroy**](CoreAPI.md#coretenantsdestroy) | **DELETE** /core/tenants/{tenant_uuid}/ | +*CoreAPI* | [**coreTenantsList**](CoreAPI.md#coretenantslist) | **GET** /core/tenants/ | +*CoreAPI* | [**coreTenantsPartialUpdate**](CoreAPI.md#coretenantspartialupdate) | **PATCH** /core/tenants/{tenant_uuid}/ | +*CoreAPI* | [**coreTenantsRetrieve**](CoreAPI.md#coretenantsretrieve) | **GET** /core/tenants/{tenant_uuid}/ | +*CoreAPI* | [**coreTenantsUpdate**](CoreAPI.md#coretenantsupdate) | **PUT** /core/tenants/{tenant_uuid}/ | +*CoreAPI* | [**coreTenantsUsedByList**](CoreAPI.md#coretenantsusedbylist) | **GET** /core/tenants/{tenant_uuid}/used_by/ | +*CoreAPI* | [**coreTokensCreate**](CoreAPI.md#coretokenscreate) | **POST** /core/tokens/ | +*CoreAPI* | [**coreTokensDestroy**](CoreAPI.md#coretokensdestroy) | **DELETE** /core/tokens/{identifier}/ | +*CoreAPI* | [**coreTokensList**](CoreAPI.md#coretokenslist) | **GET** /core/tokens/ | +*CoreAPI* | [**coreTokensPartialUpdate**](CoreAPI.md#coretokenspartialupdate) | **PATCH** /core/tokens/{identifier}/ | +*CoreAPI* | [**coreTokensRetrieve**](CoreAPI.md#coretokensretrieve) | **GET** /core/tokens/{identifier}/ | +*CoreAPI* | [**coreTokensSetKeyCreate**](CoreAPI.md#coretokenssetkeycreate) | **POST** /core/tokens/{identifier}/set_key/ | +*CoreAPI* | [**coreTokensUpdate**](CoreAPI.md#coretokensupdate) | **PUT** /core/tokens/{identifier}/ | +*CoreAPI* | [**coreTokensUsedByList**](CoreAPI.md#coretokensusedbylist) | **GET** /core/tokens/{identifier}/used_by/ | +*CoreAPI* | [**coreTokensViewKeyRetrieve**](CoreAPI.md#coretokensviewkeyretrieve) | **GET** /core/tokens/{identifier}/view_key/ | +*CoreAPI* | [**coreTransactionalApplicationsUpdate**](CoreAPI.md#coretransactionalapplicationsupdate) | **PUT** /core/transactional/applications/ | +*CoreAPI* | [**coreUserConsentDestroy**](CoreAPI.md#coreuserconsentdestroy) | **DELETE** /core/user_consent/{id}/ | +*CoreAPI* | [**coreUserConsentList**](CoreAPI.md#coreuserconsentlist) | **GET** /core/user_consent/ | +*CoreAPI* | [**coreUserConsentRetrieve**](CoreAPI.md#coreuserconsentretrieve) | **GET** /core/user_consent/{id}/ | +*CoreAPI* | [**coreUserConsentUsedByList**](CoreAPI.md#coreuserconsentusedbylist) | **GET** /core/user_consent/{id}/used_by/ | +*CoreAPI* | [**coreUsersCreate**](CoreAPI.md#coreuserscreate) | **POST** /core/users/ | +*CoreAPI* | [**coreUsersDestroy**](CoreAPI.md#coreusersdestroy) | **DELETE** /core/users/{id}/ | +*CoreAPI* | [**coreUsersImpersonateCreate**](CoreAPI.md#coreusersimpersonatecreate) | **POST** /core/users/{id}/impersonate/ | +*CoreAPI* | [**coreUsersImpersonateEndRetrieve**](CoreAPI.md#coreusersimpersonateendretrieve) | **GET** /core/users/impersonate_end/ | +*CoreAPI* | [**coreUsersList**](CoreAPI.md#coreuserslist) | **GET** /core/users/ | +*CoreAPI* | [**coreUsersMeRetrieve**](CoreAPI.md#coreusersmeretrieve) | **GET** /core/users/me/ | +*CoreAPI* | [**coreUsersMetricsRetrieve**](CoreAPI.md#coreusersmetricsretrieve) | **GET** /core/users/{id}/metrics/ | +*CoreAPI* | [**coreUsersPartialUpdate**](CoreAPI.md#coreuserspartialupdate) | **PATCH** /core/users/{id}/ | +*CoreAPI* | [**coreUsersPathsRetrieve**](CoreAPI.md#coreuserspathsretrieve) | **GET** /core/users/paths/ | +*CoreAPI* | [**coreUsersRecoveryEmailRetrieve**](CoreAPI.md#coreusersrecoveryemailretrieve) | **GET** /core/users/{id}/recovery_email/ | +*CoreAPI* | [**coreUsersRecoveryRetrieve**](CoreAPI.md#coreusersrecoveryretrieve) | **GET** /core/users/{id}/recovery/ | +*CoreAPI* | [**coreUsersRetrieve**](CoreAPI.md#coreusersretrieve) | **GET** /core/users/{id}/ | +*CoreAPI* | [**coreUsersServiceAccountCreate**](CoreAPI.md#coreusersserviceaccountcreate) | **POST** /core/users/service_account/ | +*CoreAPI* | [**coreUsersSetPasswordCreate**](CoreAPI.md#coreuserssetpasswordcreate) | **POST** /core/users/{id}/set_password/ | +*CoreAPI* | [**coreUsersUpdate**](CoreAPI.md#coreusersupdate) | **PUT** /core/users/{id}/ | +*CoreAPI* | [**coreUsersUsedByList**](CoreAPI.md#coreusersusedbylist) | **GET** /core/users/{id}/used_by/ | +*CryptoAPI* | [**cryptoCertificatekeypairsCreate**](CryptoAPI.md#cryptocertificatekeypairscreate) | **POST** /crypto/certificatekeypairs/ | +*CryptoAPI* | [**cryptoCertificatekeypairsDestroy**](CryptoAPI.md#cryptocertificatekeypairsdestroy) | **DELETE** /crypto/certificatekeypairs/{kp_uuid}/ | +*CryptoAPI* | [**cryptoCertificatekeypairsGenerateCreate**](CryptoAPI.md#cryptocertificatekeypairsgeneratecreate) | **POST** /crypto/certificatekeypairs/generate/ | +*CryptoAPI* | [**cryptoCertificatekeypairsList**](CryptoAPI.md#cryptocertificatekeypairslist) | **GET** /crypto/certificatekeypairs/ | +*CryptoAPI* | [**cryptoCertificatekeypairsPartialUpdate**](CryptoAPI.md#cryptocertificatekeypairspartialupdate) | **PATCH** /crypto/certificatekeypairs/{kp_uuid}/ | +*CryptoAPI* | [**cryptoCertificatekeypairsRetrieve**](CryptoAPI.md#cryptocertificatekeypairsretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/ | +*CryptoAPI* | [**cryptoCertificatekeypairsUpdate**](CryptoAPI.md#cryptocertificatekeypairsupdate) | **PUT** /crypto/certificatekeypairs/{kp_uuid}/ | +*CryptoAPI* | [**cryptoCertificatekeypairsUsedByList**](CryptoAPI.md#cryptocertificatekeypairsusedbylist) | **GET** /crypto/certificatekeypairs/{kp_uuid}/used_by/ | +*CryptoAPI* | [**cryptoCertificatekeypairsViewCertificateRetrieve**](CryptoAPI.md#cryptocertificatekeypairsviewcertificateretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_certificate/ | +*CryptoAPI* | [**cryptoCertificatekeypairsViewPrivateKeyRetrieve**](CryptoAPI.md#cryptocertificatekeypairsviewprivatekeyretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_private_key/ | +*EnterpriseAPI* | [**enterpriseLicenseCreate**](EnterpriseAPI.md#enterpriselicensecreate) | **POST** /enterprise/license/ | +*EnterpriseAPI* | [**enterpriseLicenseDestroy**](EnterpriseAPI.md#enterpriselicensedestroy) | **DELETE** /enterprise/license/{license_uuid}/ | +*EnterpriseAPI* | [**enterpriseLicenseForecastRetrieve**](EnterpriseAPI.md#enterpriselicenseforecastretrieve) | **GET** /enterprise/license/forecast/ | +*EnterpriseAPI* | [**enterpriseLicenseGetInstallIdRetrieve**](EnterpriseAPI.md#enterpriselicensegetinstallidretrieve) | **GET** /enterprise/license/get_install_id/ | +*EnterpriseAPI* | [**enterpriseLicenseList**](EnterpriseAPI.md#enterpriselicenselist) | **GET** /enterprise/license/ | +*EnterpriseAPI* | [**enterpriseLicensePartialUpdate**](EnterpriseAPI.md#enterpriselicensepartialupdate) | **PATCH** /enterprise/license/{license_uuid}/ | +*EnterpriseAPI* | [**enterpriseLicenseRetrieve**](EnterpriseAPI.md#enterpriselicenseretrieve) | **GET** /enterprise/license/{license_uuid}/ | +*EnterpriseAPI* | [**enterpriseLicenseSummaryRetrieve**](EnterpriseAPI.md#enterpriselicensesummaryretrieve) | **GET** /enterprise/license/summary/ | +*EnterpriseAPI* | [**enterpriseLicenseUpdate**](EnterpriseAPI.md#enterpriselicenseupdate) | **PUT** /enterprise/license/{license_uuid}/ | +*EnterpriseAPI* | [**enterpriseLicenseUsedByList**](EnterpriseAPI.md#enterpriselicenseusedbylist) | **GET** /enterprise/license/{license_uuid}/used_by/ | +*EventsAPI* | [**eventsEventsActionsList**](EventsAPI.md#eventseventsactionslist) | **GET** /events/events/actions/ | +*EventsAPI* | [**eventsEventsCreate**](EventsAPI.md#eventseventscreate) | **POST** /events/events/ | +*EventsAPI* | [**eventsEventsDestroy**](EventsAPI.md#eventseventsdestroy) | **DELETE** /events/events/{event_uuid}/ | +*EventsAPI* | [**eventsEventsList**](EventsAPI.md#eventseventslist) | **GET** /events/events/ | +*EventsAPI* | [**eventsEventsPartialUpdate**](EventsAPI.md#eventseventspartialupdate) | **PATCH** /events/events/{event_uuid}/ | +*EventsAPI* | [**eventsEventsPerMonthList**](EventsAPI.md#eventseventspermonthlist) | **GET** /events/events/per_month/ | +*EventsAPI* | [**eventsEventsRetrieve**](EventsAPI.md#eventseventsretrieve) | **GET** /events/events/{event_uuid}/ | +*EventsAPI* | [**eventsEventsTopPerUserList**](EventsAPI.md#eventseventstopperuserlist) | **GET** /events/events/top_per_user/ | +*EventsAPI* | [**eventsEventsUpdate**](EventsAPI.md#eventseventsupdate) | **PUT** /events/events/{event_uuid}/ | +*EventsAPI* | [**eventsEventsVolumeList**](EventsAPI.md#eventseventsvolumelist) | **GET** /events/events/volume/ | +*EventsAPI* | [**eventsNotificationsDestroy**](EventsAPI.md#eventsnotificationsdestroy) | **DELETE** /events/notifications/{uuid}/ | +*EventsAPI* | [**eventsNotificationsList**](EventsAPI.md#eventsnotificationslist) | **GET** /events/notifications/ | +*EventsAPI* | [**eventsNotificationsMarkAllSeenCreate**](EventsAPI.md#eventsnotificationsmarkallseencreate) | **POST** /events/notifications/mark_all_seen/ | +*EventsAPI* | [**eventsNotificationsPartialUpdate**](EventsAPI.md#eventsnotificationspartialupdate) | **PATCH** /events/notifications/{uuid}/ | +*EventsAPI* | [**eventsNotificationsRetrieve**](EventsAPI.md#eventsnotificationsretrieve) | **GET** /events/notifications/{uuid}/ | +*EventsAPI* | [**eventsNotificationsUpdate**](EventsAPI.md#eventsnotificationsupdate) | **PUT** /events/notifications/{uuid}/ | +*EventsAPI* | [**eventsNotificationsUsedByList**](EventsAPI.md#eventsnotificationsusedbylist) | **GET** /events/notifications/{uuid}/used_by/ | +*EventsAPI* | [**eventsRulesCreate**](EventsAPI.md#eventsrulescreate) | **POST** /events/rules/ | +*EventsAPI* | [**eventsRulesDestroy**](EventsAPI.md#eventsrulesdestroy) | **DELETE** /events/rules/{pbm_uuid}/ | +*EventsAPI* | [**eventsRulesList**](EventsAPI.md#eventsruleslist) | **GET** /events/rules/ | +*EventsAPI* | [**eventsRulesPartialUpdate**](EventsAPI.md#eventsrulespartialupdate) | **PATCH** /events/rules/{pbm_uuid}/ | +*EventsAPI* | [**eventsRulesRetrieve**](EventsAPI.md#eventsrulesretrieve) | **GET** /events/rules/{pbm_uuid}/ | +*EventsAPI* | [**eventsRulesUpdate**](EventsAPI.md#eventsrulesupdate) | **PUT** /events/rules/{pbm_uuid}/ | +*EventsAPI* | [**eventsRulesUsedByList**](EventsAPI.md#eventsrulesusedbylist) | **GET** /events/rules/{pbm_uuid}/used_by/ | +*EventsAPI* | [**eventsTransportsCreate**](EventsAPI.md#eventstransportscreate) | **POST** /events/transports/ | +*EventsAPI* | [**eventsTransportsDestroy**](EventsAPI.md#eventstransportsdestroy) | **DELETE** /events/transports/{uuid}/ | +*EventsAPI* | [**eventsTransportsList**](EventsAPI.md#eventstransportslist) | **GET** /events/transports/ | +*EventsAPI* | [**eventsTransportsPartialUpdate**](EventsAPI.md#eventstransportspartialupdate) | **PATCH** /events/transports/{uuid}/ | +*EventsAPI* | [**eventsTransportsRetrieve**](EventsAPI.md#eventstransportsretrieve) | **GET** /events/transports/{uuid}/ | +*EventsAPI* | [**eventsTransportsTestCreate**](EventsAPI.md#eventstransportstestcreate) | **POST** /events/transports/{uuid}/test/ | +*EventsAPI* | [**eventsTransportsUpdate**](EventsAPI.md#eventstransportsupdate) | **PUT** /events/transports/{uuid}/ | +*EventsAPI* | [**eventsTransportsUsedByList**](EventsAPI.md#eventstransportsusedbylist) | **GET** /events/transports/{uuid}/used_by/ | +*FlowsAPI* | [**flowsBindingsCreate**](FlowsAPI.md#flowsbindingscreate) | **POST** /flows/bindings/ | +*FlowsAPI* | [**flowsBindingsDestroy**](FlowsAPI.md#flowsbindingsdestroy) | **DELETE** /flows/bindings/{fsb_uuid}/ | +*FlowsAPI* | [**flowsBindingsList**](FlowsAPI.md#flowsbindingslist) | **GET** /flows/bindings/ | +*FlowsAPI* | [**flowsBindingsPartialUpdate**](FlowsAPI.md#flowsbindingspartialupdate) | **PATCH** /flows/bindings/{fsb_uuid}/ | +*FlowsAPI* | [**flowsBindingsRetrieve**](FlowsAPI.md#flowsbindingsretrieve) | **GET** /flows/bindings/{fsb_uuid}/ | +*FlowsAPI* | [**flowsBindingsUpdate**](FlowsAPI.md#flowsbindingsupdate) | **PUT** /flows/bindings/{fsb_uuid}/ | +*FlowsAPI* | [**flowsBindingsUsedByList**](FlowsAPI.md#flowsbindingsusedbylist) | **GET** /flows/bindings/{fsb_uuid}/used_by/ | +*FlowsAPI* | [**flowsExecutorGet**](FlowsAPI.md#flowsexecutorget) | **GET** /flows/executor/{flow_slug}/ | +*FlowsAPI* | [**flowsExecutorSolve**](FlowsAPI.md#flowsexecutorsolve) | **POST** /flows/executor/{flow_slug}/ | +*FlowsAPI* | [**flowsInspectorGet**](FlowsAPI.md#flowsinspectorget) | **GET** /flows/inspector/{flow_slug}/ | +*FlowsAPI* | [**flowsInstancesCacheClearCreate**](FlowsAPI.md#flowsinstancescacheclearcreate) | **POST** /flows/instances/cache_clear/ | +*FlowsAPI* | [**flowsInstancesCacheInfoRetrieve**](FlowsAPI.md#flowsinstancescacheinforetrieve) | **GET** /flows/instances/cache_info/ | +*FlowsAPI* | [**flowsInstancesCreate**](FlowsAPI.md#flowsinstancescreate) | **POST** /flows/instances/ | +*FlowsAPI* | [**flowsInstancesDestroy**](FlowsAPI.md#flowsinstancesdestroy) | **DELETE** /flows/instances/{slug}/ | +*FlowsAPI* | [**flowsInstancesDiagramRetrieve**](FlowsAPI.md#flowsinstancesdiagramretrieve) | **GET** /flows/instances/{slug}/diagram/ | +*FlowsAPI* | [**flowsInstancesExecuteRetrieve**](FlowsAPI.md#flowsinstancesexecuteretrieve) | **GET** /flows/instances/{slug}/execute/ | +*FlowsAPI* | [**flowsInstancesExportRetrieve**](FlowsAPI.md#flowsinstancesexportretrieve) | **GET** /flows/instances/{slug}/export/ | +*FlowsAPI* | [**flowsInstancesImportCreate**](FlowsAPI.md#flowsinstancesimportcreate) | **POST** /flows/instances/import/ | +*FlowsAPI* | [**flowsInstancesList**](FlowsAPI.md#flowsinstanceslist) | **GET** /flows/instances/ | +*FlowsAPI* | [**flowsInstancesPartialUpdate**](FlowsAPI.md#flowsinstancespartialupdate) | **PATCH** /flows/instances/{slug}/ | +*FlowsAPI* | [**flowsInstancesRetrieve**](FlowsAPI.md#flowsinstancesretrieve) | **GET** /flows/instances/{slug}/ | +*FlowsAPI* | [**flowsInstancesSetBackgroundCreate**](FlowsAPI.md#flowsinstancessetbackgroundcreate) | **POST** /flows/instances/{slug}/set_background/ | +*FlowsAPI* | [**flowsInstancesSetBackgroundUrlCreate**](FlowsAPI.md#flowsinstancessetbackgroundurlcreate) | **POST** /flows/instances/{slug}/set_background_url/ | +*FlowsAPI* | [**flowsInstancesUpdate**](FlowsAPI.md#flowsinstancesupdate) | **PUT** /flows/instances/{slug}/ | +*FlowsAPI* | [**flowsInstancesUsedByList**](FlowsAPI.md#flowsinstancesusedbylist) | **GET** /flows/instances/{slug}/used_by/ | +*ManagedAPI* | [**managedBlueprintsApplyCreate**](ManagedAPI.md#managedblueprintsapplycreate) | **POST** /managed/blueprints/{instance_uuid}/apply/ | +*ManagedAPI* | [**managedBlueprintsAvailableList**](ManagedAPI.md#managedblueprintsavailablelist) | **GET** /managed/blueprints/available/ | +*ManagedAPI* | [**managedBlueprintsCreate**](ManagedAPI.md#managedblueprintscreate) | **POST** /managed/blueprints/ | +*ManagedAPI* | [**managedBlueprintsDestroy**](ManagedAPI.md#managedblueprintsdestroy) | **DELETE** /managed/blueprints/{instance_uuid}/ | +*ManagedAPI* | [**managedBlueprintsList**](ManagedAPI.md#managedblueprintslist) | **GET** /managed/blueprints/ | +*ManagedAPI* | [**managedBlueprintsPartialUpdate**](ManagedAPI.md#managedblueprintspartialupdate) | **PATCH** /managed/blueprints/{instance_uuid}/ | +*ManagedAPI* | [**managedBlueprintsRetrieve**](ManagedAPI.md#managedblueprintsretrieve) | **GET** /managed/blueprints/{instance_uuid}/ | +*ManagedAPI* | [**managedBlueprintsUpdate**](ManagedAPI.md#managedblueprintsupdate) | **PUT** /managed/blueprints/{instance_uuid}/ | +*ManagedAPI* | [**managedBlueprintsUsedByList**](ManagedAPI.md#managedblueprintsusedbylist) | **GET** /managed/blueprints/{instance_uuid}/used_by/ | +*Oauth2API* | [**oauth2AccessTokensDestroy**](Oauth2API.md#oauth2accesstokensdestroy) | **DELETE** /oauth2/access_tokens/{id}/ | +*Oauth2API* | [**oauth2AccessTokensList**](Oauth2API.md#oauth2accesstokenslist) | **GET** /oauth2/access_tokens/ | +*Oauth2API* | [**oauth2AccessTokensRetrieve**](Oauth2API.md#oauth2accesstokensretrieve) | **GET** /oauth2/access_tokens/{id}/ | +*Oauth2API* | [**oauth2AccessTokensUsedByList**](Oauth2API.md#oauth2accesstokensusedbylist) | **GET** /oauth2/access_tokens/{id}/used_by/ | +*Oauth2API* | [**oauth2AuthorizationCodesDestroy**](Oauth2API.md#oauth2authorizationcodesdestroy) | **DELETE** /oauth2/authorization_codes/{id}/ | +*Oauth2API* | [**oauth2AuthorizationCodesList**](Oauth2API.md#oauth2authorizationcodeslist) | **GET** /oauth2/authorization_codes/ | +*Oauth2API* | [**oauth2AuthorizationCodesRetrieve**](Oauth2API.md#oauth2authorizationcodesretrieve) | **GET** /oauth2/authorization_codes/{id}/ | +*Oauth2API* | [**oauth2AuthorizationCodesUsedByList**](Oauth2API.md#oauth2authorizationcodesusedbylist) | **GET** /oauth2/authorization_codes/{id}/used_by/ | +*Oauth2API* | [**oauth2RefreshTokensDestroy**](Oauth2API.md#oauth2refreshtokensdestroy) | **DELETE** /oauth2/refresh_tokens/{id}/ | +*Oauth2API* | [**oauth2RefreshTokensList**](Oauth2API.md#oauth2refreshtokenslist) | **GET** /oauth2/refresh_tokens/ | +*Oauth2API* | [**oauth2RefreshTokensRetrieve**](Oauth2API.md#oauth2refreshtokensretrieve) | **GET** /oauth2/refresh_tokens/{id}/ | +*Oauth2API* | [**oauth2RefreshTokensUsedByList**](Oauth2API.md#oauth2refreshtokensusedbylist) | **GET** /oauth2/refresh_tokens/{id}/used_by/ | +*OutpostsAPI* | [**outpostsInstancesCreate**](OutpostsAPI.md#outpostsinstancescreate) | **POST** /outposts/instances/ | +*OutpostsAPI* | [**outpostsInstancesDefaultSettingsRetrieve**](OutpostsAPI.md#outpostsinstancesdefaultsettingsretrieve) | **GET** /outposts/instances/default_settings/ | +*OutpostsAPI* | [**outpostsInstancesDestroy**](OutpostsAPI.md#outpostsinstancesdestroy) | **DELETE** /outposts/instances/{uuid}/ | +*OutpostsAPI* | [**outpostsInstancesHealthList**](OutpostsAPI.md#outpostsinstanceshealthlist) | **GET** /outposts/instances/{uuid}/health/ | +*OutpostsAPI* | [**outpostsInstancesList**](OutpostsAPI.md#outpostsinstanceslist) | **GET** /outposts/instances/ | +*OutpostsAPI* | [**outpostsInstancesPartialUpdate**](OutpostsAPI.md#outpostsinstancespartialupdate) | **PATCH** /outposts/instances/{uuid}/ | +*OutpostsAPI* | [**outpostsInstancesRetrieve**](OutpostsAPI.md#outpostsinstancesretrieve) | **GET** /outposts/instances/{uuid}/ | +*OutpostsAPI* | [**outpostsInstancesUpdate**](OutpostsAPI.md#outpostsinstancesupdate) | **PUT** /outposts/instances/{uuid}/ | +*OutpostsAPI* | [**outpostsInstancesUsedByList**](OutpostsAPI.md#outpostsinstancesusedbylist) | **GET** /outposts/instances/{uuid}/used_by/ | +*OutpostsAPI* | [**outpostsLdapList**](OutpostsAPI.md#outpostsldaplist) | **GET** /outposts/ldap/ | +*OutpostsAPI* | [**outpostsLdapRetrieve**](OutpostsAPI.md#outpostsldapretrieve) | **GET** /outposts/ldap/{id}/ | +*OutpostsAPI* | [**outpostsProxyList**](OutpostsAPI.md#outpostsproxylist) | **GET** /outposts/proxy/ | +*OutpostsAPI* | [**outpostsProxyRetrieve**](OutpostsAPI.md#outpostsproxyretrieve) | **GET** /outposts/proxy/{id}/ | +*OutpostsAPI* | [**outpostsRadiusList**](OutpostsAPI.md#outpostsradiuslist) | **GET** /outposts/radius/ | +*OutpostsAPI* | [**outpostsRadiusRetrieve**](OutpostsAPI.md#outpostsradiusretrieve) | **GET** /outposts/radius/{id}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllDestroy**](OutpostsAPI.md#outpostsserviceconnectionsalldestroy) | **DELETE** /outposts/service_connections/all/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllList**](OutpostsAPI.md#outpostsserviceconnectionsalllist) | **GET** /outposts/service_connections/all/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsallretrieve) | **GET** /outposts/service_connections/all/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllStateRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsallstateretrieve) | **GET** /outposts/service_connections/all/{uuid}/state/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllTypesList**](OutpostsAPI.md#outpostsserviceconnectionsalltypeslist) | **GET** /outposts/service_connections/all/types/ | +*OutpostsAPI* | [**outpostsServiceConnectionsAllUsedByList**](OutpostsAPI.md#outpostsserviceconnectionsallusedbylist) | **GET** /outposts/service_connections/all/{uuid}/used_by/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerCreate**](OutpostsAPI.md#outpostsserviceconnectionsdockercreate) | **POST** /outposts/service_connections/docker/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerDestroy**](OutpostsAPI.md#outpostsserviceconnectionsdockerdestroy) | **DELETE** /outposts/service_connections/docker/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerList**](OutpostsAPI.md#outpostsserviceconnectionsdockerlist) | **GET** /outposts/service_connections/docker/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerPartialUpdate**](OutpostsAPI.md#outpostsserviceconnectionsdockerpartialupdate) | **PATCH** /outposts/service_connections/docker/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsdockerretrieve) | **GET** /outposts/service_connections/docker/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerUpdate**](OutpostsAPI.md#outpostsserviceconnectionsdockerupdate) | **PUT** /outposts/service_connections/docker/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsDockerUsedByList**](OutpostsAPI.md#outpostsserviceconnectionsdockerusedbylist) | **GET** /outposts/service_connections/docker/{uuid}/used_by/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesCreate**](OutpostsAPI.md#outpostsserviceconnectionskubernetescreate) | **POST** /outposts/service_connections/kubernetes/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesDestroy**](OutpostsAPI.md#outpostsserviceconnectionskubernetesdestroy) | **DELETE** /outposts/service_connections/kubernetes/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesList**](OutpostsAPI.md#outpostsserviceconnectionskuberneteslist) | **GET** /outposts/service_connections/kubernetes/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesPartialUpdate**](OutpostsAPI.md#outpostsserviceconnectionskubernetespartialupdate) | **PATCH** /outposts/service_connections/kubernetes/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesRetrieve**](OutpostsAPI.md#outpostsserviceconnectionskubernetesretrieve) | **GET** /outposts/service_connections/kubernetes/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesUpdate**](OutpostsAPI.md#outpostsserviceconnectionskubernetesupdate) | **PUT** /outposts/service_connections/kubernetes/{uuid}/ | +*OutpostsAPI* | [**outpostsServiceConnectionsKubernetesUsedByList**](OutpostsAPI.md#outpostsserviceconnectionskubernetesusedbylist) | **GET** /outposts/service_connections/kubernetes/{uuid}/used_by/ | +*PoliciesAPI* | [**policiesAllCacheClearCreate**](PoliciesAPI.md#policiesallcacheclearcreate) | **POST** /policies/all/cache_clear/ | +*PoliciesAPI* | [**policiesAllCacheInfoRetrieve**](PoliciesAPI.md#policiesallcacheinforetrieve) | **GET** /policies/all/cache_info/ | +*PoliciesAPI* | [**policiesAllDestroy**](PoliciesAPI.md#policiesalldestroy) | **DELETE** /policies/all/{policy_uuid}/ | +*PoliciesAPI* | [**policiesAllList**](PoliciesAPI.md#policiesalllist) | **GET** /policies/all/ | +*PoliciesAPI* | [**policiesAllRetrieve**](PoliciesAPI.md#policiesallretrieve) | **GET** /policies/all/{policy_uuid}/ | +*PoliciesAPI* | [**policiesAllTestCreate**](PoliciesAPI.md#policiesalltestcreate) | **POST** /policies/all/{policy_uuid}/test/ | +*PoliciesAPI* | [**policiesAllTypesList**](PoliciesAPI.md#policiesalltypeslist) | **GET** /policies/all/types/ | +*PoliciesAPI* | [**policiesAllUsedByList**](PoliciesAPI.md#policiesallusedbylist) | **GET** /policies/all/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesBindingsCreate**](PoliciesAPI.md#policiesbindingscreate) | **POST** /policies/bindings/ | +*PoliciesAPI* | [**policiesBindingsDestroy**](PoliciesAPI.md#policiesbindingsdestroy) | **DELETE** /policies/bindings/{policy_binding_uuid}/ | +*PoliciesAPI* | [**policiesBindingsList**](PoliciesAPI.md#policiesbindingslist) | **GET** /policies/bindings/ | +*PoliciesAPI* | [**policiesBindingsPartialUpdate**](PoliciesAPI.md#policiesbindingspartialupdate) | **PATCH** /policies/bindings/{policy_binding_uuid}/ | +*PoliciesAPI* | [**policiesBindingsRetrieve**](PoliciesAPI.md#policiesbindingsretrieve) | **GET** /policies/bindings/{policy_binding_uuid}/ | +*PoliciesAPI* | [**policiesBindingsUpdate**](PoliciesAPI.md#policiesbindingsupdate) | **PUT** /policies/bindings/{policy_binding_uuid}/ | +*PoliciesAPI* | [**policiesBindingsUsedByList**](PoliciesAPI.md#policiesbindingsusedbylist) | **GET** /policies/bindings/{policy_binding_uuid}/used_by/ | +*PoliciesAPI* | [**policiesDummyCreate**](PoliciesAPI.md#policiesdummycreate) | **POST** /policies/dummy/ | +*PoliciesAPI* | [**policiesDummyDestroy**](PoliciesAPI.md#policiesdummydestroy) | **DELETE** /policies/dummy/{policy_uuid}/ | +*PoliciesAPI* | [**policiesDummyList**](PoliciesAPI.md#policiesdummylist) | **GET** /policies/dummy/ | +*PoliciesAPI* | [**policiesDummyPartialUpdate**](PoliciesAPI.md#policiesdummypartialupdate) | **PATCH** /policies/dummy/{policy_uuid}/ | +*PoliciesAPI* | [**policiesDummyRetrieve**](PoliciesAPI.md#policiesdummyretrieve) | **GET** /policies/dummy/{policy_uuid}/ | +*PoliciesAPI* | [**policiesDummyUpdate**](PoliciesAPI.md#policiesdummyupdate) | **PUT** /policies/dummy/{policy_uuid}/ | +*PoliciesAPI* | [**policiesDummyUsedByList**](PoliciesAPI.md#policiesdummyusedbylist) | **GET** /policies/dummy/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesEventMatcherCreate**](PoliciesAPI.md#policieseventmatchercreate) | **POST** /policies/event_matcher/ | +*PoliciesAPI* | [**policiesEventMatcherDestroy**](PoliciesAPI.md#policieseventmatcherdestroy) | **DELETE** /policies/event_matcher/{policy_uuid}/ | +*PoliciesAPI* | [**policiesEventMatcherList**](PoliciesAPI.md#policieseventmatcherlist) | **GET** /policies/event_matcher/ | +*PoliciesAPI* | [**policiesEventMatcherPartialUpdate**](PoliciesAPI.md#policieseventmatcherpartialupdate) | **PATCH** /policies/event_matcher/{policy_uuid}/ | +*PoliciesAPI* | [**policiesEventMatcherRetrieve**](PoliciesAPI.md#policieseventmatcherretrieve) | **GET** /policies/event_matcher/{policy_uuid}/ | +*PoliciesAPI* | [**policiesEventMatcherUpdate**](PoliciesAPI.md#policieseventmatcherupdate) | **PUT** /policies/event_matcher/{policy_uuid}/ | +*PoliciesAPI* | [**policiesEventMatcherUsedByList**](PoliciesAPI.md#policieseventmatcherusedbylist) | **GET** /policies/event_matcher/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesExpressionCreate**](PoliciesAPI.md#policiesexpressioncreate) | **POST** /policies/expression/ | +*PoliciesAPI* | [**policiesExpressionDestroy**](PoliciesAPI.md#policiesexpressiondestroy) | **DELETE** /policies/expression/{policy_uuid}/ | +*PoliciesAPI* | [**policiesExpressionList**](PoliciesAPI.md#policiesexpressionlist) | **GET** /policies/expression/ | +*PoliciesAPI* | [**policiesExpressionPartialUpdate**](PoliciesAPI.md#policiesexpressionpartialupdate) | **PATCH** /policies/expression/{policy_uuid}/ | +*PoliciesAPI* | [**policiesExpressionRetrieve**](PoliciesAPI.md#policiesexpressionretrieve) | **GET** /policies/expression/{policy_uuid}/ | +*PoliciesAPI* | [**policiesExpressionUpdate**](PoliciesAPI.md#policiesexpressionupdate) | **PUT** /policies/expression/{policy_uuid}/ | +*PoliciesAPI* | [**policiesExpressionUsedByList**](PoliciesAPI.md#policiesexpressionusedbylist) | **GET** /policies/expression/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesPasswordCreate**](PoliciesAPI.md#policiespasswordcreate) | **POST** /policies/password/ | +*PoliciesAPI* | [**policiesPasswordDestroy**](PoliciesAPI.md#policiespassworddestroy) | **DELETE** /policies/password/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordExpiryCreate**](PoliciesAPI.md#policiespasswordexpirycreate) | **POST** /policies/password_expiry/ | +*PoliciesAPI* | [**policiesPasswordExpiryDestroy**](PoliciesAPI.md#policiespasswordexpirydestroy) | **DELETE** /policies/password_expiry/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordExpiryList**](PoliciesAPI.md#policiespasswordexpirylist) | **GET** /policies/password_expiry/ | +*PoliciesAPI* | [**policiesPasswordExpiryPartialUpdate**](PoliciesAPI.md#policiespasswordexpirypartialupdate) | **PATCH** /policies/password_expiry/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordExpiryRetrieve**](PoliciesAPI.md#policiespasswordexpiryretrieve) | **GET** /policies/password_expiry/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordExpiryUpdate**](PoliciesAPI.md#policiespasswordexpiryupdate) | **PUT** /policies/password_expiry/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordExpiryUsedByList**](PoliciesAPI.md#policiespasswordexpiryusedbylist) | **GET** /policies/password_expiry/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesPasswordList**](PoliciesAPI.md#policiespasswordlist) | **GET** /policies/password/ | +*PoliciesAPI* | [**policiesPasswordPartialUpdate**](PoliciesAPI.md#policiespasswordpartialupdate) | **PATCH** /policies/password/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordRetrieve**](PoliciesAPI.md#policiespasswordretrieve) | **GET** /policies/password/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordUpdate**](PoliciesAPI.md#policiespasswordupdate) | **PUT** /policies/password/{policy_uuid}/ | +*PoliciesAPI* | [**policiesPasswordUsedByList**](PoliciesAPI.md#policiespasswordusedbylist) | **GET** /policies/password/{policy_uuid}/used_by/ | +*PoliciesAPI* | [**policiesReputationCreate**](PoliciesAPI.md#policiesreputationcreate) | **POST** /policies/reputation/ | +*PoliciesAPI* | [**policiesReputationDestroy**](PoliciesAPI.md#policiesreputationdestroy) | **DELETE** /policies/reputation/{policy_uuid}/ | +*PoliciesAPI* | [**policiesReputationList**](PoliciesAPI.md#policiesreputationlist) | **GET** /policies/reputation/ | +*PoliciesAPI* | [**policiesReputationPartialUpdate**](PoliciesAPI.md#policiesreputationpartialupdate) | **PATCH** /policies/reputation/{policy_uuid}/ | +*PoliciesAPI* | [**policiesReputationRetrieve**](PoliciesAPI.md#policiesreputationretrieve) | **GET** /policies/reputation/{policy_uuid}/ | +*PoliciesAPI* | [**policiesReputationScoresDestroy**](PoliciesAPI.md#policiesreputationscoresdestroy) | **DELETE** /policies/reputation/scores/{reputation_uuid}/ | +*PoliciesAPI* | [**policiesReputationScoresList**](PoliciesAPI.md#policiesreputationscoreslist) | **GET** /policies/reputation/scores/ | +*PoliciesAPI* | [**policiesReputationScoresRetrieve**](PoliciesAPI.md#policiesreputationscoresretrieve) | **GET** /policies/reputation/scores/{reputation_uuid}/ | +*PoliciesAPI* | [**policiesReputationScoresUsedByList**](PoliciesAPI.md#policiesreputationscoresusedbylist) | **GET** /policies/reputation/scores/{reputation_uuid}/used_by/ | +*PoliciesAPI* | [**policiesReputationUpdate**](PoliciesAPI.md#policiesreputationupdate) | **PUT** /policies/reputation/{policy_uuid}/ | +*PoliciesAPI* | [**policiesReputationUsedByList**](PoliciesAPI.md#policiesreputationusedbylist) | **GET** /policies/reputation/{policy_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsAllDestroy**](PropertymappingsAPI.md#propertymappingsalldestroy) | **DELETE** /propertymappings/all/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsAllList**](PropertymappingsAPI.md#propertymappingsalllist) | **GET** /propertymappings/all/ | +*PropertymappingsAPI* | [**propertymappingsAllRetrieve**](PropertymappingsAPI.md#propertymappingsallretrieve) | **GET** /propertymappings/all/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsAllTestCreate**](PropertymappingsAPI.md#propertymappingsalltestcreate) | **POST** /propertymappings/all/{pm_uuid}/test/ | +*PropertymappingsAPI* | [**propertymappingsAllTypesList**](PropertymappingsAPI.md#propertymappingsalltypeslist) | **GET** /propertymappings/all/types/ | +*PropertymappingsAPI* | [**propertymappingsAllUsedByList**](PropertymappingsAPI.md#propertymappingsallusedbylist) | **GET** /propertymappings/all/{pm_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsLdapCreate**](PropertymappingsAPI.md#propertymappingsldapcreate) | **POST** /propertymappings/ldap/ | +*PropertymappingsAPI* | [**propertymappingsLdapDestroy**](PropertymappingsAPI.md#propertymappingsldapdestroy) | **DELETE** /propertymappings/ldap/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsLdapList**](PropertymappingsAPI.md#propertymappingsldaplist) | **GET** /propertymappings/ldap/ | +*PropertymappingsAPI* | [**propertymappingsLdapPartialUpdate**](PropertymappingsAPI.md#propertymappingsldappartialupdate) | **PATCH** /propertymappings/ldap/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsLdapRetrieve**](PropertymappingsAPI.md#propertymappingsldapretrieve) | **GET** /propertymappings/ldap/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsLdapUpdate**](PropertymappingsAPI.md#propertymappingsldapupdate) | **PUT** /propertymappings/ldap/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsLdapUsedByList**](PropertymappingsAPI.md#propertymappingsldapusedbylist) | **GET** /propertymappings/ldap/{pm_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsNotificationCreate**](PropertymappingsAPI.md#propertymappingsnotificationcreate) | **POST** /propertymappings/notification/ | +*PropertymappingsAPI* | [**propertymappingsNotificationDestroy**](PropertymappingsAPI.md#propertymappingsnotificationdestroy) | **DELETE** /propertymappings/notification/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsNotificationList**](PropertymappingsAPI.md#propertymappingsnotificationlist) | **GET** /propertymappings/notification/ | +*PropertymappingsAPI* | [**propertymappingsNotificationPartialUpdate**](PropertymappingsAPI.md#propertymappingsnotificationpartialupdate) | **PATCH** /propertymappings/notification/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsNotificationRetrieve**](PropertymappingsAPI.md#propertymappingsnotificationretrieve) | **GET** /propertymappings/notification/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsNotificationUpdate**](PropertymappingsAPI.md#propertymappingsnotificationupdate) | **PUT** /propertymappings/notification/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsNotificationUsedByList**](PropertymappingsAPI.md#propertymappingsnotificationusedbylist) | **GET** /propertymappings/notification/{pm_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsSamlCreate**](PropertymappingsAPI.md#propertymappingssamlcreate) | **POST** /propertymappings/saml/ | +*PropertymappingsAPI* | [**propertymappingsSamlDestroy**](PropertymappingsAPI.md#propertymappingssamldestroy) | **DELETE** /propertymappings/saml/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsSamlList**](PropertymappingsAPI.md#propertymappingssamllist) | **GET** /propertymappings/saml/ | +*PropertymappingsAPI* | [**propertymappingsSamlPartialUpdate**](PropertymappingsAPI.md#propertymappingssamlpartialupdate) | **PATCH** /propertymappings/saml/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsSamlRetrieve**](PropertymappingsAPI.md#propertymappingssamlretrieve) | **GET** /propertymappings/saml/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsSamlUpdate**](PropertymappingsAPI.md#propertymappingssamlupdate) | **PUT** /propertymappings/saml/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsSamlUsedByList**](PropertymappingsAPI.md#propertymappingssamlusedbylist) | **GET** /propertymappings/saml/{pm_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsScimCreate**](PropertymappingsAPI.md#propertymappingsscimcreate) | **POST** /propertymappings/scim/ | +*PropertymappingsAPI* | [**propertymappingsScimDestroy**](PropertymappingsAPI.md#propertymappingsscimdestroy) | **DELETE** /propertymappings/scim/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScimList**](PropertymappingsAPI.md#propertymappingsscimlist) | **GET** /propertymappings/scim/ | +*PropertymappingsAPI* | [**propertymappingsScimPartialUpdate**](PropertymappingsAPI.md#propertymappingsscimpartialupdate) | **PATCH** /propertymappings/scim/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScimRetrieve**](PropertymappingsAPI.md#propertymappingsscimretrieve) | **GET** /propertymappings/scim/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScimUpdate**](PropertymappingsAPI.md#propertymappingsscimupdate) | **PUT** /propertymappings/scim/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScimUsedByList**](PropertymappingsAPI.md#propertymappingsscimusedbylist) | **GET** /propertymappings/scim/{pm_uuid}/used_by/ | +*PropertymappingsAPI* | [**propertymappingsScopeCreate**](PropertymappingsAPI.md#propertymappingsscopecreate) | **POST** /propertymappings/scope/ | +*PropertymappingsAPI* | [**propertymappingsScopeDestroy**](PropertymappingsAPI.md#propertymappingsscopedestroy) | **DELETE** /propertymappings/scope/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScopeList**](PropertymappingsAPI.md#propertymappingsscopelist) | **GET** /propertymappings/scope/ | +*PropertymappingsAPI* | [**propertymappingsScopePartialUpdate**](PropertymappingsAPI.md#propertymappingsscopepartialupdate) | **PATCH** /propertymappings/scope/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScopeRetrieve**](PropertymappingsAPI.md#propertymappingsscoperetrieve) | **GET** /propertymappings/scope/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScopeUpdate**](PropertymappingsAPI.md#propertymappingsscopeupdate) | **PUT** /propertymappings/scope/{pm_uuid}/ | +*PropertymappingsAPI* | [**propertymappingsScopeUsedByList**](PropertymappingsAPI.md#propertymappingsscopeusedbylist) | **GET** /propertymappings/scope/{pm_uuid}/used_by/ | +*ProvidersAPI* | [**providersAllDestroy**](ProvidersAPI.md#providersalldestroy) | **DELETE** /providers/all/{id}/ | +*ProvidersAPI* | [**providersAllList**](ProvidersAPI.md#providersalllist) | **GET** /providers/all/ | +*ProvidersAPI* | [**providersAllRetrieve**](ProvidersAPI.md#providersallretrieve) | **GET** /providers/all/{id}/ | +*ProvidersAPI* | [**providersAllTypesList**](ProvidersAPI.md#providersalltypeslist) | **GET** /providers/all/types/ | +*ProvidersAPI* | [**providersAllUsedByList**](ProvidersAPI.md#providersallusedbylist) | **GET** /providers/all/{id}/used_by/ | +*ProvidersAPI* | [**providersLdapCreate**](ProvidersAPI.md#providersldapcreate) | **POST** /providers/ldap/ | +*ProvidersAPI* | [**providersLdapDestroy**](ProvidersAPI.md#providersldapdestroy) | **DELETE** /providers/ldap/{id}/ | +*ProvidersAPI* | [**providersLdapList**](ProvidersAPI.md#providersldaplist) | **GET** /providers/ldap/ | +*ProvidersAPI* | [**providersLdapPartialUpdate**](ProvidersAPI.md#providersldappartialupdate) | **PATCH** /providers/ldap/{id}/ | +*ProvidersAPI* | [**providersLdapRetrieve**](ProvidersAPI.md#providersldapretrieve) | **GET** /providers/ldap/{id}/ | +*ProvidersAPI* | [**providersLdapUpdate**](ProvidersAPI.md#providersldapupdate) | **PUT** /providers/ldap/{id}/ | +*ProvidersAPI* | [**providersLdapUsedByList**](ProvidersAPI.md#providersldapusedbylist) | **GET** /providers/ldap/{id}/used_by/ | +*ProvidersAPI* | [**providersOauth2Create**](ProvidersAPI.md#providersoauth2create) | **POST** /providers/oauth2/ | +*ProvidersAPI* | [**providersOauth2Destroy**](ProvidersAPI.md#providersoauth2destroy) | **DELETE** /providers/oauth2/{id}/ | +*ProvidersAPI* | [**providersOauth2List**](ProvidersAPI.md#providersoauth2list) | **GET** /providers/oauth2/ | +*ProvidersAPI* | [**providersOauth2PartialUpdate**](ProvidersAPI.md#providersoauth2partialupdate) | **PATCH** /providers/oauth2/{id}/ | +*ProvidersAPI* | [**providersOauth2PreviewUserRetrieve**](ProvidersAPI.md#providersoauth2previewuserretrieve) | **GET** /providers/oauth2/{id}/preview_user/ | +*ProvidersAPI* | [**providersOauth2Retrieve**](ProvidersAPI.md#providersoauth2retrieve) | **GET** /providers/oauth2/{id}/ | +*ProvidersAPI* | [**providersOauth2SetupUrlsRetrieve**](ProvidersAPI.md#providersoauth2setupurlsretrieve) | **GET** /providers/oauth2/{id}/setup_urls/ | +*ProvidersAPI* | [**providersOauth2Update**](ProvidersAPI.md#providersoauth2update) | **PUT** /providers/oauth2/{id}/ | +*ProvidersAPI* | [**providersOauth2UsedByList**](ProvidersAPI.md#providersoauth2usedbylist) | **GET** /providers/oauth2/{id}/used_by/ | +*ProvidersAPI* | [**providersProxyCreate**](ProvidersAPI.md#providersproxycreate) | **POST** /providers/proxy/ | +*ProvidersAPI* | [**providersProxyDestroy**](ProvidersAPI.md#providersproxydestroy) | **DELETE** /providers/proxy/{id}/ | +*ProvidersAPI* | [**providersProxyList**](ProvidersAPI.md#providersproxylist) | **GET** /providers/proxy/ | +*ProvidersAPI* | [**providersProxyPartialUpdate**](ProvidersAPI.md#providersproxypartialupdate) | **PATCH** /providers/proxy/{id}/ | +*ProvidersAPI* | [**providersProxyRetrieve**](ProvidersAPI.md#providersproxyretrieve) | **GET** /providers/proxy/{id}/ | +*ProvidersAPI* | [**providersProxyUpdate**](ProvidersAPI.md#providersproxyupdate) | **PUT** /providers/proxy/{id}/ | +*ProvidersAPI* | [**providersProxyUsedByList**](ProvidersAPI.md#providersproxyusedbylist) | **GET** /providers/proxy/{id}/used_by/ | +*ProvidersAPI* | [**providersRadiusCreate**](ProvidersAPI.md#providersradiuscreate) | **POST** /providers/radius/ | +*ProvidersAPI* | [**providersRadiusDestroy**](ProvidersAPI.md#providersradiusdestroy) | **DELETE** /providers/radius/{id}/ | +*ProvidersAPI* | [**providersRadiusList**](ProvidersAPI.md#providersradiuslist) | **GET** /providers/radius/ | +*ProvidersAPI* | [**providersRadiusPartialUpdate**](ProvidersAPI.md#providersradiuspartialupdate) | **PATCH** /providers/radius/{id}/ | +*ProvidersAPI* | [**providersRadiusRetrieve**](ProvidersAPI.md#providersradiusretrieve) | **GET** /providers/radius/{id}/ | +*ProvidersAPI* | [**providersRadiusUpdate**](ProvidersAPI.md#providersradiusupdate) | **PUT** /providers/radius/{id}/ | +*ProvidersAPI* | [**providersRadiusUsedByList**](ProvidersAPI.md#providersradiususedbylist) | **GET** /providers/radius/{id}/used_by/ | +*ProvidersAPI* | [**providersSamlCreate**](ProvidersAPI.md#providerssamlcreate) | **POST** /providers/saml/ | +*ProvidersAPI* | [**providersSamlDestroy**](ProvidersAPI.md#providerssamldestroy) | **DELETE** /providers/saml/{id}/ | +*ProvidersAPI* | [**providersSamlImportMetadataCreate**](ProvidersAPI.md#providerssamlimportmetadatacreate) | **POST** /providers/saml/import_metadata/ | +*ProvidersAPI* | [**providersSamlList**](ProvidersAPI.md#providerssamllist) | **GET** /providers/saml/ | +*ProvidersAPI* | [**providersSamlMetadataRetrieve**](ProvidersAPI.md#providerssamlmetadataretrieve) | **GET** /providers/saml/{id}/metadata/ | +*ProvidersAPI* | [**providersSamlPartialUpdate**](ProvidersAPI.md#providerssamlpartialupdate) | **PATCH** /providers/saml/{id}/ | +*ProvidersAPI* | [**providersSamlPreviewUserRetrieve**](ProvidersAPI.md#providerssamlpreviewuserretrieve) | **GET** /providers/saml/{id}/preview_user/ | +*ProvidersAPI* | [**providersSamlRetrieve**](ProvidersAPI.md#providerssamlretrieve) | **GET** /providers/saml/{id}/ | +*ProvidersAPI* | [**providersSamlUpdate**](ProvidersAPI.md#providerssamlupdate) | **PUT** /providers/saml/{id}/ | +*ProvidersAPI* | [**providersSamlUsedByList**](ProvidersAPI.md#providerssamlusedbylist) | **GET** /providers/saml/{id}/used_by/ | +*ProvidersAPI* | [**providersScimCreate**](ProvidersAPI.md#providersscimcreate) | **POST** /providers/scim/ | +*ProvidersAPI* | [**providersScimDestroy**](ProvidersAPI.md#providersscimdestroy) | **DELETE** /providers/scim/{id}/ | +*ProvidersAPI* | [**providersScimList**](ProvidersAPI.md#providersscimlist) | **GET** /providers/scim/ | +*ProvidersAPI* | [**providersScimPartialUpdate**](ProvidersAPI.md#providersscimpartialupdate) | **PATCH** /providers/scim/{id}/ | +*ProvidersAPI* | [**providersScimRetrieve**](ProvidersAPI.md#providersscimretrieve) | **GET** /providers/scim/{id}/ | +*ProvidersAPI* | [**providersScimSyncStatusRetrieve**](ProvidersAPI.md#providersscimsyncstatusretrieve) | **GET** /providers/scim/{id}/sync_status/ | +*ProvidersAPI* | [**providersScimUpdate**](ProvidersAPI.md#providersscimupdate) | **PUT** /providers/scim/{id}/ | +*ProvidersAPI* | [**providersScimUsedByList**](ProvidersAPI.md#providersscimusedbylist) | **GET** /providers/scim/{id}/used_by/ | +*RbacAPI* | [**rbacPermissionsAssignedByRolesAssignCreate**](RbacAPI.md#rbacpermissionsassignedbyrolesassigncreate) | **POST** /rbac/permissions/assigned_by_roles/{uuid}/assign/ | +*RbacAPI* | [**rbacPermissionsAssignedByRolesList**](RbacAPI.md#rbacpermissionsassignedbyroleslist) | **GET** /rbac/permissions/assigned_by_roles/ | +*RbacAPI* | [**rbacPermissionsAssignedByRolesUnassignPartialUpdate**](RbacAPI.md#rbacpermissionsassignedbyrolesunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_roles/{uuid}/unassign/ | +*RbacAPI* | [**rbacPermissionsAssignedByUsersAssignCreate**](RbacAPI.md#rbacpermissionsassignedbyusersassigncreate) | **POST** /rbac/permissions/assigned_by_users/{id}/assign/ | +*RbacAPI* | [**rbacPermissionsAssignedByUsersList**](RbacAPI.md#rbacpermissionsassignedbyuserslist) | **GET** /rbac/permissions/assigned_by_users/ | +*RbacAPI* | [**rbacPermissionsAssignedByUsersUnassignPartialUpdate**](RbacAPI.md#rbacpermissionsassignedbyusersunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_users/{id}/unassign/ | +*RbacAPI* | [**rbacPermissionsList**](RbacAPI.md#rbacpermissionslist) | **GET** /rbac/permissions/ | +*RbacAPI* | [**rbacPermissionsRetrieve**](RbacAPI.md#rbacpermissionsretrieve) | **GET** /rbac/permissions/{id}/ | +*RbacAPI* | [**rbacPermissionsRolesList**](RbacAPI.md#rbacpermissionsroleslist) | **GET** /rbac/permissions/roles/ | +*RbacAPI* | [**rbacPermissionsUsersList**](RbacAPI.md#rbacpermissionsuserslist) | **GET** /rbac/permissions/users/ | +*RbacAPI* | [**rbacRolesCreate**](RbacAPI.md#rbacrolescreate) | **POST** /rbac/roles/ | +*RbacAPI* | [**rbacRolesDestroy**](RbacAPI.md#rbacrolesdestroy) | **DELETE** /rbac/roles/{uuid}/ | +*RbacAPI* | [**rbacRolesList**](RbacAPI.md#rbacroleslist) | **GET** /rbac/roles/ | +*RbacAPI* | [**rbacRolesPartialUpdate**](RbacAPI.md#rbacrolespartialupdate) | **PATCH** /rbac/roles/{uuid}/ | +*RbacAPI* | [**rbacRolesRetrieve**](RbacAPI.md#rbacrolesretrieve) | **GET** /rbac/roles/{uuid}/ | +*RbacAPI* | [**rbacRolesUpdate**](RbacAPI.md#rbacrolesupdate) | **PUT** /rbac/roles/{uuid}/ | +*RbacAPI* | [**rbacRolesUsedByList**](RbacAPI.md#rbacrolesusedbylist) | **GET** /rbac/roles/{uuid}/used_by/ | +*RootAPI* | [**rootConfigRetrieve**](RootAPI.md#rootconfigretrieve) | **GET** /root/config/ | +*SchemaAPI* | [**schemaRetrieve**](SchemaAPI.md#schemaretrieve) | **GET** /schema/ | +*SourcesAPI* | [**sourcesAllDestroy**](SourcesAPI.md#sourcesalldestroy) | **DELETE** /sources/all/{slug}/ | +*SourcesAPI* | [**sourcesAllList**](SourcesAPI.md#sourcesalllist) | **GET** /sources/all/ | +*SourcesAPI* | [**sourcesAllRetrieve**](SourcesAPI.md#sourcesallretrieve) | **GET** /sources/all/{slug}/ | +*SourcesAPI* | [**sourcesAllSetIconCreate**](SourcesAPI.md#sourcesallseticoncreate) | **POST** /sources/all/{slug}/set_icon/ | +*SourcesAPI* | [**sourcesAllSetIconUrlCreate**](SourcesAPI.md#sourcesallseticonurlcreate) | **POST** /sources/all/{slug}/set_icon_url/ | +*SourcesAPI* | [**sourcesAllTypesList**](SourcesAPI.md#sourcesalltypeslist) | **GET** /sources/all/types/ | +*SourcesAPI* | [**sourcesAllUsedByList**](SourcesAPI.md#sourcesallusedbylist) | **GET** /sources/all/{slug}/used_by/ | +*SourcesAPI* | [**sourcesAllUserSettingsList**](SourcesAPI.md#sourcesallusersettingslist) | **GET** /sources/all/user_settings/ | +*SourcesAPI* | [**sourcesLdapCreate**](SourcesAPI.md#sourcesldapcreate) | **POST** /sources/ldap/ | +*SourcesAPI* | [**sourcesLdapDebugRetrieve**](SourcesAPI.md#sourcesldapdebugretrieve) | **GET** /sources/ldap/{slug}/debug/ | +*SourcesAPI* | [**sourcesLdapDestroy**](SourcesAPI.md#sourcesldapdestroy) | **DELETE** /sources/ldap/{slug}/ | +*SourcesAPI* | [**sourcesLdapList**](SourcesAPI.md#sourcesldaplist) | **GET** /sources/ldap/ | +*SourcesAPI* | [**sourcesLdapPartialUpdate**](SourcesAPI.md#sourcesldappartialupdate) | **PATCH** /sources/ldap/{slug}/ | +*SourcesAPI* | [**sourcesLdapRetrieve**](SourcesAPI.md#sourcesldapretrieve) | **GET** /sources/ldap/{slug}/ | +*SourcesAPI* | [**sourcesLdapSyncStatusRetrieve**](SourcesAPI.md#sourcesldapsyncstatusretrieve) | **GET** /sources/ldap/{slug}/sync_status/ | +*SourcesAPI* | [**sourcesLdapUpdate**](SourcesAPI.md#sourcesldapupdate) | **PUT** /sources/ldap/{slug}/ | +*SourcesAPI* | [**sourcesLdapUsedByList**](SourcesAPI.md#sourcesldapusedbylist) | **GET** /sources/ldap/{slug}/used_by/ | +*SourcesAPI* | [**sourcesOauthCreate**](SourcesAPI.md#sourcesoauthcreate) | **POST** /sources/oauth/ | +*SourcesAPI* | [**sourcesOauthDestroy**](SourcesAPI.md#sourcesoauthdestroy) | **DELETE** /sources/oauth/{slug}/ | +*SourcesAPI* | [**sourcesOauthList**](SourcesAPI.md#sourcesoauthlist) | **GET** /sources/oauth/ | +*SourcesAPI* | [**sourcesOauthPartialUpdate**](SourcesAPI.md#sourcesoauthpartialupdate) | **PATCH** /sources/oauth/{slug}/ | +*SourcesAPI* | [**sourcesOauthRetrieve**](SourcesAPI.md#sourcesoauthretrieve) | **GET** /sources/oauth/{slug}/ | +*SourcesAPI* | [**sourcesOauthSourceTypesList**](SourcesAPI.md#sourcesoauthsourcetypeslist) | **GET** /sources/oauth/source_types/ | +*SourcesAPI* | [**sourcesOauthUpdate**](SourcesAPI.md#sourcesoauthupdate) | **PUT** /sources/oauth/{slug}/ | +*SourcesAPI* | [**sourcesOauthUsedByList**](SourcesAPI.md#sourcesoauthusedbylist) | **GET** /sources/oauth/{slug}/used_by/ | +*SourcesAPI* | [**sourcesPlexCreate**](SourcesAPI.md#sourcesplexcreate) | **POST** /sources/plex/ | +*SourcesAPI* | [**sourcesPlexDestroy**](SourcesAPI.md#sourcesplexdestroy) | **DELETE** /sources/plex/{slug}/ | +*SourcesAPI* | [**sourcesPlexList**](SourcesAPI.md#sourcesplexlist) | **GET** /sources/plex/ | +*SourcesAPI* | [**sourcesPlexPartialUpdate**](SourcesAPI.md#sourcesplexpartialupdate) | **PATCH** /sources/plex/{slug}/ | +*SourcesAPI* | [**sourcesPlexRedeemTokenAuthenticatedCreate**](SourcesAPI.md#sourcesplexredeemtokenauthenticatedcreate) | **POST** /sources/plex/redeem_token_authenticated/ | +*SourcesAPI* | [**sourcesPlexRedeemTokenCreate**](SourcesAPI.md#sourcesplexredeemtokencreate) | **POST** /sources/plex/redeem_token/ | +*SourcesAPI* | [**sourcesPlexRetrieve**](SourcesAPI.md#sourcesplexretrieve) | **GET** /sources/plex/{slug}/ | +*SourcesAPI* | [**sourcesPlexUpdate**](SourcesAPI.md#sourcesplexupdate) | **PUT** /sources/plex/{slug}/ | +*SourcesAPI* | [**sourcesPlexUsedByList**](SourcesAPI.md#sourcesplexusedbylist) | **GET** /sources/plex/{slug}/used_by/ | +*SourcesAPI* | [**sourcesSamlCreate**](SourcesAPI.md#sourcessamlcreate) | **POST** /sources/saml/ | +*SourcesAPI* | [**sourcesSamlDestroy**](SourcesAPI.md#sourcessamldestroy) | **DELETE** /sources/saml/{slug}/ | +*SourcesAPI* | [**sourcesSamlList**](SourcesAPI.md#sourcessamllist) | **GET** /sources/saml/ | +*SourcesAPI* | [**sourcesSamlMetadataRetrieve**](SourcesAPI.md#sourcessamlmetadataretrieve) | **GET** /sources/saml/{slug}/metadata/ | +*SourcesAPI* | [**sourcesSamlPartialUpdate**](SourcesAPI.md#sourcessamlpartialupdate) | **PATCH** /sources/saml/{slug}/ | +*SourcesAPI* | [**sourcesSamlRetrieve**](SourcesAPI.md#sourcessamlretrieve) | **GET** /sources/saml/{slug}/ | +*SourcesAPI* | [**sourcesSamlUpdate**](SourcesAPI.md#sourcessamlupdate) | **PUT** /sources/saml/{slug}/ | +*SourcesAPI* | [**sourcesSamlUsedByList**](SourcesAPI.md#sourcessamlusedbylist) | **GET** /sources/saml/{slug}/used_by/ | +*SourcesAPI* | [**sourcesUserConnectionsAllDestroy**](SourcesAPI.md#sourcesuserconnectionsalldestroy) | **DELETE** /sources/user_connections/all/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsAllList**](SourcesAPI.md#sourcesuserconnectionsalllist) | **GET** /sources/user_connections/all/ | +*SourcesAPI* | [**sourcesUserConnectionsAllPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsallpartialupdate) | **PATCH** /sources/user_connections/all/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsAllRetrieve**](SourcesAPI.md#sourcesuserconnectionsallretrieve) | **GET** /sources/user_connections/all/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsAllUpdate**](SourcesAPI.md#sourcesuserconnectionsallupdate) | **PUT** /sources/user_connections/all/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsAllUsedByList**](SourcesAPI.md#sourcesuserconnectionsallusedbylist) | **GET** /sources/user_connections/all/{id}/used_by/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthCreate**](SourcesAPI.md#sourcesuserconnectionsoauthcreate) | **POST** /sources/user_connections/oauth/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthDestroy**](SourcesAPI.md#sourcesuserconnectionsoauthdestroy) | **DELETE** /sources/user_connections/oauth/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthList**](SourcesAPI.md#sourcesuserconnectionsoauthlist) | **GET** /sources/user_connections/oauth/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsoauthpartialupdate) | **PATCH** /sources/user_connections/oauth/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthRetrieve**](SourcesAPI.md#sourcesuserconnectionsoauthretrieve) | **GET** /sources/user_connections/oauth/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthUpdate**](SourcesAPI.md#sourcesuserconnectionsoauthupdate) | **PUT** /sources/user_connections/oauth/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsOauthUsedByList**](SourcesAPI.md#sourcesuserconnectionsoauthusedbylist) | **GET** /sources/user_connections/oauth/{id}/used_by/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexCreate**](SourcesAPI.md#sourcesuserconnectionsplexcreate) | **POST** /sources/user_connections/plex/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexDestroy**](SourcesAPI.md#sourcesuserconnectionsplexdestroy) | **DELETE** /sources/user_connections/plex/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexList**](SourcesAPI.md#sourcesuserconnectionsplexlist) | **GET** /sources/user_connections/plex/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsplexpartialupdate) | **PATCH** /sources/user_connections/plex/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexRetrieve**](SourcesAPI.md#sourcesuserconnectionsplexretrieve) | **GET** /sources/user_connections/plex/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexUpdate**](SourcesAPI.md#sourcesuserconnectionsplexupdate) | **PUT** /sources/user_connections/plex/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsPlexUsedByList**](SourcesAPI.md#sourcesuserconnectionsplexusedbylist) | **GET** /sources/user_connections/plex/{id}/used_by/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlCreate**](SourcesAPI.md#sourcesuserconnectionssamlcreate) | **POST** /sources/user_connections/saml/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlDestroy**](SourcesAPI.md#sourcesuserconnectionssamldestroy) | **DELETE** /sources/user_connections/saml/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlList**](SourcesAPI.md#sourcesuserconnectionssamllist) | **GET** /sources/user_connections/saml/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlPartialUpdate**](SourcesAPI.md#sourcesuserconnectionssamlpartialupdate) | **PATCH** /sources/user_connections/saml/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlRetrieve**](SourcesAPI.md#sourcesuserconnectionssamlretrieve) | **GET** /sources/user_connections/saml/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlUpdate**](SourcesAPI.md#sourcesuserconnectionssamlupdate) | **PUT** /sources/user_connections/saml/{id}/ | +*SourcesAPI* | [**sourcesUserConnectionsSamlUsedByList**](SourcesAPI.md#sourcesuserconnectionssamlusedbylist) | **GET** /sources/user_connections/saml/{id}/used_by/ | +*StagesAPI* | [**stagesAllDestroy**](StagesAPI.md#stagesalldestroy) | **DELETE** /stages/all/{stage_uuid}/ | +*StagesAPI* | [**stagesAllList**](StagesAPI.md#stagesalllist) | **GET** /stages/all/ | +*StagesAPI* | [**stagesAllRetrieve**](StagesAPI.md#stagesallretrieve) | **GET** /stages/all/{stage_uuid}/ | +*StagesAPI* | [**stagesAllTypesList**](StagesAPI.md#stagesalltypeslist) | **GET** /stages/all/types/ | +*StagesAPI* | [**stagesAllUsedByList**](StagesAPI.md#stagesallusedbylist) | **GET** /stages/all/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAllUserSettingsList**](StagesAPI.md#stagesallusersettingslist) | **GET** /stages/all/user_settings/ | +*StagesAPI* | [**stagesAuthenticatorDuoCreate**](StagesAPI.md#stagesauthenticatorduocreate) | **POST** /stages/authenticator/duo/ | +*StagesAPI* | [**stagesAuthenticatorDuoDestroy**](StagesAPI.md#stagesauthenticatorduodestroy) | **DELETE** /stages/authenticator/duo/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorDuoEnrollmentStatusCreate**](StagesAPI.md#stagesauthenticatorduoenrollmentstatuscreate) | **POST** /stages/authenticator/duo/{stage_uuid}/enrollment_status/ | +*StagesAPI* | [**stagesAuthenticatorDuoImportDeviceManualCreate**](StagesAPI.md#stagesauthenticatorduoimportdevicemanualcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_device_manual/ | +*StagesAPI* | [**stagesAuthenticatorDuoImportDevicesAutomaticCreate**](StagesAPI.md#stagesauthenticatorduoimportdevicesautomaticcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/ | +*StagesAPI* | [**stagesAuthenticatorDuoList**](StagesAPI.md#stagesauthenticatorduolist) | **GET** /stages/authenticator/duo/ | +*StagesAPI* | [**stagesAuthenticatorDuoPartialUpdate**](StagesAPI.md#stagesauthenticatorduopartialupdate) | **PATCH** /stages/authenticator/duo/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorDuoRetrieve**](StagesAPI.md#stagesauthenticatorduoretrieve) | **GET** /stages/authenticator/duo/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorDuoUpdate**](StagesAPI.md#stagesauthenticatorduoupdate) | **PUT** /stages/authenticator/duo/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorDuoUsedByList**](StagesAPI.md#stagesauthenticatorduousedbylist) | **GET** /stages/authenticator/duo/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorMobileCreate**](StagesAPI.md#stagesauthenticatormobilecreate) | **POST** /stages/authenticator/mobile/ | +*StagesAPI* | [**stagesAuthenticatorMobileDestroy**](StagesAPI.md#stagesauthenticatormobiledestroy) | **DELETE** /stages/authenticator/mobile/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorMobileList**](StagesAPI.md#stagesauthenticatormobilelist) | **GET** /stages/authenticator/mobile/ | +*StagesAPI* | [**stagesAuthenticatorMobilePartialUpdate**](StagesAPI.md#stagesauthenticatormobilepartialupdate) | **PATCH** /stages/authenticator/mobile/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorMobileRetrieve**](StagesAPI.md#stagesauthenticatormobileretrieve) | **GET** /stages/authenticator/mobile/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorMobileUpdate**](StagesAPI.md#stagesauthenticatormobileupdate) | **PUT** /stages/authenticator/mobile/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorMobileUsedByList**](StagesAPI.md#stagesauthenticatormobileusedbylist) | **GET** /stages/authenticator/mobile/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorSmsCreate**](StagesAPI.md#stagesauthenticatorsmscreate) | **POST** /stages/authenticator/sms/ | +*StagesAPI* | [**stagesAuthenticatorSmsDestroy**](StagesAPI.md#stagesauthenticatorsmsdestroy) | **DELETE** /stages/authenticator/sms/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorSmsList**](StagesAPI.md#stagesauthenticatorsmslist) | **GET** /stages/authenticator/sms/ | +*StagesAPI* | [**stagesAuthenticatorSmsPartialUpdate**](StagesAPI.md#stagesauthenticatorsmspartialupdate) | **PATCH** /stages/authenticator/sms/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorSmsRetrieve**](StagesAPI.md#stagesauthenticatorsmsretrieve) | **GET** /stages/authenticator/sms/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorSmsUpdate**](StagesAPI.md#stagesauthenticatorsmsupdate) | **PUT** /stages/authenticator/sms/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorSmsUsedByList**](StagesAPI.md#stagesauthenticatorsmsusedbylist) | **GET** /stages/authenticator/sms/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorStaticCreate**](StagesAPI.md#stagesauthenticatorstaticcreate) | **POST** /stages/authenticator/static/ | +*StagesAPI* | [**stagesAuthenticatorStaticDestroy**](StagesAPI.md#stagesauthenticatorstaticdestroy) | **DELETE** /stages/authenticator/static/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorStaticList**](StagesAPI.md#stagesauthenticatorstaticlist) | **GET** /stages/authenticator/static/ | +*StagesAPI* | [**stagesAuthenticatorStaticPartialUpdate**](StagesAPI.md#stagesauthenticatorstaticpartialupdate) | **PATCH** /stages/authenticator/static/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorStaticRetrieve**](StagesAPI.md#stagesauthenticatorstaticretrieve) | **GET** /stages/authenticator/static/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorStaticUpdate**](StagesAPI.md#stagesauthenticatorstaticupdate) | **PUT** /stages/authenticator/static/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorStaticUsedByList**](StagesAPI.md#stagesauthenticatorstaticusedbylist) | **GET** /stages/authenticator/static/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorTotpCreate**](StagesAPI.md#stagesauthenticatortotpcreate) | **POST** /stages/authenticator/totp/ | +*StagesAPI* | [**stagesAuthenticatorTotpDestroy**](StagesAPI.md#stagesauthenticatortotpdestroy) | **DELETE** /stages/authenticator/totp/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorTotpList**](StagesAPI.md#stagesauthenticatortotplist) | **GET** /stages/authenticator/totp/ | +*StagesAPI* | [**stagesAuthenticatorTotpPartialUpdate**](StagesAPI.md#stagesauthenticatortotppartialupdate) | **PATCH** /stages/authenticator/totp/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorTotpRetrieve**](StagesAPI.md#stagesauthenticatortotpretrieve) | **GET** /stages/authenticator/totp/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorTotpUpdate**](StagesAPI.md#stagesauthenticatortotpupdate) | **PUT** /stages/authenticator/totp/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorTotpUsedByList**](StagesAPI.md#stagesauthenticatortotpusedbylist) | **GET** /stages/authenticator/totp/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorValidateCreate**](StagesAPI.md#stagesauthenticatorvalidatecreate) | **POST** /stages/authenticator/validate/ | +*StagesAPI* | [**stagesAuthenticatorValidateDestroy**](StagesAPI.md#stagesauthenticatorvalidatedestroy) | **DELETE** /stages/authenticator/validate/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorValidateList**](StagesAPI.md#stagesauthenticatorvalidatelist) | **GET** /stages/authenticator/validate/ | +*StagesAPI* | [**stagesAuthenticatorValidatePartialUpdate**](StagesAPI.md#stagesauthenticatorvalidatepartialupdate) | **PATCH** /stages/authenticator/validate/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorValidateRetrieve**](StagesAPI.md#stagesauthenticatorvalidateretrieve) | **GET** /stages/authenticator/validate/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorValidateUpdate**](StagesAPI.md#stagesauthenticatorvalidateupdate) | **PUT** /stages/authenticator/validate/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorValidateUsedByList**](StagesAPI.md#stagesauthenticatorvalidateusedbylist) | **GET** /stages/authenticator/validate/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnCreate**](StagesAPI.md#stagesauthenticatorwebauthncreate) | **POST** /stages/authenticator/webauthn/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnDestroy**](StagesAPI.md#stagesauthenticatorwebauthndestroy) | **DELETE** /stages/authenticator/webauthn/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnList**](StagesAPI.md#stagesauthenticatorwebauthnlist) | **GET** /stages/authenticator/webauthn/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnPartialUpdate**](StagesAPI.md#stagesauthenticatorwebauthnpartialupdate) | **PATCH** /stages/authenticator/webauthn/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnRetrieve**](StagesAPI.md#stagesauthenticatorwebauthnretrieve) | **GET** /stages/authenticator/webauthn/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnUpdate**](StagesAPI.md#stagesauthenticatorwebauthnupdate) | **PUT** /stages/authenticator/webauthn/{stage_uuid}/ | +*StagesAPI* | [**stagesAuthenticatorWebauthnUsedByList**](StagesAPI.md#stagesauthenticatorwebauthnusedbylist) | **GET** /stages/authenticator/webauthn/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesCaptchaCreate**](StagesAPI.md#stagescaptchacreate) | **POST** /stages/captcha/ | +*StagesAPI* | [**stagesCaptchaDestroy**](StagesAPI.md#stagescaptchadestroy) | **DELETE** /stages/captcha/{stage_uuid}/ | +*StagesAPI* | [**stagesCaptchaList**](StagesAPI.md#stagescaptchalist) | **GET** /stages/captcha/ | +*StagesAPI* | [**stagesCaptchaPartialUpdate**](StagesAPI.md#stagescaptchapartialupdate) | **PATCH** /stages/captcha/{stage_uuid}/ | +*StagesAPI* | [**stagesCaptchaRetrieve**](StagesAPI.md#stagescaptcharetrieve) | **GET** /stages/captcha/{stage_uuid}/ | +*StagesAPI* | [**stagesCaptchaUpdate**](StagesAPI.md#stagescaptchaupdate) | **PUT** /stages/captcha/{stage_uuid}/ | +*StagesAPI* | [**stagesCaptchaUsedByList**](StagesAPI.md#stagescaptchausedbylist) | **GET** /stages/captcha/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesConsentCreate**](StagesAPI.md#stagesconsentcreate) | **POST** /stages/consent/ | +*StagesAPI* | [**stagesConsentDestroy**](StagesAPI.md#stagesconsentdestroy) | **DELETE** /stages/consent/{stage_uuid}/ | +*StagesAPI* | [**stagesConsentList**](StagesAPI.md#stagesconsentlist) | **GET** /stages/consent/ | +*StagesAPI* | [**stagesConsentPartialUpdate**](StagesAPI.md#stagesconsentpartialupdate) | **PATCH** /stages/consent/{stage_uuid}/ | +*StagesAPI* | [**stagesConsentRetrieve**](StagesAPI.md#stagesconsentretrieve) | **GET** /stages/consent/{stage_uuid}/ | +*StagesAPI* | [**stagesConsentUpdate**](StagesAPI.md#stagesconsentupdate) | **PUT** /stages/consent/{stage_uuid}/ | +*StagesAPI* | [**stagesConsentUsedByList**](StagesAPI.md#stagesconsentusedbylist) | **GET** /stages/consent/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesDenyCreate**](StagesAPI.md#stagesdenycreate) | **POST** /stages/deny/ | +*StagesAPI* | [**stagesDenyDestroy**](StagesAPI.md#stagesdenydestroy) | **DELETE** /stages/deny/{stage_uuid}/ | +*StagesAPI* | [**stagesDenyList**](StagesAPI.md#stagesdenylist) | **GET** /stages/deny/ | +*StagesAPI* | [**stagesDenyPartialUpdate**](StagesAPI.md#stagesdenypartialupdate) | **PATCH** /stages/deny/{stage_uuid}/ | +*StagesAPI* | [**stagesDenyRetrieve**](StagesAPI.md#stagesdenyretrieve) | **GET** /stages/deny/{stage_uuid}/ | +*StagesAPI* | [**stagesDenyUpdate**](StagesAPI.md#stagesdenyupdate) | **PUT** /stages/deny/{stage_uuid}/ | +*StagesAPI* | [**stagesDenyUsedByList**](StagesAPI.md#stagesdenyusedbylist) | **GET** /stages/deny/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesDummyCreate**](StagesAPI.md#stagesdummycreate) | **POST** /stages/dummy/ | +*StagesAPI* | [**stagesDummyDestroy**](StagesAPI.md#stagesdummydestroy) | **DELETE** /stages/dummy/{stage_uuid}/ | +*StagesAPI* | [**stagesDummyList**](StagesAPI.md#stagesdummylist) | **GET** /stages/dummy/ | +*StagesAPI* | [**stagesDummyPartialUpdate**](StagesAPI.md#stagesdummypartialupdate) | **PATCH** /stages/dummy/{stage_uuid}/ | +*StagesAPI* | [**stagesDummyRetrieve**](StagesAPI.md#stagesdummyretrieve) | **GET** /stages/dummy/{stage_uuid}/ | +*StagesAPI* | [**stagesDummyUpdate**](StagesAPI.md#stagesdummyupdate) | **PUT** /stages/dummy/{stage_uuid}/ | +*StagesAPI* | [**stagesDummyUsedByList**](StagesAPI.md#stagesdummyusedbylist) | **GET** /stages/dummy/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesEmailCreate**](StagesAPI.md#stagesemailcreate) | **POST** /stages/email/ | +*StagesAPI* | [**stagesEmailDestroy**](StagesAPI.md#stagesemaildestroy) | **DELETE** /stages/email/{stage_uuid}/ | +*StagesAPI* | [**stagesEmailList**](StagesAPI.md#stagesemaillist) | **GET** /stages/email/ | +*StagesAPI* | [**stagesEmailPartialUpdate**](StagesAPI.md#stagesemailpartialupdate) | **PATCH** /stages/email/{stage_uuid}/ | +*StagesAPI* | [**stagesEmailRetrieve**](StagesAPI.md#stagesemailretrieve) | **GET** /stages/email/{stage_uuid}/ | +*StagesAPI* | [**stagesEmailTemplatesList**](StagesAPI.md#stagesemailtemplateslist) | **GET** /stages/email/templates/ | +*StagesAPI* | [**stagesEmailUpdate**](StagesAPI.md#stagesemailupdate) | **PUT** /stages/email/{stage_uuid}/ | +*StagesAPI* | [**stagesEmailUsedByList**](StagesAPI.md#stagesemailusedbylist) | **GET** /stages/email/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesIdentificationCreate**](StagesAPI.md#stagesidentificationcreate) | **POST** /stages/identification/ | +*StagesAPI* | [**stagesIdentificationDestroy**](StagesAPI.md#stagesidentificationdestroy) | **DELETE** /stages/identification/{stage_uuid}/ | +*StagesAPI* | [**stagesIdentificationList**](StagesAPI.md#stagesidentificationlist) | **GET** /stages/identification/ | +*StagesAPI* | [**stagesIdentificationPartialUpdate**](StagesAPI.md#stagesidentificationpartialupdate) | **PATCH** /stages/identification/{stage_uuid}/ | +*StagesAPI* | [**stagesIdentificationRetrieve**](StagesAPI.md#stagesidentificationretrieve) | **GET** /stages/identification/{stage_uuid}/ | +*StagesAPI* | [**stagesIdentificationUpdate**](StagesAPI.md#stagesidentificationupdate) | **PUT** /stages/identification/{stage_uuid}/ | +*StagesAPI* | [**stagesIdentificationUsedByList**](StagesAPI.md#stagesidentificationusedbylist) | **GET** /stages/identification/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesInvitationInvitationsCreate**](StagesAPI.md#stagesinvitationinvitationscreate) | **POST** /stages/invitation/invitations/ | +*StagesAPI* | [**stagesInvitationInvitationsDestroy**](StagesAPI.md#stagesinvitationinvitationsdestroy) | **DELETE** /stages/invitation/invitations/{invite_uuid}/ | +*StagesAPI* | [**stagesInvitationInvitationsList**](StagesAPI.md#stagesinvitationinvitationslist) | **GET** /stages/invitation/invitations/ | +*StagesAPI* | [**stagesInvitationInvitationsPartialUpdate**](StagesAPI.md#stagesinvitationinvitationspartialupdate) | **PATCH** /stages/invitation/invitations/{invite_uuid}/ | +*StagesAPI* | [**stagesInvitationInvitationsRetrieve**](StagesAPI.md#stagesinvitationinvitationsretrieve) | **GET** /stages/invitation/invitations/{invite_uuid}/ | +*StagesAPI* | [**stagesInvitationInvitationsUpdate**](StagesAPI.md#stagesinvitationinvitationsupdate) | **PUT** /stages/invitation/invitations/{invite_uuid}/ | +*StagesAPI* | [**stagesInvitationInvitationsUsedByList**](StagesAPI.md#stagesinvitationinvitationsusedbylist) | **GET** /stages/invitation/invitations/{invite_uuid}/used_by/ | +*StagesAPI* | [**stagesInvitationStagesCreate**](StagesAPI.md#stagesinvitationstagescreate) | **POST** /stages/invitation/stages/ | +*StagesAPI* | [**stagesInvitationStagesDestroy**](StagesAPI.md#stagesinvitationstagesdestroy) | **DELETE** /stages/invitation/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesInvitationStagesList**](StagesAPI.md#stagesinvitationstageslist) | **GET** /stages/invitation/stages/ | +*StagesAPI* | [**stagesInvitationStagesPartialUpdate**](StagesAPI.md#stagesinvitationstagespartialupdate) | **PATCH** /stages/invitation/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesInvitationStagesRetrieve**](StagesAPI.md#stagesinvitationstagesretrieve) | **GET** /stages/invitation/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesInvitationStagesUpdate**](StagesAPI.md#stagesinvitationstagesupdate) | **PUT** /stages/invitation/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesInvitationStagesUsedByList**](StagesAPI.md#stagesinvitationstagesusedbylist) | **GET** /stages/invitation/stages/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesPasswordCreate**](StagesAPI.md#stagespasswordcreate) | **POST** /stages/password/ | +*StagesAPI* | [**stagesPasswordDestroy**](StagesAPI.md#stagespassworddestroy) | **DELETE** /stages/password/{stage_uuid}/ | +*StagesAPI* | [**stagesPasswordList**](StagesAPI.md#stagespasswordlist) | **GET** /stages/password/ | +*StagesAPI* | [**stagesPasswordPartialUpdate**](StagesAPI.md#stagespasswordpartialupdate) | **PATCH** /stages/password/{stage_uuid}/ | +*StagesAPI* | [**stagesPasswordRetrieve**](StagesAPI.md#stagespasswordretrieve) | **GET** /stages/password/{stage_uuid}/ | +*StagesAPI* | [**stagesPasswordUpdate**](StagesAPI.md#stagespasswordupdate) | **PUT** /stages/password/{stage_uuid}/ | +*StagesAPI* | [**stagesPasswordUsedByList**](StagesAPI.md#stagespasswordusedbylist) | **GET** /stages/password/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesPromptPromptsCreate**](StagesAPI.md#stagespromptpromptscreate) | **POST** /stages/prompt/prompts/ | +*StagesAPI* | [**stagesPromptPromptsDestroy**](StagesAPI.md#stagespromptpromptsdestroy) | **DELETE** /stages/prompt/prompts/{prompt_uuid}/ | +*StagesAPI* | [**stagesPromptPromptsList**](StagesAPI.md#stagespromptpromptslist) | **GET** /stages/prompt/prompts/ | +*StagesAPI* | [**stagesPromptPromptsPartialUpdate**](StagesAPI.md#stagespromptpromptspartialupdate) | **PATCH** /stages/prompt/prompts/{prompt_uuid}/ | +*StagesAPI* | [**stagesPromptPromptsPreviewCreate**](StagesAPI.md#stagespromptpromptspreviewcreate) | **POST** /stages/prompt/prompts/preview/ | +*StagesAPI* | [**stagesPromptPromptsRetrieve**](StagesAPI.md#stagespromptpromptsretrieve) | **GET** /stages/prompt/prompts/{prompt_uuid}/ | +*StagesAPI* | [**stagesPromptPromptsUpdate**](StagesAPI.md#stagespromptpromptsupdate) | **PUT** /stages/prompt/prompts/{prompt_uuid}/ | +*StagesAPI* | [**stagesPromptPromptsUsedByList**](StagesAPI.md#stagespromptpromptsusedbylist) | **GET** /stages/prompt/prompts/{prompt_uuid}/used_by/ | +*StagesAPI* | [**stagesPromptStagesCreate**](StagesAPI.md#stagespromptstagescreate) | **POST** /stages/prompt/stages/ | +*StagesAPI* | [**stagesPromptStagesDestroy**](StagesAPI.md#stagespromptstagesdestroy) | **DELETE** /stages/prompt/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesPromptStagesList**](StagesAPI.md#stagespromptstageslist) | **GET** /stages/prompt/stages/ | +*StagesAPI* | [**stagesPromptStagesPartialUpdate**](StagesAPI.md#stagespromptstagespartialupdate) | **PATCH** /stages/prompt/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesPromptStagesRetrieve**](StagesAPI.md#stagespromptstagesretrieve) | **GET** /stages/prompt/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesPromptStagesUpdate**](StagesAPI.md#stagespromptstagesupdate) | **PUT** /stages/prompt/stages/{stage_uuid}/ | +*StagesAPI* | [**stagesPromptStagesUsedByList**](StagesAPI.md#stagespromptstagesusedbylist) | **GET** /stages/prompt/stages/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesUserDeleteCreate**](StagesAPI.md#stagesuserdeletecreate) | **POST** /stages/user_delete/ | +*StagesAPI* | [**stagesUserDeleteDestroy**](StagesAPI.md#stagesuserdeletedestroy) | **DELETE** /stages/user_delete/{stage_uuid}/ | +*StagesAPI* | [**stagesUserDeleteList**](StagesAPI.md#stagesuserdeletelist) | **GET** /stages/user_delete/ | +*StagesAPI* | [**stagesUserDeletePartialUpdate**](StagesAPI.md#stagesuserdeletepartialupdate) | **PATCH** /stages/user_delete/{stage_uuid}/ | +*StagesAPI* | [**stagesUserDeleteRetrieve**](StagesAPI.md#stagesuserdeleteretrieve) | **GET** /stages/user_delete/{stage_uuid}/ | +*StagesAPI* | [**stagesUserDeleteUpdate**](StagesAPI.md#stagesuserdeleteupdate) | **PUT** /stages/user_delete/{stage_uuid}/ | +*StagesAPI* | [**stagesUserDeleteUsedByList**](StagesAPI.md#stagesuserdeleteusedbylist) | **GET** /stages/user_delete/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesUserLoginCreate**](StagesAPI.md#stagesuserlogincreate) | **POST** /stages/user_login/ | +*StagesAPI* | [**stagesUserLoginDestroy**](StagesAPI.md#stagesuserlogindestroy) | **DELETE** /stages/user_login/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLoginList**](StagesAPI.md#stagesuserloginlist) | **GET** /stages/user_login/ | +*StagesAPI* | [**stagesUserLoginPartialUpdate**](StagesAPI.md#stagesuserloginpartialupdate) | **PATCH** /stages/user_login/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLoginRetrieve**](StagesAPI.md#stagesuserloginretrieve) | **GET** /stages/user_login/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLoginUpdate**](StagesAPI.md#stagesuserloginupdate) | **PUT** /stages/user_login/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLoginUsedByList**](StagesAPI.md#stagesuserloginusedbylist) | **GET** /stages/user_login/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesUserLogoutCreate**](StagesAPI.md#stagesuserlogoutcreate) | **POST** /stages/user_logout/ | +*StagesAPI* | [**stagesUserLogoutDestroy**](StagesAPI.md#stagesuserlogoutdestroy) | **DELETE** /stages/user_logout/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLogoutList**](StagesAPI.md#stagesuserlogoutlist) | **GET** /stages/user_logout/ | +*StagesAPI* | [**stagesUserLogoutPartialUpdate**](StagesAPI.md#stagesuserlogoutpartialupdate) | **PATCH** /stages/user_logout/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLogoutRetrieve**](StagesAPI.md#stagesuserlogoutretrieve) | **GET** /stages/user_logout/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLogoutUpdate**](StagesAPI.md#stagesuserlogoutupdate) | **PUT** /stages/user_logout/{stage_uuid}/ | +*StagesAPI* | [**stagesUserLogoutUsedByList**](StagesAPI.md#stagesuserlogoutusedbylist) | **GET** /stages/user_logout/{stage_uuid}/used_by/ | +*StagesAPI* | [**stagesUserWriteCreate**](StagesAPI.md#stagesuserwritecreate) | **POST** /stages/user_write/ | +*StagesAPI* | [**stagesUserWriteDestroy**](StagesAPI.md#stagesuserwritedestroy) | **DELETE** /stages/user_write/{stage_uuid}/ | +*StagesAPI* | [**stagesUserWriteList**](StagesAPI.md#stagesuserwritelist) | **GET** /stages/user_write/ | +*StagesAPI* | [**stagesUserWritePartialUpdate**](StagesAPI.md#stagesuserwritepartialupdate) | **PATCH** /stages/user_write/{stage_uuid}/ | +*StagesAPI* | [**stagesUserWriteRetrieve**](StagesAPI.md#stagesuserwriteretrieve) | **GET** /stages/user_write/{stage_uuid}/ | +*StagesAPI* | [**stagesUserWriteUpdate**](StagesAPI.md#stagesuserwriteupdate) | **PUT** /stages/user_write/{stage_uuid}/ | +*StagesAPI* | [**stagesUserWriteUsedByList**](StagesAPI.md#stagesuserwriteusedbylist) | **GET** /stages/user_write/{stage_uuid}/used_by/ | ## Documentation For Models - - [AccessDeniedChallenge](docs/AccessDeniedChallenge.md) - - [App](docs/App.md) - - [AppEnum](docs/AppEnum.md) - - [AppleChallengeResponseRequest](docs/AppleChallengeResponseRequest.md) - - [AppleLoginChallenge](docs/AppleLoginChallenge.md) - - [Application](docs/Application.md) - - [ApplicationRequest](docs/ApplicationRequest.md) - - [AuthTypeEnum](docs/AuthTypeEnum.md) - - [AuthenticateWebAuthnStage](docs/AuthenticateWebAuthnStage.md) - - [AuthenticateWebAuthnStageRequest](docs/AuthenticateWebAuthnStageRequest.md) - - [AuthenticatedSession](docs/AuthenticatedSession.md) - - [AuthenticatedSessionGeoIp](docs/AuthenticatedSessionGeoIp.md) - - [AuthenticatedSessionUserAgent](docs/AuthenticatedSessionUserAgent.md) - - [AuthenticatedSessionUserAgentDevice](docs/AuthenticatedSessionUserAgentDevice.md) - - [AuthenticatedSessionUserAgentOs](docs/AuthenticatedSessionUserAgentOs.md) - - [AuthenticatedSessionUserAgentUserAgent](docs/AuthenticatedSessionUserAgentUserAgent.md) - - [AuthenticationEnum](docs/AuthenticationEnum.md) - - [AuthenticatorAttachmentEnum](docs/AuthenticatorAttachmentEnum.md) - - [AuthenticatorDuoChallenge](docs/AuthenticatorDuoChallenge.md) - - [AuthenticatorDuoChallengeResponseRequest](docs/AuthenticatorDuoChallengeResponseRequest.md) - - [AuthenticatorDuoStage](docs/AuthenticatorDuoStage.md) - - [AuthenticatorDuoStageDeviceImportResponse](docs/AuthenticatorDuoStageDeviceImportResponse.md) - - [AuthenticatorDuoStageManualDeviceImportRequest](docs/AuthenticatorDuoStageManualDeviceImportRequest.md) - - [AuthenticatorDuoStageRequest](docs/AuthenticatorDuoStageRequest.md) - - [AuthenticatorSMSChallenge](docs/AuthenticatorSMSChallenge.md) - - [AuthenticatorSMSChallengeResponseRequest](docs/AuthenticatorSMSChallengeResponseRequest.md) - - [AuthenticatorSMSStage](docs/AuthenticatorSMSStage.md) - - [AuthenticatorSMSStageRequest](docs/AuthenticatorSMSStageRequest.md) - - [AuthenticatorStaticChallenge](docs/AuthenticatorStaticChallenge.md) - - [AuthenticatorStaticChallengeResponseRequest](docs/AuthenticatorStaticChallengeResponseRequest.md) - - [AuthenticatorStaticStage](docs/AuthenticatorStaticStage.md) - - [AuthenticatorStaticStageRequest](docs/AuthenticatorStaticStageRequest.md) - - [AuthenticatorTOTPChallenge](docs/AuthenticatorTOTPChallenge.md) - - [AuthenticatorTOTPChallengeResponseRequest](docs/AuthenticatorTOTPChallengeResponseRequest.md) - - [AuthenticatorTOTPStage](docs/AuthenticatorTOTPStage.md) - - [AuthenticatorTOTPStageRequest](docs/AuthenticatorTOTPStageRequest.md) - - [AuthenticatorValidateStage](docs/AuthenticatorValidateStage.md) - - [AuthenticatorValidateStageRequest](docs/AuthenticatorValidateStageRequest.md) - - [AuthenticatorValidationChallenge](docs/AuthenticatorValidationChallenge.md) - - [AuthenticatorValidationChallengeResponseRequest](docs/AuthenticatorValidationChallengeResponseRequest.md) - - [AuthenticatorWebAuthnChallenge](docs/AuthenticatorWebAuthnChallenge.md) - - [AuthenticatorWebAuthnChallengeResponseRequest](docs/AuthenticatorWebAuthnChallengeResponseRequest.md) - - [AutoSubmitChallengeResponseRequest](docs/AutoSubmitChallengeResponseRequest.md) - - [AutosubmitChallenge](docs/AutosubmitChallenge.md) - - [BackendsEnum](docs/BackendsEnum.md) - - [BindingTypeEnum](docs/BindingTypeEnum.md) - - [BlueprintFile](docs/BlueprintFile.md) - - [BlueprintInstance](docs/BlueprintInstance.md) - - [BlueprintInstanceRequest](docs/BlueprintInstanceRequest.md) - - [BlueprintInstanceStatusEnum](docs/BlueprintInstanceStatusEnum.md) - - [Cache](docs/Cache.md) - - [CapabilitiesEnum](docs/CapabilitiesEnum.md) - - [CaptchaChallenge](docs/CaptchaChallenge.md) - - [CaptchaChallengeResponseRequest](docs/CaptchaChallengeResponseRequest.md) - - [CaptchaStage](docs/CaptchaStage.md) - - [CaptchaStageRequest](docs/CaptchaStageRequest.md) - - [CertificateData](docs/CertificateData.md) - - [CertificateGenerationRequest](docs/CertificateGenerationRequest.md) - - [CertificateKeyPair](docs/CertificateKeyPair.md) - - [CertificateKeyPairRequest](docs/CertificateKeyPairRequest.md) - - [ChallengeChoices](docs/ChallengeChoices.md) - - [ChallengeTypes](docs/ChallengeTypes.md) - - [ClientTypeEnum](docs/ClientTypeEnum.md) - - [Config](docs/Config.md) - - [ConsentChallenge](docs/ConsentChallenge.md) - - [ConsentChallengeResponseRequest](docs/ConsentChallengeResponseRequest.md) - - [ConsentPermission](docs/ConsentPermission.md) - - [ConsentStage](docs/ConsentStage.md) - - [ConsentStageModeEnum](docs/ConsentStageModeEnum.md) - - [ConsentStageRequest](docs/ConsentStageRequest.md) - - [ContextualFlowInfo](docs/ContextualFlowInfo.md) - - [Coordinate](docs/Coordinate.md) - - [CurrentTenant](docs/CurrentTenant.md) - - [DeniedActionEnum](docs/DeniedActionEnum.md) - - [DenyStage](docs/DenyStage.md) - - [DenyStageRequest](docs/DenyStageRequest.md) - - [Device](docs/Device.md) - - [DeviceChallenge](docs/DeviceChallenge.md) - - [DeviceChallengeRequest](docs/DeviceChallengeRequest.md) - - [DeviceClassesEnum](docs/DeviceClassesEnum.md) - - [DigestAlgorithmEnum](docs/DigestAlgorithmEnum.md) - - [DigitsEnum](docs/DigitsEnum.md) - - [DockerServiceConnection](docs/DockerServiceConnection.md) - - [DockerServiceConnectionRequest](docs/DockerServiceConnectionRequest.md) - - [DummyChallenge](docs/DummyChallenge.md) - - [DummyChallengeResponseRequest](docs/DummyChallengeResponseRequest.md) - - [DummyPolicy](docs/DummyPolicy.md) - - [DummyPolicyRequest](docs/DummyPolicyRequest.md) - - [DummyStage](docs/DummyStage.md) - - [DummyStageRequest](docs/DummyStageRequest.md) - - [DuoDevice](docs/DuoDevice.md) - - [DuoDeviceEnrollmentStatus](docs/DuoDeviceEnrollmentStatus.md) - - [DuoDeviceRequest](docs/DuoDeviceRequest.md) - - [DuoResponseEnum](docs/DuoResponseEnum.md) - - [EmailChallenge](docs/EmailChallenge.md) - - [EmailChallengeResponseRequest](docs/EmailChallengeResponseRequest.md) - - [EmailStage](docs/EmailStage.md) - - [EmailStageRequest](docs/EmailStageRequest.md) - - [ErrorDetail](docs/ErrorDetail.md) - - [ErrorReportingConfig](docs/ErrorReportingConfig.md) - - [Event](docs/Event.md) - - [EventActions](docs/EventActions.md) - - [EventMatcherPolicy](docs/EventMatcherPolicy.md) - - [EventMatcherPolicyRequest](docs/EventMatcherPolicyRequest.md) - - [EventRequest](docs/EventRequest.md) - - [EventTopPerUser](docs/EventTopPerUser.md) - - [ExpiringBaseGrantModel](docs/ExpiringBaseGrantModel.md) - - [ExpressionPolicy](docs/ExpressionPolicy.md) - - [ExpressionPolicyRequest](docs/ExpressionPolicyRequest.md) - - [ExtraRoleObjectPermission](docs/ExtraRoleObjectPermission.md) - - [ExtraUserObjectPermission](docs/ExtraUserObjectPermission.md) - - [FilePathRequest](docs/FilePathRequest.md) - - [Flow](docs/Flow.md) - - [FlowChallengeResponseRequest](docs/FlowChallengeResponseRequest.md) - - [FlowDesignationEnum](docs/FlowDesignationEnum.md) - - [FlowDiagram](docs/FlowDiagram.md) - - [FlowErrorChallenge](docs/FlowErrorChallenge.md) - - [FlowImportResult](docs/FlowImportResult.md) - - [FlowInspection](docs/FlowInspection.md) - - [FlowInspectorPlan](docs/FlowInspectorPlan.md) - - [FlowRequest](docs/FlowRequest.md) - - [FlowSet](docs/FlowSet.md) - - [FlowSetRequest](docs/FlowSetRequest.md) - - [FlowStageBinding](docs/FlowStageBinding.md) - - [FlowStageBindingRequest](docs/FlowStageBindingRequest.md) - - [FooterLink](docs/FooterLink.md) - - [GenericError](docs/GenericError.md) - - [Group](docs/Group.md) - - [GroupMember](docs/GroupMember.md) - - [GroupMemberRequest](docs/GroupMemberRequest.md) - - [GroupRequest](docs/GroupRequest.md) - - [IdentificationChallenge](docs/IdentificationChallenge.md) - - [IdentificationChallengeResponseRequest](docs/IdentificationChallengeResponseRequest.md) - - [IdentificationStage](docs/IdentificationStage.md) - - [IdentificationStageRequest](docs/IdentificationStageRequest.md) - - [InstallID](docs/InstallID.md) - - [IntentEnum](docs/IntentEnum.md) - - [InvalidResponseActionEnum](docs/InvalidResponseActionEnum.md) - - [Invitation](docs/Invitation.md) - - [InvitationRequest](docs/InvitationRequest.md) - - [InvitationStage](docs/InvitationStage.md) - - [InvitationStageRequest](docs/InvitationStageRequest.md) - - [IssuerModeEnum](docs/IssuerModeEnum.md) - - [KubernetesServiceConnection](docs/KubernetesServiceConnection.md) - - [KubernetesServiceConnectionRequest](docs/KubernetesServiceConnectionRequest.md) - - [LDAPAPIAccessMode](docs/LDAPAPIAccessMode.md) - - [LDAPDebug](docs/LDAPDebug.md) - - [LDAPOutpostConfig](docs/LDAPOutpostConfig.md) - - [LDAPPropertyMapping](docs/LDAPPropertyMapping.md) - - [LDAPPropertyMappingRequest](docs/LDAPPropertyMappingRequest.md) - - [LDAPProvider](docs/LDAPProvider.md) - - [LDAPProviderRequest](docs/LDAPProviderRequest.md) - - [LDAPSource](docs/LDAPSource.md) - - [LDAPSourceRequest](docs/LDAPSourceRequest.md) - - [LDAPSyncStatus](docs/LDAPSyncStatus.md) - - [LayoutEnum](docs/LayoutEnum.md) - - [License](docs/License.md) - - [LicenseForecast](docs/LicenseForecast.md) - - [LicenseRequest](docs/LicenseRequest.md) - - [LicenseSummary](docs/LicenseSummary.md) - - [Link](docs/Link.md) - - [LoginChallengeTypes](docs/LoginChallengeTypes.md) - - [LoginMetrics](docs/LoginMetrics.md) - - [LoginSource](docs/LoginSource.md) - - [Metadata](docs/Metadata.md) - - [ModelEnum](docs/ModelEnum.md) - - [ModelRequest](docs/ModelRequest.md) - - [NameIdPolicyEnum](docs/NameIdPolicyEnum.md) - - [NotConfiguredActionEnum](docs/NotConfiguredActionEnum.md) - - [Notification](docs/Notification.md) - - [NotificationRequest](docs/NotificationRequest.md) - - [NotificationRule](docs/NotificationRule.md) - - [NotificationRuleRequest](docs/NotificationRuleRequest.md) - - [NotificationTransport](docs/NotificationTransport.md) - - [NotificationTransportModeEnum](docs/NotificationTransportModeEnum.md) - - [NotificationTransportRequest](docs/NotificationTransportRequest.md) - - [NotificationTransportTest](docs/NotificationTransportTest.md) - - [NotificationWebhookMapping](docs/NotificationWebhookMapping.md) - - [NotificationWebhookMappingRequest](docs/NotificationWebhookMappingRequest.md) - - [OAuth2Provider](docs/OAuth2Provider.md) - - [OAuth2ProviderRequest](docs/OAuth2ProviderRequest.md) - - [OAuth2ProviderSetupURLs](docs/OAuth2ProviderSetupURLs.md) - - [OAuthDeviceCodeChallenge](docs/OAuthDeviceCodeChallenge.md) - - [OAuthDeviceCodeChallengeResponseRequest](docs/OAuthDeviceCodeChallengeResponseRequest.md) - - [OAuthDeviceCodeFinishChallenge](docs/OAuthDeviceCodeFinishChallenge.md) - - [OAuthDeviceCodeFinishChallengeResponseRequest](docs/OAuthDeviceCodeFinishChallengeResponseRequest.md) - - [OAuthSource](docs/OAuthSource.md) - - [OAuthSourceRequest](docs/OAuthSourceRequest.md) - - [OpenIDConnectConfiguration](docs/OpenIDConnectConfiguration.md) - - [Outpost](docs/Outpost.md) - - [OutpostDefaultConfig](docs/OutpostDefaultConfig.md) - - [OutpostHealth](docs/OutpostHealth.md) - - [OutpostRequest](docs/OutpostRequest.md) - - [OutpostTypeEnum](docs/OutpostTypeEnum.md) - - [PaginatedApplicationList](docs/PaginatedApplicationList.md) - - [PaginatedAuthenticateWebAuthnStageList](docs/PaginatedAuthenticateWebAuthnStageList.md) - - [PaginatedAuthenticatedSessionList](docs/PaginatedAuthenticatedSessionList.md) - - [PaginatedAuthenticatorDuoStageList](docs/PaginatedAuthenticatorDuoStageList.md) - - [PaginatedAuthenticatorSMSStageList](docs/PaginatedAuthenticatorSMSStageList.md) - - [PaginatedAuthenticatorStaticStageList](docs/PaginatedAuthenticatorStaticStageList.md) - - [PaginatedAuthenticatorTOTPStageList](docs/PaginatedAuthenticatorTOTPStageList.md) - - [PaginatedAuthenticatorValidateStageList](docs/PaginatedAuthenticatorValidateStageList.md) - - [PaginatedBlueprintInstanceList](docs/PaginatedBlueprintInstanceList.md) - - [PaginatedCaptchaStageList](docs/PaginatedCaptchaStageList.md) - - [PaginatedCertificateKeyPairList](docs/PaginatedCertificateKeyPairList.md) - - [PaginatedConsentStageList](docs/PaginatedConsentStageList.md) - - [PaginatedDenyStageList](docs/PaginatedDenyStageList.md) - - [PaginatedDockerServiceConnectionList](docs/PaginatedDockerServiceConnectionList.md) - - [PaginatedDummyPolicyList](docs/PaginatedDummyPolicyList.md) - - [PaginatedDummyStageList](docs/PaginatedDummyStageList.md) - - [PaginatedDuoDeviceList](docs/PaginatedDuoDeviceList.md) - - [PaginatedEmailStageList](docs/PaginatedEmailStageList.md) - - [PaginatedEventList](docs/PaginatedEventList.md) - - [PaginatedEventMatcherPolicyList](docs/PaginatedEventMatcherPolicyList.md) - - [PaginatedExpiringBaseGrantModelList](docs/PaginatedExpiringBaseGrantModelList.md) - - [PaginatedExpressionPolicyList](docs/PaginatedExpressionPolicyList.md) - - [PaginatedExtraRoleObjectPermissionList](docs/PaginatedExtraRoleObjectPermissionList.md) - - [PaginatedExtraUserObjectPermissionList](docs/PaginatedExtraUserObjectPermissionList.md) - - [PaginatedFlowList](docs/PaginatedFlowList.md) - - [PaginatedFlowStageBindingList](docs/PaginatedFlowStageBindingList.md) - - [PaginatedGroupList](docs/PaginatedGroupList.md) - - [PaginatedIdentificationStageList](docs/PaginatedIdentificationStageList.md) - - [PaginatedInvitationList](docs/PaginatedInvitationList.md) - - [PaginatedInvitationStageList](docs/PaginatedInvitationStageList.md) - - [PaginatedKubernetesServiceConnectionList](docs/PaginatedKubernetesServiceConnectionList.md) - - [PaginatedLDAPOutpostConfigList](docs/PaginatedLDAPOutpostConfigList.md) - - [PaginatedLDAPPropertyMappingList](docs/PaginatedLDAPPropertyMappingList.md) - - [PaginatedLDAPProviderList](docs/PaginatedLDAPProviderList.md) - - [PaginatedLDAPSourceList](docs/PaginatedLDAPSourceList.md) - - [PaginatedLicenseList](docs/PaginatedLicenseList.md) - - [PaginatedNotificationList](docs/PaginatedNotificationList.md) - - [PaginatedNotificationRuleList](docs/PaginatedNotificationRuleList.md) - - [PaginatedNotificationTransportList](docs/PaginatedNotificationTransportList.md) - - [PaginatedNotificationWebhookMappingList](docs/PaginatedNotificationWebhookMappingList.md) - - [PaginatedOAuth2ProviderList](docs/PaginatedOAuth2ProviderList.md) - - [PaginatedOAuthSourceList](docs/PaginatedOAuthSourceList.md) - - [PaginatedOutpostList](docs/PaginatedOutpostList.md) - - [PaginatedPasswordExpiryPolicyList](docs/PaginatedPasswordExpiryPolicyList.md) - - [PaginatedPasswordPolicyList](docs/PaginatedPasswordPolicyList.md) - - [PaginatedPasswordStageList](docs/PaginatedPasswordStageList.md) - - [PaginatedPermissionList](docs/PaginatedPermissionList.md) - - [PaginatedPlexSourceConnectionList](docs/PaginatedPlexSourceConnectionList.md) - - [PaginatedPlexSourceList](docs/PaginatedPlexSourceList.md) - - [PaginatedPolicyBindingList](docs/PaginatedPolicyBindingList.md) - - [PaginatedPolicyList](docs/PaginatedPolicyList.md) - - [PaginatedPromptList](docs/PaginatedPromptList.md) - - [PaginatedPromptStageList](docs/PaginatedPromptStageList.md) - - [PaginatedPropertyMappingList](docs/PaginatedPropertyMappingList.md) - - [PaginatedProviderList](docs/PaginatedProviderList.md) - - [PaginatedProxyOutpostConfigList](docs/PaginatedProxyOutpostConfigList.md) - - [PaginatedProxyProviderList](docs/PaginatedProxyProviderList.md) - - [PaginatedRadiusOutpostConfigList](docs/PaginatedRadiusOutpostConfigList.md) - - [PaginatedRadiusProviderList](docs/PaginatedRadiusProviderList.md) - - [PaginatedReputationList](docs/PaginatedReputationList.md) - - [PaginatedReputationPolicyList](docs/PaginatedReputationPolicyList.md) - - [PaginatedRoleAssignedObjectPermissionList](docs/PaginatedRoleAssignedObjectPermissionList.md) - - [PaginatedRoleList](docs/PaginatedRoleList.md) - - [PaginatedSAMLPropertyMappingList](docs/PaginatedSAMLPropertyMappingList.md) - - [PaginatedSAMLProviderList](docs/PaginatedSAMLProviderList.md) - - [PaginatedSAMLSourceList](docs/PaginatedSAMLSourceList.md) - - [PaginatedSCIMMappingList](docs/PaginatedSCIMMappingList.md) - - [PaginatedSCIMProviderList](docs/PaginatedSCIMProviderList.md) - - [PaginatedSMSDeviceList](docs/PaginatedSMSDeviceList.md) - - [PaginatedScopeMappingList](docs/PaginatedScopeMappingList.md) - - [PaginatedServiceConnectionList](docs/PaginatedServiceConnectionList.md) - - [PaginatedSourceList](docs/PaginatedSourceList.md) - - [PaginatedStageList](docs/PaginatedStageList.md) - - [PaginatedStaticDeviceList](docs/PaginatedStaticDeviceList.md) - - [PaginatedTOTPDeviceList](docs/PaginatedTOTPDeviceList.md) - - [PaginatedTenantList](docs/PaginatedTenantList.md) - - [PaginatedTokenList](docs/PaginatedTokenList.md) - - [PaginatedTokenModelList](docs/PaginatedTokenModelList.md) - - [PaginatedUserAssignedObjectPermissionList](docs/PaginatedUserAssignedObjectPermissionList.md) - - [PaginatedUserConsentList](docs/PaginatedUserConsentList.md) - - [PaginatedUserDeleteStageList](docs/PaginatedUserDeleteStageList.md) - - [PaginatedUserList](docs/PaginatedUserList.md) - - [PaginatedUserLoginStageList](docs/PaginatedUserLoginStageList.md) - - [PaginatedUserLogoutStageList](docs/PaginatedUserLogoutStageList.md) - - [PaginatedUserOAuthSourceConnectionList](docs/PaginatedUserOAuthSourceConnectionList.md) - - [PaginatedUserSAMLSourceConnectionList](docs/PaginatedUserSAMLSourceConnectionList.md) - - [PaginatedUserSourceConnectionList](docs/PaginatedUserSourceConnectionList.md) - - [PaginatedUserWriteStageList](docs/PaginatedUserWriteStageList.md) - - [PaginatedWebAuthnDeviceList](docs/PaginatedWebAuthnDeviceList.md) - - [Pagination](docs/Pagination.md) - - [PasswordChallenge](docs/PasswordChallenge.md) - - [PasswordChallengeResponseRequest](docs/PasswordChallengeResponseRequest.md) - - [PasswordExpiryPolicy](docs/PasswordExpiryPolicy.md) - - [PasswordExpiryPolicyRequest](docs/PasswordExpiryPolicyRequest.md) - - [PasswordPolicy](docs/PasswordPolicy.md) - - [PasswordPolicyRequest](docs/PasswordPolicyRequest.md) - - [PasswordStage](docs/PasswordStage.md) - - [PasswordStageRequest](docs/PasswordStageRequest.md) - - [PatchedApplicationRequest](docs/PatchedApplicationRequest.md) - - [PatchedAuthenticateWebAuthnStageRequest](docs/PatchedAuthenticateWebAuthnStageRequest.md) - - [PatchedAuthenticatorDuoStageRequest](docs/PatchedAuthenticatorDuoStageRequest.md) - - [PatchedAuthenticatorSMSStageRequest](docs/PatchedAuthenticatorSMSStageRequest.md) - - [PatchedAuthenticatorStaticStageRequest](docs/PatchedAuthenticatorStaticStageRequest.md) - - [PatchedAuthenticatorTOTPStageRequest](docs/PatchedAuthenticatorTOTPStageRequest.md) - - [PatchedAuthenticatorValidateStageRequest](docs/PatchedAuthenticatorValidateStageRequest.md) - - [PatchedBlueprintInstanceRequest](docs/PatchedBlueprintInstanceRequest.md) - - [PatchedCaptchaStageRequest](docs/PatchedCaptchaStageRequest.md) - - [PatchedCertificateKeyPairRequest](docs/PatchedCertificateKeyPairRequest.md) - - [PatchedConsentStageRequest](docs/PatchedConsentStageRequest.md) - - [PatchedDenyStageRequest](docs/PatchedDenyStageRequest.md) - - [PatchedDockerServiceConnectionRequest](docs/PatchedDockerServiceConnectionRequest.md) - - [PatchedDummyPolicyRequest](docs/PatchedDummyPolicyRequest.md) - - [PatchedDummyStageRequest](docs/PatchedDummyStageRequest.md) - - [PatchedDuoDeviceRequest](docs/PatchedDuoDeviceRequest.md) - - [PatchedEmailStageRequest](docs/PatchedEmailStageRequest.md) - - [PatchedEventMatcherPolicyRequest](docs/PatchedEventMatcherPolicyRequest.md) - - [PatchedEventRequest](docs/PatchedEventRequest.md) - - [PatchedExpressionPolicyRequest](docs/PatchedExpressionPolicyRequest.md) - - [PatchedFlowRequest](docs/PatchedFlowRequest.md) - - [PatchedFlowStageBindingRequest](docs/PatchedFlowStageBindingRequest.md) - - [PatchedGroupRequest](docs/PatchedGroupRequest.md) - - [PatchedIdentificationStageRequest](docs/PatchedIdentificationStageRequest.md) - - [PatchedInvitationRequest](docs/PatchedInvitationRequest.md) - - [PatchedInvitationStageRequest](docs/PatchedInvitationStageRequest.md) - - [PatchedKubernetesServiceConnectionRequest](docs/PatchedKubernetesServiceConnectionRequest.md) - - [PatchedLDAPPropertyMappingRequest](docs/PatchedLDAPPropertyMappingRequest.md) - - [PatchedLDAPProviderRequest](docs/PatchedLDAPProviderRequest.md) - - [PatchedLDAPSourceRequest](docs/PatchedLDAPSourceRequest.md) - - [PatchedLicenseRequest](docs/PatchedLicenseRequest.md) - - [PatchedNotificationRequest](docs/PatchedNotificationRequest.md) - - [PatchedNotificationRuleRequest](docs/PatchedNotificationRuleRequest.md) - - [PatchedNotificationTransportRequest](docs/PatchedNotificationTransportRequest.md) - - [PatchedNotificationWebhookMappingRequest](docs/PatchedNotificationWebhookMappingRequest.md) - - [PatchedOAuth2ProviderRequest](docs/PatchedOAuth2ProviderRequest.md) - - [PatchedOAuthSourceRequest](docs/PatchedOAuthSourceRequest.md) - - [PatchedOutpostRequest](docs/PatchedOutpostRequest.md) - - [PatchedPasswordExpiryPolicyRequest](docs/PatchedPasswordExpiryPolicyRequest.md) - - [PatchedPasswordPolicyRequest](docs/PatchedPasswordPolicyRequest.md) - - [PatchedPasswordStageRequest](docs/PatchedPasswordStageRequest.md) - - [PatchedPermissionAssignRequest](docs/PatchedPermissionAssignRequest.md) - - [PatchedPlexSourceConnectionRequest](docs/PatchedPlexSourceConnectionRequest.md) - - [PatchedPlexSourceRequest](docs/PatchedPlexSourceRequest.md) - - [PatchedPolicyBindingRequest](docs/PatchedPolicyBindingRequest.md) - - [PatchedPromptRequest](docs/PatchedPromptRequest.md) - - [PatchedPromptStageRequest](docs/PatchedPromptStageRequest.md) - - [PatchedProxyProviderRequest](docs/PatchedProxyProviderRequest.md) - - [PatchedRadiusProviderRequest](docs/PatchedRadiusProviderRequest.md) - - [PatchedReputationPolicyRequest](docs/PatchedReputationPolicyRequest.md) - - [PatchedRoleRequest](docs/PatchedRoleRequest.md) - - [PatchedSAMLPropertyMappingRequest](docs/PatchedSAMLPropertyMappingRequest.md) - - [PatchedSAMLProviderRequest](docs/PatchedSAMLProviderRequest.md) - - [PatchedSAMLSourceRequest](docs/PatchedSAMLSourceRequest.md) - - [PatchedSCIMMappingRequest](docs/PatchedSCIMMappingRequest.md) - - [PatchedSCIMProviderRequest](docs/PatchedSCIMProviderRequest.md) - - [PatchedSMSDeviceRequest](docs/PatchedSMSDeviceRequest.md) - - [PatchedScopeMappingRequest](docs/PatchedScopeMappingRequest.md) - - [PatchedStaticDeviceRequest](docs/PatchedStaticDeviceRequest.md) - - [PatchedTOTPDeviceRequest](docs/PatchedTOTPDeviceRequest.md) - - [PatchedTenantRequest](docs/PatchedTenantRequest.md) - - [PatchedTokenRequest](docs/PatchedTokenRequest.md) - - [PatchedUserDeleteStageRequest](docs/PatchedUserDeleteStageRequest.md) - - [PatchedUserLoginStageRequest](docs/PatchedUserLoginStageRequest.md) - - [PatchedUserLogoutStageRequest](docs/PatchedUserLogoutStageRequest.md) - - [PatchedUserOAuthSourceConnectionRequest](docs/PatchedUserOAuthSourceConnectionRequest.md) - - [PatchedUserRequest](docs/PatchedUserRequest.md) - - [PatchedUserSAMLSourceConnectionRequest](docs/PatchedUserSAMLSourceConnectionRequest.md) - - [PatchedUserWriteStageRequest](docs/PatchedUserWriteStageRequest.md) - - [PatchedWebAuthnDeviceRequest](docs/PatchedWebAuthnDeviceRequest.md) - - [Permission](docs/Permission.md) - - [PermissionAssignRequest](docs/PermissionAssignRequest.md) - - [PlexAuthenticationChallenge](docs/PlexAuthenticationChallenge.md) - - [PlexAuthenticationChallengeResponseRequest](docs/PlexAuthenticationChallengeResponseRequest.md) - - [PlexSource](docs/PlexSource.md) - - [PlexSourceConnection](docs/PlexSourceConnection.md) - - [PlexSourceConnectionRequest](docs/PlexSourceConnectionRequest.md) - - [PlexSourceRequest](docs/PlexSourceRequest.md) - - [PlexTokenRedeemRequest](docs/PlexTokenRedeemRequest.md) - - [Policy](docs/Policy.md) - - [PolicyBinding](docs/PolicyBinding.md) - - [PolicyBindingRequest](docs/PolicyBindingRequest.md) - - [PolicyEngineMode](docs/PolicyEngineMode.md) - - [PolicyRequest](docs/PolicyRequest.md) - - [PolicyTestRequest](docs/PolicyTestRequest.md) - - [PolicyTestResult](docs/PolicyTestResult.md) - - [Prompt](docs/Prompt.md) - - [PromptChallenge](docs/PromptChallenge.md) - - [PromptChallengeResponseRequest](docs/PromptChallengeResponseRequest.md) - - [PromptRequest](docs/PromptRequest.md) - - [PromptStage](docs/PromptStage.md) - - [PromptStageRequest](docs/PromptStageRequest.md) - - [PromptTypeEnum](docs/PromptTypeEnum.md) - - [PropertyMapping](docs/PropertyMapping.md) - - [PropertyMappingPreview](docs/PropertyMappingPreview.md) - - [PropertyMappingTestResult](docs/PropertyMappingTestResult.md) - - [Provider](docs/Provider.md) - - [ProviderEnum](docs/ProviderEnum.md) - - [ProviderModelEnum](docs/ProviderModelEnum.md) - - [ProviderRequest](docs/ProviderRequest.md) - - [ProviderTypeEnum](docs/ProviderTypeEnum.md) - - [ProxyMode](docs/ProxyMode.md) - - [ProxyOutpostConfig](docs/ProxyOutpostConfig.md) - - [ProxyProvider](docs/ProxyProvider.md) - - [ProxyProviderRequest](docs/ProxyProviderRequest.md) - - [RadiusOutpostConfig](docs/RadiusOutpostConfig.md) - - [RadiusProvider](docs/RadiusProvider.md) - - [RadiusProviderRequest](docs/RadiusProviderRequest.md) - - [RedirectChallenge](docs/RedirectChallenge.md) - - [Reputation](docs/Reputation.md) - - [ReputationPolicy](docs/ReputationPolicy.md) - - [ReputationPolicyRequest](docs/ReputationPolicyRequest.md) - - [ResidentKeyRequirementEnum](docs/ResidentKeyRequirementEnum.md) - - [Role](docs/Role.md) - - [RoleAssignedObjectPermission](docs/RoleAssignedObjectPermission.md) - - [RoleObjectPermission](docs/RoleObjectPermission.md) - - [RoleRequest](docs/RoleRequest.md) - - [SAMLMetadata](docs/SAMLMetadata.md) - - [SAMLPropertyMapping](docs/SAMLPropertyMapping.md) - - [SAMLPropertyMappingRequest](docs/SAMLPropertyMappingRequest.md) - - [SAMLProvider](docs/SAMLProvider.md) - - [SAMLProviderRequest](docs/SAMLProviderRequest.md) - - [SAMLSource](docs/SAMLSource.md) - - [SAMLSourceRequest](docs/SAMLSourceRequest.md) - - [SCIMMapping](docs/SCIMMapping.md) - - [SCIMMappingRequest](docs/SCIMMappingRequest.md) - - [SCIMProvider](docs/SCIMProvider.md) - - [SCIMProviderRequest](docs/SCIMProviderRequest.md) - - [SMSDevice](docs/SMSDevice.md) - - [SMSDeviceRequest](docs/SMSDeviceRequest.md) - - [ScopeMapping](docs/ScopeMapping.md) - - [ScopeMappingRequest](docs/ScopeMappingRequest.md) - - [SelectableStage](docs/SelectableStage.md) - - [ServiceConnection](docs/ServiceConnection.md) - - [ServiceConnectionRequest](docs/ServiceConnectionRequest.md) - - [ServiceConnectionState](docs/ServiceConnectionState.md) - - [SessionUser](docs/SessionUser.md) - - [SeverityEnum](docs/SeverityEnum.md) - - [ShellChallenge](docs/ShellChallenge.md) - - [SignatureAlgorithmEnum](docs/SignatureAlgorithmEnum.md) - - [Source](docs/Source.md) - - [SourceRequest](docs/SourceRequest.md) - - [SourceType](docs/SourceType.md) - - [SpBindingEnum](docs/SpBindingEnum.md) - - [Stage](docs/Stage.md) - - [StagePrompt](docs/StagePrompt.md) - - [StageRequest](docs/StageRequest.md) - - [StaticDevice](docs/StaticDevice.md) - - [StaticDeviceRequest](docs/StaticDeviceRequest.md) - - [StaticDeviceToken](docs/StaticDeviceToken.md) - - [StaticDeviceTokenRequest](docs/StaticDeviceTokenRequest.md) - - [SubModeEnum](docs/SubModeEnum.md) - - [SystemInfo](docs/SystemInfo.md) - - [SystemInfoRuntime](docs/SystemInfoRuntime.md) - - [TOTPDevice](docs/TOTPDevice.md) - - [TOTPDeviceRequest](docs/TOTPDeviceRequest.md) - - [Task](docs/Task.md) - - [TaskStatusEnum](docs/TaskStatusEnum.md) - - [Tenant](docs/Tenant.md) - - [TenantRequest](docs/TenantRequest.md) - - [Token](docs/Token.md) - - [TokenModel](docs/TokenModel.md) - - [TokenRequest](docs/TokenRequest.md) - - [TokenSetKeyRequest](docs/TokenSetKeyRequest.md) - - [TokenView](docs/TokenView.md) - - [TransactionApplicationRequest](docs/TransactionApplicationRequest.md) - - [TransactionApplicationResponse](docs/TransactionApplicationResponse.md) - - [TypeCreate](docs/TypeCreate.md) - - [UiThemeEnum](docs/UiThemeEnum.md) - - [UsedBy](docs/UsedBy.md) - - [UsedByActionEnum](docs/UsedByActionEnum.md) - - [User](docs/User.md) - - [UserAccountRequest](docs/UserAccountRequest.md) - - [UserAssignedObjectPermission](docs/UserAssignedObjectPermission.md) - - [UserConsent](docs/UserConsent.md) - - [UserCreationModeEnum](docs/UserCreationModeEnum.md) - - [UserDeleteStage](docs/UserDeleteStage.md) - - [UserDeleteStageRequest](docs/UserDeleteStageRequest.md) - - [UserFieldsEnum](docs/UserFieldsEnum.md) - - [UserGroup](docs/UserGroup.md) - - [UserGroupRequest](docs/UserGroupRequest.md) - - [UserLoginChallenge](docs/UserLoginChallenge.md) - - [UserLoginChallengeResponseRequest](docs/UserLoginChallengeResponseRequest.md) - - [UserLoginStage](docs/UserLoginStage.md) - - [UserLoginStageRequest](docs/UserLoginStageRequest.md) - - [UserLogoutStage](docs/UserLogoutStage.md) - - [UserLogoutStageRequest](docs/UserLogoutStageRequest.md) - - [UserMatchingModeEnum](docs/UserMatchingModeEnum.md) - - [UserMetrics](docs/UserMetrics.md) - - [UserOAuthSourceConnection](docs/UserOAuthSourceConnection.md) - - [UserOAuthSourceConnectionRequest](docs/UserOAuthSourceConnectionRequest.md) - - [UserObjectPermission](docs/UserObjectPermission.md) - - [UserPasswordSetRequest](docs/UserPasswordSetRequest.md) - - [UserPath](docs/UserPath.md) - - [UserRequest](docs/UserRequest.md) - - [UserSAMLSourceConnection](docs/UserSAMLSourceConnection.md) - - [UserSAMLSourceConnectionRequest](docs/UserSAMLSourceConnectionRequest.md) - - [UserSelf](docs/UserSelf.md) - - [UserSelfGroups](docs/UserSelfGroups.md) - - [UserServiceAccountRequest](docs/UserServiceAccountRequest.md) - - [UserServiceAccountResponse](docs/UserServiceAccountResponse.md) - - [UserSetting](docs/UserSetting.md) - - [UserSourceConnection](docs/UserSourceConnection.md) - - [UserTypeEnum](docs/UserTypeEnum.md) - - [UserVerificationEnum](docs/UserVerificationEnum.md) - - [UserWriteStage](docs/UserWriteStage.md) - - [UserWriteStageRequest](docs/UserWriteStageRequest.md) - - [ValidationError](docs/ValidationError.md) - - [Version](docs/Version.md) - - [WebAuthnDevice](docs/WebAuthnDevice.md) - - [WebAuthnDeviceRequest](docs/WebAuthnDeviceRequest.md) - - [Workers](docs/Workers.md) + - [AccessDeniedChallenge](AccessDeniedChallenge.md) + - [App](App.md) + - [AppEnum](AppEnum.md) + - [AppleChallengeResponseRequest](AppleChallengeResponseRequest.md) + - [AppleLoginChallenge](AppleLoginChallenge.md) + - [Application](Application.md) + - [ApplicationRequest](ApplicationRequest.md) + - [AuthTypeEnum](AuthTypeEnum.md) + - [AuthenticateWebAuthnStage](AuthenticateWebAuthnStage.md) + - [AuthenticateWebAuthnStageRequest](AuthenticateWebAuthnStageRequest.md) + - [AuthenticatedSession](AuthenticatedSession.md) + - [AuthenticatedSessionGeoIp](AuthenticatedSessionGeoIp.md) + - [AuthenticatedSessionUserAgent](AuthenticatedSessionUserAgent.md) + - [AuthenticatedSessionUserAgentDevice](AuthenticatedSessionUserAgentDevice.md) + - [AuthenticatedSessionUserAgentOs](AuthenticatedSessionUserAgentOs.md) + - [AuthenticatedSessionUserAgentUserAgent](AuthenticatedSessionUserAgentUserAgent.md) + - [AuthenticationEnum](AuthenticationEnum.md) + - [AuthenticatorAttachmentEnum](AuthenticatorAttachmentEnum.md) + - [AuthenticatorDuoChallenge](AuthenticatorDuoChallenge.md) + - [AuthenticatorDuoChallengeResponseRequest](AuthenticatorDuoChallengeResponseRequest.md) + - [AuthenticatorDuoStage](AuthenticatorDuoStage.md) + - [AuthenticatorDuoStageDeviceImportResponse](AuthenticatorDuoStageDeviceImportResponse.md) + - [AuthenticatorDuoStageManualDeviceImportRequest](AuthenticatorDuoStageManualDeviceImportRequest.md) + - [AuthenticatorDuoStageRequest](AuthenticatorDuoStageRequest.md) + - [AuthenticatorMobileChallenge](AuthenticatorMobileChallenge.md) + - [AuthenticatorMobileChallengeResponseRequest](AuthenticatorMobileChallengeResponseRequest.md) + - [AuthenticatorMobilePayloadChallenge](AuthenticatorMobilePayloadChallenge.md) + - [AuthenticatorMobileStage](AuthenticatorMobileStage.md) + - [AuthenticatorMobileStageRequest](AuthenticatorMobileStageRequest.md) + - [AuthenticatorSMSChallenge](AuthenticatorSMSChallenge.md) + - [AuthenticatorSMSChallengeResponseRequest](AuthenticatorSMSChallengeResponseRequest.md) + - [AuthenticatorSMSStage](AuthenticatorSMSStage.md) + - [AuthenticatorSMSStageRequest](AuthenticatorSMSStageRequest.md) + - [AuthenticatorStaticChallenge](AuthenticatorStaticChallenge.md) + - [AuthenticatorStaticChallengeResponseRequest](AuthenticatorStaticChallengeResponseRequest.md) + - [AuthenticatorStaticStage](AuthenticatorStaticStage.md) + - [AuthenticatorStaticStageRequest](AuthenticatorStaticStageRequest.md) + - [AuthenticatorTOTPChallenge](AuthenticatorTOTPChallenge.md) + - [AuthenticatorTOTPChallengeResponseRequest](AuthenticatorTOTPChallengeResponseRequest.md) + - [AuthenticatorTOTPStage](AuthenticatorTOTPStage.md) + - [AuthenticatorTOTPStageRequest](AuthenticatorTOTPStageRequest.md) + - [AuthenticatorValidateStage](AuthenticatorValidateStage.md) + - [AuthenticatorValidateStageRequest](AuthenticatorValidateStageRequest.md) + - [AuthenticatorValidationChallenge](AuthenticatorValidationChallenge.md) + - [AuthenticatorValidationChallengeResponseRequest](AuthenticatorValidationChallengeResponseRequest.md) + - [AuthenticatorWebAuthnChallenge](AuthenticatorWebAuthnChallenge.md) + - [AuthenticatorWebAuthnChallengeResponseRequest](AuthenticatorWebAuthnChallengeResponseRequest.md) + - [AutoSubmitChallengeResponseRequest](AutoSubmitChallengeResponseRequest.md) + - [AutosubmitChallenge](AutosubmitChallenge.md) + - [BackendsEnum](BackendsEnum.md) + - [BindingTypeEnum](BindingTypeEnum.md) + - [BlueprintFile](BlueprintFile.md) + - [BlueprintInstance](BlueprintInstance.md) + - [BlueprintInstanceRequest](BlueprintInstanceRequest.md) + - [BlueprintInstanceStatusEnum](BlueprintInstanceStatusEnum.md) + - [Cache](Cache.md) + - [CapabilitiesEnum](CapabilitiesEnum.md) + - [CaptchaChallenge](CaptchaChallenge.md) + - [CaptchaChallengeResponseRequest](CaptchaChallengeResponseRequest.md) + - [CaptchaStage](CaptchaStage.md) + - [CaptchaStageRequest](CaptchaStageRequest.md) + - [CertificateData](CertificateData.md) + - [CertificateGenerationRequest](CertificateGenerationRequest.md) + - [CertificateKeyPair](CertificateKeyPair.md) + - [CertificateKeyPairRequest](CertificateKeyPairRequest.md) + - [ChallengeChoices](ChallengeChoices.md) + - [ChallengeTypes](ChallengeTypes.md) + - [ClientTypeEnum](ClientTypeEnum.md) + - [Config](Config.md) + - [ConsentChallenge](ConsentChallenge.md) + - [ConsentChallengeResponseRequest](ConsentChallengeResponseRequest.md) + - [ConsentPermission](ConsentPermission.md) + - [ConsentStage](ConsentStage.md) + - [ConsentStageModeEnum](ConsentStageModeEnum.md) + - [ConsentStageRequest](ConsentStageRequest.md) + - [ContextualFlowInfo](ContextualFlowInfo.md) + - [Coordinate](Coordinate.md) + - [CurrentTenant](CurrentTenant.md) + - [DeniedActionEnum](DeniedActionEnum.md) + - [DenyStage](DenyStage.md) + - [DenyStageRequest](DenyStageRequest.md) + - [Device](Device.md) + - [DeviceChallenge](DeviceChallenge.md) + - [DeviceChallengeRequest](DeviceChallengeRequest.md) + - [DeviceClassesEnum](DeviceClassesEnum.md) + - [DigestAlgorithmEnum](DigestAlgorithmEnum.md) + - [DigitsEnum](DigitsEnum.md) + - [DockerServiceConnection](DockerServiceConnection.md) + - [DockerServiceConnectionRequest](DockerServiceConnectionRequest.md) + - [DummyChallenge](DummyChallenge.md) + - [DummyChallengeResponseRequest](DummyChallengeResponseRequest.md) + - [DummyPolicy](DummyPolicy.md) + - [DummyPolicyRequest](DummyPolicyRequest.md) + - [DummyStage](DummyStage.md) + - [DummyStageRequest](DummyStageRequest.md) + - [DuoDevice](DuoDevice.md) + - [DuoDeviceEnrollmentStatus](DuoDeviceEnrollmentStatus.md) + - [DuoDeviceRequest](DuoDeviceRequest.md) + - [DuoResponseEnum](DuoResponseEnum.md) + - [EmailChallenge](EmailChallenge.md) + - [EmailChallengeResponseRequest](EmailChallengeResponseRequest.md) + - [EmailStage](EmailStage.md) + - [EmailStageRequest](EmailStageRequest.md) + - [ErrorDetail](ErrorDetail.md) + - [ErrorReportingConfig](ErrorReportingConfig.md) + - [Event](Event.md) + - [EventActions](EventActions.md) + - [EventMatcherPolicy](EventMatcherPolicy.md) + - [EventMatcherPolicyRequest](EventMatcherPolicyRequest.md) + - [EventRequest](EventRequest.md) + - [EventTopPerUser](EventTopPerUser.md) + - [ExpiringBaseGrantModel](ExpiringBaseGrantModel.md) + - [ExpressionPolicy](ExpressionPolicy.md) + - [ExpressionPolicyRequest](ExpressionPolicyRequest.md) + - [ExtraRoleObjectPermission](ExtraRoleObjectPermission.md) + - [ExtraUserObjectPermission](ExtraUserObjectPermission.md) + - [FilePathRequest](FilePathRequest.md) + - [Flow](Flow.md) + - [FlowChallengeResponseRequest](FlowChallengeResponseRequest.md) + - [FlowDesignationEnum](FlowDesignationEnum.md) + - [FlowDiagram](FlowDiagram.md) + - [FlowErrorChallenge](FlowErrorChallenge.md) + - [FlowImportResult](FlowImportResult.md) + - [FlowInspection](FlowInspection.md) + - [FlowInspectorPlan](FlowInspectorPlan.md) + - [FlowRequest](FlowRequest.md) + - [FlowSet](FlowSet.md) + - [FlowSetRequest](FlowSetRequest.md) + - [FlowStageBinding](FlowStageBinding.md) + - [FlowStageBindingRequest](FlowStageBindingRequest.md) + - [FooterLink](FooterLink.md) + - [GenericError](GenericError.md) + - [Group](Group.md) + - [GroupMember](GroupMember.md) + - [GroupMemberRequest](GroupMemberRequest.md) + - [GroupRequest](GroupRequest.md) + - [IdentificationChallenge](IdentificationChallenge.md) + - [IdentificationChallengeResponseRequest](IdentificationChallengeResponseRequest.md) + - [IdentificationStage](IdentificationStage.md) + - [IdentificationStageRequest](IdentificationStageRequest.md) + - [InstallID](InstallID.md) + - [IntentEnum](IntentEnum.md) + - [InvalidResponseActionEnum](InvalidResponseActionEnum.md) + - [Invitation](Invitation.md) + - [InvitationRequest](InvitationRequest.md) + - [InvitationStage](InvitationStage.md) + - [InvitationStageRequest](InvitationStageRequest.md) + - [IssuerModeEnum](IssuerModeEnum.md) + - [ItemMatchingModeEnum](ItemMatchingModeEnum.md) + - [KubernetesServiceConnection](KubernetesServiceConnection.md) + - [KubernetesServiceConnectionRequest](KubernetesServiceConnectionRequest.md) + - [LDAPAPIAccessMode](LDAPAPIAccessMode.md) + - [LDAPDebug](LDAPDebug.md) + - [LDAPOutpostConfig](LDAPOutpostConfig.md) + - [LDAPPropertyMapping](LDAPPropertyMapping.md) + - [LDAPPropertyMappingRequest](LDAPPropertyMappingRequest.md) + - [LDAPProvider](LDAPProvider.md) + - [LDAPProviderRequest](LDAPProviderRequest.md) + - [LDAPSource](LDAPSource.md) + - [LDAPSourceRequest](LDAPSourceRequest.md) + - [LDAPSyncStatus](LDAPSyncStatus.md) + - [LayoutEnum](LayoutEnum.md) + - [License](License.md) + - [LicenseForecast](LicenseForecast.md) + - [LicenseRequest](LicenseRequest.md) + - [LicenseSummary](LicenseSummary.md) + - [Link](Link.md) + - [LoginChallengeTypes](LoginChallengeTypes.md) + - [LoginMetrics](LoginMetrics.md) + - [LoginSource](LoginSource.md) + - [Metadata](Metadata.md) + - [MobileDevice](MobileDevice.md) + - [MobileDeviceEnrollmentCallback](MobileDeviceEnrollmentCallback.md) + - [MobileDeviceEnrollmentRequest](MobileDeviceEnrollmentRequest.md) + - [MobileDeviceEnrollmentStatus](MobileDeviceEnrollmentStatus.md) + - [MobileDeviceEnrollmentStatusStatusEnum](MobileDeviceEnrollmentStatusStatusEnum.md) + - [MobileDeviceInfo](MobileDeviceInfo.md) + - [MobileDeviceInfoRequest](MobileDeviceInfoRequest.md) + - [MobileDeviceRequest](MobileDeviceRequest.md) + - [MobileDeviceResponseRequest](MobileDeviceResponseRequest.md) + - [MobileDeviceSetPushKeyRequest](MobileDeviceSetPushKeyRequest.md) + - [ModelEnum](ModelEnum.md) + - [ModelRequest](ModelRequest.md) + - [NameIdPolicyEnum](NameIdPolicyEnum.md) + - [NotConfiguredActionEnum](NotConfiguredActionEnum.md) + - [Notification](Notification.md) + - [NotificationRequest](NotificationRequest.md) + - [NotificationRule](NotificationRule.md) + - [NotificationRuleRequest](NotificationRuleRequest.md) + - [NotificationTransport](NotificationTransport.md) + - [NotificationTransportModeEnum](NotificationTransportModeEnum.md) + - [NotificationTransportRequest](NotificationTransportRequest.md) + - [NotificationTransportTest](NotificationTransportTest.md) + - [NotificationWebhookMapping](NotificationWebhookMapping.md) + - [NotificationWebhookMappingRequest](NotificationWebhookMappingRequest.md) + - [OAuth2Provider](OAuth2Provider.md) + - [OAuth2ProviderRequest](OAuth2ProviderRequest.md) + - [OAuth2ProviderSetupURLs](OAuth2ProviderSetupURLs.md) + - [OAuthDeviceCodeChallenge](OAuthDeviceCodeChallenge.md) + - [OAuthDeviceCodeChallengeResponseRequest](OAuthDeviceCodeChallengeResponseRequest.md) + - [OAuthDeviceCodeFinishChallenge](OAuthDeviceCodeFinishChallenge.md) + - [OAuthDeviceCodeFinishChallengeResponseRequest](OAuthDeviceCodeFinishChallengeResponseRequest.md) + - [OAuthSource](OAuthSource.md) + - [OAuthSourceRequest](OAuthSourceRequest.md) + - [OpenIDConnectConfiguration](OpenIDConnectConfiguration.md) + - [Outpost](Outpost.md) + - [OutpostDefaultConfig](OutpostDefaultConfig.md) + - [OutpostHealth](OutpostHealth.md) + - [OutpostRequest](OutpostRequest.md) + - [OutpostTypeEnum](OutpostTypeEnum.md) + - [PaginatedApplicationList](PaginatedApplicationList.md) + - [PaginatedAuthenticateWebAuthnStageList](PaginatedAuthenticateWebAuthnStageList.md) + - [PaginatedAuthenticatedSessionList](PaginatedAuthenticatedSessionList.md) + - [PaginatedAuthenticatorDuoStageList](PaginatedAuthenticatorDuoStageList.md) + - [PaginatedAuthenticatorMobileStageList](PaginatedAuthenticatorMobileStageList.md) + - [PaginatedAuthenticatorSMSStageList](PaginatedAuthenticatorSMSStageList.md) + - [PaginatedAuthenticatorStaticStageList](PaginatedAuthenticatorStaticStageList.md) + - [PaginatedAuthenticatorTOTPStageList](PaginatedAuthenticatorTOTPStageList.md) + - [PaginatedAuthenticatorValidateStageList](PaginatedAuthenticatorValidateStageList.md) + - [PaginatedBlueprintInstanceList](PaginatedBlueprintInstanceList.md) + - [PaginatedCaptchaStageList](PaginatedCaptchaStageList.md) + - [PaginatedCertificateKeyPairList](PaginatedCertificateKeyPairList.md) + - [PaginatedConsentStageList](PaginatedConsentStageList.md) + - [PaginatedDenyStageList](PaginatedDenyStageList.md) + - [PaginatedDockerServiceConnectionList](PaginatedDockerServiceConnectionList.md) + - [PaginatedDummyPolicyList](PaginatedDummyPolicyList.md) + - [PaginatedDummyStageList](PaginatedDummyStageList.md) + - [PaginatedDuoDeviceList](PaginatedDuoDeviceList.md) + - [PaginatedEmailStageList](PaginatedEmailStageList.md) + - [PaginatedEventList](PaginatedEventList.md) + - [PaginatedEventMatcherPolicyList](PaginatedEventMatcherPolicyList.md) + - [PaginatedExpiringBaseGrantModelList](PaginatedExpiringBaseGrantModelList.md) + - [PaginatedExpressionPolicyList](PaginatedExpressionPolicyList.md) + - [PaginatedExtraRoleObjectPermissionList](PaginatedExtraRoleObjectPermissionList.md) + - [PaginatedExtraUserObjectPermissionList](PaginatedExtraUserObjectPermissionList.md) + - [PaginatedFlowList](PaginatedFlowList.md) + - [PaginatedFlowStageBindingList](PaginatedFlowStageBindingList.md) + - [PaginatedGroupList](PaginatedGroupList.md) + - [PaginatedIdentificationStageList](PaginatedIdentificationStageList.md) + - [PaginatedInvitationList](PaginatedInvitationList.md) + - [PaginatedInvitationStageList](PaginatedInvitationStageList.md) + - [PaginatedKubernetesServiceConnectionList](PaginatedKubernetesServiceConnectionList.md) + - [PaginatedLDAPOutpostConfigList](PaginatedLDAPOutpostConfigList.md) + - [PaginatedLDAPPropertyMappingList](PaginatedLDAPPropertyMappingList.md) + - [PaginatedLDAPProviderList](PaginatedLDAPProviderList.md) + - [PaginatedLDAPSourceList](PaginatedLDAPSourceList.md) + - [PaginatedLicenseList](PaginatedLicenseList.md) + - [PaginatedMobileDeviceList](PaginatedMobileDeviceList.md) + - [PaginatedNotificationList](PaginatedNotificationList.md) + - [PaginatedNotificationRuleList](PaginatedNotificationRuleList.md) + - [PaginatedNotificationTransportList](PaginatedNotificationTransportList.md) + - [PaginatedNotificationWebhookMappingList](PaginatedNotificationWebhookMappingList.md) + - [PaginatedOAuth2ProviderList](PaginatedOAuth2ProviderList.md) + - [PaginatedOAuthSourceList](PaginatedOAuthSourceList.md) + - [PaginatedOutpostList](PaginatedOutpostList.md) + - [PaginatedPasswordExpiryPolicyList](PaginatedPasswordExpiryPolicyList.md) + - [PaginatedPasswordPolicyList](PaginatedPasswordPolicyList.md) + - [PaginatedPasswordStageList](PaginatedPasswordStageList.md) + - [PaginatedPermissionList](PaginatedPermissionList.md) + - [PaginatedPlexSourceConnectionList](PaginatedPlexSourceConnectionList.md) + - [PaginatedPlexSourceList](PaginatedPlexSourceList.md) + - [PaginatedPolicyBindingList](PaginatedPolicyBindingList.md) + - [PaginatedPolicyList](PaginatedPolicyList.md) + - [PaginatedPromptList](PaginatedPromptList.md) + - [PaginatedPromptStageList](PaginatedPromptStageList.md) + - [PaginatedPropertyMappingList](PaginatedPropertyMappingList.md) + - [PaginatedProviderList](PaginatedProviderList.md) + - [PaginatedProxyOutpostConfigList](PaginatedProxyOutpostConfigList.md) + - [PaginatedProxyProviderList](PaginatedProxyProviderList.md) + - [PaginatedRadiusOutpostConfigList](PaginatedRadiusOutpostConfigList.md) + - [PaginatedRadiusProviderList](PaginatedRadiusProviderList.md) + - [PaginatedReputationList](PaginatedReputationList.md) + - [PaginatedReputationPolicyList](PaginatedReputationPolicyList.md) + - [PaginatedRoleAssignedObjectPermissionList](PaginatedRoleAssignedObjectPermissionList.md) + - [PaginatedRoleList](PaginatedRoleList.md) + - [PaginatedSAMLPropertyMappingList](PaginatedSAMLPropertyMappingList.md) + - [PaginatedSAMLProviderList](PaginatedSAMLProviderList.md) + - [PaginatedSAMLSourceList](PaginatedSAMLSourceList.md) + - [PaginatedSCIMMappingList](PaginatedSCIMMappingList.md) + - [PaginatedSCIMProviderList](PaginatedSCIMProviderList.md) + - [PaginatedSMSDeviceList](PaginatedSMSDeviceList.md) + - [PaginatedScopeMappingList](PaginatedScopeMappingList.md) + - [PaginatedServiceConnectionList](PaginatedServiceConnectionList.md) + - [PaginatedSourceList](PaginatedSourceList.md) + - [PaginatedStageList](PaginatedStageList.md) + - [PaginatedStaticDeviceList](PaginatedStaticDeviceList.md) + - [PaginatedTOTPDeviceList](PaginatedTOTPDeviceList.md) + - [PaginatedTenantList](PaginatedTenantList.md) + - [PaginatedTokenList](PaginatedTokenList.md) + - [PaginatedTokenModelList](PaginatedTokenModelList.md) + - [PaginatedUserAssignedObjectPermissionList](PaginatedUserAssignedObjectPermissionList.md) + - [PaginatedUserConsentList](PaginatedUserConsentList.md) + - [PaginatedUserDeleteStageList](PaginatedUserDeleteStageList.md) + - [PaginatedUserList](PaginatedUserList.md) + - [PaginatedUserLoginStageList](PaginatedUserLoginStageList.md) + - [PaginatedUserLogoutStageList](PaginatedUserLogoutStageList.md) + - [PaginatedUserOAuthSourceConnectionList](PaginatedUserOAuthSourceConnectionList.md) + - [PaginatedUserSAMLSourceConnectionList](PaginatedUserSAMLSourceConnectionList.md) + - [PaginatedUserSourceConnectionList](PaginatedUserSourceConnectionList.md) + - [PaginatedUserWriteStageList](PaginatedUserWriteStageList.md) + - [PaginatedWebAuthnDeviceList](PaginatedWebAuthnDeviceList.md) + - [Pagination](Pagination.md) + - [PasswordChallenge](PasswordChallenge.md) + - [PasswordChallengeResponseRequest](PasswordChallengeResponseRequest.md) + - [PasswordExpiryPolicy](PasswordExpiryPolicy.md) + - [PasswordExpiryPolicyRequest](PasswordExpiryPolicyRequest.md) + - [PasswordPolicy](PasswordPolicy.md) + - [PasswordPolicyRequest](PasswordPolicyRequest.md) + - [PasswordStage](PasswordStage.md) + - [PasswordStageRequest](PasswordStageRequest.md) + - [PatchedApplicationRequest](PatchedApplicationRequest.md) + - [PatchedAuthenticateWebAuthnStageRequest](PatchedAuthenticateWebAuthnStageRequest.md) + - [PatchedAuthenticatorDuoStageRequest](PatchedAuthenticatorDuoStageRequest.md) + - [PatchedAuthenticatorMobileStageRequest](PatchedAuthenticatorMobileStageRequest.md) + - [PatchedAuthenticatorSMSStageRequest](PatchedAuthenticatorSMSStageRequest.md) + - [PatchedAuthenticatorStaticStageRequest](PatchedAuthenticatorStaticStageRequest.md) + - [PatchedAuthenticatorTOTPStageRequest](PatchedAuthenticatorTOTPStageRequest.md) + - [PatchedAuthenticatorValidateStageRequest](PatchedAuthenticatorValidateStageRequest.md) + - [PatchedBlueprintInstanceRequest](PatchedBlueprintInstanceRequest.md) + - [PatchedCaptchaStageRequest](PatchedCaptchaStageRequest.md) + - [PatchedCertificateKeyPairRequest](PatchedCertificateKeyPairRequest.md) + - [PatchedConsentStageRequest](PatchedConsentStageRequest.md) + - [PatchedDenyStageRequest](PatchedDenyStageRequest.md) + - [PatchedDockerServiceConnectionRequest](PatchedDockerServiceConnectionRequest.md) + - [PatchedDummyPolicyRequest](PatchedDummyPolicyRequest.md) + - [PatchedDummyStageRequest](PatchedDummyStageRequest.md) + - [PatchedDuoDeviceRequest](PatchedDuoDeviceRequest.md) + - [PatchedEmailStageRequest](PatchedEmailStageRequest.md) + - [PatchedEventMatcherPolicyRequest](PatchedEventMatcherPolicyRequest.md) + - [PatchedEventRequest](PatchedEventRequest.md) + - [PatchedExpressionPolicyRequest](PatchedExpressionPolicyRequest.md) + - [PatchedFlowRequest](PatchedFlowRequest.md) + - [PatchedFlowStageBindingRequest](PatchedFlowStageBindingRequest.md) + - [PatchedGroupRequest](PatchedGroupRequest.md) + - [PatchedIdentificationStageRequest](PatchedIdentificationStageRequest.md) + - [PatchedInvitationRequest](PatchedInvitationRequest.md) + - [PatchedInvitationStageRequest](PatchedInvitationStageRequest.md) + - [PatchedKubernetesServiceConnectionRequest](PatchedKubernetesServiceConnectionRequest.md) + - [PatchedLDAPPropertyMappingRequest](PatchedLDAPPropertyMappingRequest.md) + - [PatchedLDAPProviderRequest](PatchedLDAPProviderRequest.md) + - [PatchedLDAPSourceRequest](PatchedLDAPSourceRequest.md) + - [PatchedLicenseRequest](PatchedLicenseRequest.md) + - [PatchedMobileDeviceRequest](PatchedMobileDeviceRequest.md) + - [PatchedNotificationRequest](PatchedNotificationRequest.md) + - [PatchedNotificationRuleRequest](PatchedNotificationRuleRequest.md) + - [PatchedNotificationTransportRequest](PatchedNotificationTransportRequest.md) + - [PatchedNotificationWebhookMappingRequest](PatchedNotificationWebhookMappingRequest.md) + - [PatchedOAuth2ProviderRequest](PatchedOAuth2ProviderRequest.md) + - [PatchedOAuthSourceRequest](PatchedOAuthSourceRequest.md) + - [PatchedOutpostRequest](PatchedOutpostRequest.md) + - [PatchedPasswordExpiryPolicyRequest](PatchedPasswordExpiryPolicyRequest.md) + - [PatchedPasswordPolicyRequest](PatchedPasswordPolicyRequest.md) + - [PatchedPasswordStageRequest](PatchedPasswordStageRequest.md) + - [PatchedPermissionAssignRequest](PatchedPermissionAssignRequest.md) + - [PatchedPlexSourceConnectionRequest](PatchedPlexSourceConnectionRequest.md) + - [PatchedPlexSourceRequest](PatchedPlexSourceRequest.md) + - [PatchedPolicyBindingRequest](PatchedPolicyBindingRequest.md) + - [PatchedPromptRequest](PatchedPromptRequest.md) + - [PatchedPromptStageRequest](PatchedPromptStageRequest.md) + - [PatchedProxyProviderRequest](PatchedProxyProviderRequest.md) + - [PatchedRadiusProviderRequest](PatchedRadiusProviderRequest.md) + - [PatchedReputationPolicyRequest](PatchedReputationPolicyRequest.md) + - [PatchedRoleRequest](PatchedRoleRequest.md) + - [PatchedSAMLPropertyMappingRequest](PatchedSAMLPropertyMappingRequest.md) + - [PatchedSAMLProviderRequest](PatchedSAMLProviderRequest.md) + - [PatchedSAMLSourceRequest](PatchedSAMLSourceRequest.md) + - [PatchedSCIMMappingRequest](PatchedSCIMMappingRequest.md) + - [PatchedSCIMProviderRequest](PatchedSCIMProviderRequest.md) + - [PatchedSMSDeviceRequest](PatchedSMSDeviceRequest.md) + - [PatchedScopeMappingRequest](PatchedScopeMappingRequest.md) + - [PatchedStaticDeviceRequest](PatchedStaticDeviceRequest.md) + - [PatchedTOTPDeviceRequest](PatchedTOTPDeviceRequest.md) + - [PatchedTenantRequest](PatchedTenantRequest.md) + - [PatchedTokenRequest](PatchedTokenRequest.md) + - [PatchedUserDeleteStageRequest](PatchedUserDeleteStageRequest.md) + - [PatchedUserLoginStageRequest](PatchedUserLoginStageRequest.md) + - [PatchedUserLogoutStageRequest](PatchedUserLogoutStageRequest.md) + - [PatchedUserOAuthSourceConnectionRequest](PatchedUserOAuthSourceConnectionRequest.md) + - [PatchedUserRequest](PatchedUserRequest.md) + - [PatchedUserSAMLSourceConnectionRequest](PatchedUserSAMLSourceConnectionRequest.md) + - [PatchedUserWriteStageRequest](PatchedUserWriteStageRequest.md) + - [PatchedWebAuthnDeviceRequest](PatchedWebAuthnDeviceRequest.md) + - [Permission](Permission.md) + - [PermissionAssignRequest](PermissionAssignRequest.md) + - [PlatformEnum](PlatformEnum.md) + - [PlexAuthenticationChallenge](PlexAuthenticationChallenge.md) + - [PlexAuthenticationChallengeResponseRequest](PlexAuthenticationChallengeResponseRequest.md) + - [PlexSource](PlexSource.md) + - [PlexSourceConnection](PlexSourceConnection.md) + - [PlexSourceConnectionRequest](PlexSourceConnectionRequest.md) + - [PlexSourceRequest](PlexSourceRequest.md) + - [PlexTokenRedeemRequest](PlexTokenRedeemRequest.md) + - [Policy](Policy.md) + - [PolicyBinding](PolicyBinding.md) + - [PolicyBindingRequest](PolicyBindingRequest.md) + - [PolicyEngineMode](PolicyEngineMode.md) + - [PolicyRequest](PolicyRequest.md) + - [PolicyTestRequest](PolicyTestRequest.md) + - [PolicyTestResult](PolicyTestResult.md) + - [Prompt](Prompt.md) + - [PromptChallenge](PromptChallenge.md) + - [PromptChallengeResponseRequest](PromptChallengeResponseRequest.md) + - [PromptRequest](PromptRequest.md) + - [PromptStage](PromptStage.md) + - [PromptStageRequest](PromptStageRequest.md) + - [PromptTypeEnum](PromptTypeEnum.md) + - [PropertyMapping](PropertyMapping.md) + - [PropertyMappingPreview](PropertyMappingPreview.md) + - [PropertyMappingTestResult](PropertyMappingTestResult.md) + - [Provider](Provider.md) + - [ProviderEnum](ProviderEnum.md) + - [ProviderModelEnum](ProviderModelEnum.md) + - [ProviderRequest](ProviderRequest.md) + - [ProviderTypeEnum](ProviderTypeEnum.md) + - [ProxyMode](ProxyMode.md) + - [ProxyOutpostConfig](ProxyOutpostConfig.md) + - [ProxyProvider](ProxyProvider.md) + - [ProxyProviderRequest](ProxyProviderRequest.md) + - [RadiusOutpostConfig](RadiusOutpostConfig.md) + - [RadiusProvider](RadiusProvider.md) + - [RadiusProviderRequest](RadiusProviderRequest.md) + - [RedirectChallenge](RedirectChallenge.md) + - [Reputation](Reputation.md) + - [ReputationPolicy](ReputationPolicy.md) + - [ReputationPolicyRequest](ReputationPolicyRequest.md) + - [ResidentKeyRequirementEnum](ResidentKeyRequirementEnum.md) + - [Role](Role.md) + - [RoleAssignedObjectPermission](RoleAssignedObjectPermission.md) + - [RoleObjectPermission](RoleObjectPermission.md) + - [RoleRequest](RoleRequest.md) + - [SAMLMetadata](SAMLMetadata.md) + - [SAMLPropertyMapping](SAMLPropertyMapping.md) + - [SAMLPropertyMappingRequest](SAMLPropertyMappingRequest.md) + - [SAMLProvider](SAMLProvider.md) + - [SAMLProviderRequest](SAMLProviderRequest.md) + - [SAMLSource](SAMLSource.md) + - [SAMLSourceRequest](SAMLSourceRequest.md) + - [SCIMMapping](SCIMMapping.md) + - [SCIMMappingRequest](SCIMMappingRequest.md) + - [SCIMProvider](SCIMProvider.md) + - [SCIMProviderRequest](SCIMProviderRequest.md) + - [SMSDevice](SMSDevice.md) + - [SMSDeviceRequest](SMSDeviceRequest.md) + - [ScopeMapping](ScopeMapping.md) + - [ScopeMappingRequest](ScopeMappingRequest.md) + - [SelectableStage](SelectableStage.md) + - [ServiceConnection](ServiceConnection.md) + - [ServiceConnectionRequest](ServiceConnectionRequest.md) + - [ServiceConnectionState](ServiceConnectionState.md) + - [SessionUser](SessionUser.md) + - [SeverityEnum](SeverityEnum.md) + - [ShellChallenge](ShellChallenge.md) + - [SignatureAlgorithmEnum](SignatureAlgorithmEnum.md) + - [Source](Source.md) + - [SourceRequest](SourceRequest.md) + - [SourceType](SourceType.md) + - [SpBindingEnum](SpBindingEnum.md) + - [Stage](Stage.md) + - [StagePrompt](StagePrompt.md) + - [StageRequest](StageRequest.md) + - [StaticDevice](StaticDevice.md) + - [StaticDeviceRequest](StaticDeviceRequest.md) + - [StaticDeviceToken](StaticDeviceToken.md) + - [StaticDeviceTokenRequest](StaticDeviceTokenRequest.md) + - [SubModeEnum](SubModeEnum.md) + - [SystemInfo](SystemInfo.md) + - [SystemInfoRuntime](SystemInfoRuntime.md) + - [TOTPDevice](TOTPDevice.md) + - [TOTPDeviceRequest](TOTPDeviceRequest.md) + - [Task](Task.md) + - [TaskStatusEnum](TaskStatusEnum.md) + - [Tenant](Tenant.md) + - [TenantRequest](TenantRequest.md) + - [Token](Token.md) + - [TokenModel](TokenModel.md) + - [TokenRequest](TokenRequest.md) + - [TokenSetKeyRequest](TokenSetKeyRequest.md) + - [TokenView](TokenView.md) + - [TransactionApplicationRequest](TransactionApplicationRequest.md) + - [TransactionApplicationResponse](TransactionApplicationResponse.md) + - [TypeCreate](TypeCreate.md) + - [UiThemeEnum](UiThemeEnum.md) + - [UsedBy](UsedBy.md) + - [UsedByActionEnum](UsedByActionEnum.md) + - [User](User.md) + - [UserAccountRequest](UserAccountRequest.md) + - [UserAssignedObjectPermission](UserAssignedObjectPermission.md) + - [UserConsent](UserConsent.md) + - [UserCreationModeEnum](UserCreationModeEnum.md) + - [UserDeleteStage](UserDeleteStage.md) + - [UserDeleteStageRequest](UserDeleteStageRequest.md) + - [UserFieldsEnum](UserFieldsEnum.md) + - [UserGroup](UserGroup.md) + - [UserGroupRequest](UserGroupRequest.md) + - [UserLoginChallenge](UserLoginChallenge.md) + - [UserLoginChallengeResponseRequest](UserLoginChallengeResponseRequest.md) + - [UserLoginStage](UserLoginStage.md) + - [UserLoginStageRequest](UserLoginStageRequest.md) + - [UserLogoutStage](UserLogoutStage.md) + - [UserLogoutStageRequest](UserLogoutStageRequest.md) + - [UserMatchingModeEnum](UserMatchingModeEnum.md) + - [UserMetrics](UserMetrics.md) + - [UserOAuthSourceConnection](UserOAuthSourceConnection.md) + - [UserOAuthSourceConnectionRequest](UserOAuthSourceConnectionRequest.md) + - [UserObjectPermission](UserObjectPermission.md) + - [UserPasswordSetRequest](UserPasswordSetRequest.md) + - [UserPath](UserPath.md) + - [UserRequest](UserRequest.md) + - [UserSAMLSourceConnection](UserSAMLSourceConnection.md) + - [UserSAMLSourceConnectionRequest](UserSAMLSourceConnectionRequest.md) + - [UserSelf](UserSelf.md) + - [UserSelfGroups](UserSelfGroups.md) + - [UserServiceAccountRequest](UserServiceAccountRequest.md) + - [UserServiceAccountResponse](UserServiceAccountResponse.md) + - [UserSetting](UserSetting.md) + - [UserSourceConnection](UserSourceConnection.md) + - [UserTypeEnum](UserTypeEnum.md) + - [UserVerificationEnum](UserVerificationEnum.md) + - [UserWriteStage](UserWriteStage.md) + - [UserWriteStageRequest](UserWriteStageRequest.md) + - [ValidationError](ValidationError.md) + - [Version](Version.md) + - [WebAuthnDevice](WebAuthnDevice.md) + - [WebAuthnDeviceRequest](WebAuthnDeviceRequest.md) + - [Workers](Workers.md) ## Documentation For Authorization @@ -1214,6 +1259,15 @@ Class | Method | HTTP request | Description Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request. +### mobile_device_token + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request. + + ## Documentation for Utility Methods Due to the fact that model structure members are all pointers, this package contains diff --git a/authentikClient.podspec b/authentikClient.podspec deleted file mode 100644 index ee86004..0000000 --- a/authentikClient.podspec +++ /dev/null @@ -1,15 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'authentikClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.watchos.deployment_target = '3.0' - s.version = '2023.10.4' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v2023.10.4' } - s.authors = 'authentik Team' - s.license = 'Proprietary' - s.homepage = 'https://goauthentik.io/' - s.summary = 'authentik Swift API Client' - s.source_files = 'authentikClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' -end diff --git a/authentikClient/Classes/OpenAPIs/APIHelper.swift b/authentikClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index ce35f8d..0000000 --- a/authentikClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,122 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { result, item in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { result, item in - if let collection = item.value as? [Any?] { - result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } - .joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any]()) { result, item in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - } - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } - .joined(separator: ",") - } - return source - } - - /// maps all values from source to query parameters - /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs - public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { - let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in - if let collection = item.value.wrappedValue as? [Any?] { - - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } - - if !item.value.isExplode { - result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) - } else { - collectionValues - .forEach { value in - result.append(URLQueryItem(name: item.key, value: value)) - } - } - - } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - /// maps all values from source to query parameters - /// - /// collection values are always exploded - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in - if let collection = item.value as? [Any?] { - collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } - .forEach { value in - result.append(URLQueryItem(name: item.key, value: value)) - } - - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs.swift b/authentikClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index edba64f..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,75 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -// We reverted the change of authentikClientAPI to authentikClient introduced in https://github.com/OpenAPITools/openapi-generator/pull/9624 -// Because it was causing the following issue https://github.com/OpenAPITools/openapi-generator/issues/9953 -// If you are affected by this issue, please consider removing the following two lines, -// By setting the option removeMigrationProjectNameClass to true in the generator -@available(*, deprecated, renamed: "authentikClientAPI") -public typealias authentikClient = authentikClientAPI - -open class authentikClientAPI { - public static var basePath = "http://localhost/api/v3" - public static var customHeaders: [String: String] = [:] - public static var credential: URLCredential? - public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let method: String - public let URLString: String - public let requestTask: RequestTask = RequestTask() - public let requiresAuthentication: Bool - - /// Optional block to obtain a reference to the request's progress instance when available. - /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. - /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.headers = headers - self.requiresAuthentication = requiresAuthentication - - addHeaders(authentikClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - @discardableResult - open func execute(_ apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { - return requestTask - } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - credential = authentikClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/AdminAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/AdminAPI.swift deleted file mode 100644 index 817f67d..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/AdminAPI.swift +++ /dev/null @@ -1,454 +0,0 @@ -// -// AdminAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class AdminAPI { - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminAppsList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [App]?, _ error: Error?) -> Void)) -> RequestTask { - return adminAppsListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/apps/ - - Read-only view list all installed apps - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[App]> - */ - open class func adminAppsListWithRequestBuilder() -> RequestBuilder<[App]> { - let localVariablePath = "/admin/apps/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[App]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminMetricsRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LoginMetrics?, _ error: Error?) -> Void)) -> RequestTask { - return adminMetricsRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/metrics/ - - Login Metrics per 1h - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func adminMetricsRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/admin/metrics/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminModelsList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [App]?, _ error: Error?) -> Void)) -> RequestTask { - return adminModelsListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/models/ - - Read-only view list all installed models - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[App]> - */ - open class func adminModelsListWithRequestBuilder() -> RequestBuilder<[App]> { - let localVariablePath = "/admin/models/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[App]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminSystemCreate(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SystemInfo?, _ error: Error?) -> Void)) -> RequestTask { - return adminSystemCreateWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /admin/system/ - - Get system information. - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func adminSystemCreateWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/admin/system/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminSystemRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SystemInfo?, _ error: Error?) -> Void)) -> RequestTask { - return adminSystemRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/system/ - - Get system information. - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func adminSystemRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/admin/system/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminSystemTasksList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Task]?, _ error: Error?) -> Void)) -> RequestTask { - return adminSystemTasksListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/system_tasks/ - - List system tasks - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[Task]> - */ - open class func adminSystemTasksListWithRequestBuilder() -> RequestBuilder<[Task]> { - let localVariablePath = "/admin/system_tasks/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Task]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminSystemTasksRetrieve(id: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Task?, _ error: Error?) -> Void)) -> RequestTask { - return adminSystemTasksRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/system_tasks/{id}/ - - Get a single system task - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) - - returns: RequestBuilder - */ - open class func adminSystemTasksRetrieveWithRequestBuilder(id: String) -> RequestBuilder { - var localVariablePath = "/admin/system_tasks/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminSystemTasksRetryCreate(id: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return adminSystemTasksRetryCreateWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /admin/system_tasks/{id}/retry/ - - Retry task - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) - - returns: RequestBuilder - */ - open class func adminSystemTasksRetryCreateWithRequestBuilder(id: String) -> RequestBuilder { - var localVariablePath = "/admin/system_tasks/{id}/retry/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminVersionRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Version?, _ error: Error?) -> Void)) -> RequestTask { - return adminVersionRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/version/ - - Get running and latest version. - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func adminVersionRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/admin/version/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func adminWorkersRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Workers?, _ error: Error?) -> Void)) -> RequestTask { - return adminWorkersRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /admin/workers/ - - Get currently connected worker count. - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func adminWorkersRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/admin/workers/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/AuthenticatorsAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/AuthenticatorsAPI.swift deleted file mode 100644 index a7e4b18..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/AuthenticatorsAPI.swift +++ /dev/null @@ -1,3130 +0,0 @@ -// -// AuthenticatorsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class AuthenticatorsAPI { - - /** - - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminAllList(user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Device]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminAllListWithRequestBuilder(user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/all/ - - Get all devices for current user - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter user: (query) (optional) - - returns: RequestBuilder<[Device]> - */ - open class func authenticatorsAdminAllListWithRequestBuilder(user: Int? = nil) -> RequestBuilder<[Device]> { - let localVariablePath = "/authenticators/admin/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Device]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter duoDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoCreate(duoDeviceRequest: DuoDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoCreateWithRequestBuilder(duoDeviceRequest: duoDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /authenticators/admin/duo/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter duoDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoCreateWithRequestBuilder(duoDeviceRequest: DuoDeviceRequest) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/duo/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: duoDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/admin/duo/{id}/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDuoDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/duo/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/duo/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter patchedDuoDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoPartialUpdateWithRequestBuilder(id: id, patchedDuoDeviceRequest: patchedDuoDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/admin/duo/{id}/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter patchedDuoDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoPartialUpdateWithRequestBuilder(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDuoDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/duo/{id}/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter duoDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminDuoUpdateWithRequestBuilder(id: id, duoDeviceRequest: duoDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/admin/duo/{id}/ - - Viewset for Duo authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter duoDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminDuoUpdateWithRequestBuilder(id: Int, duoDeviceRequest: DuoDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: duoDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sMSDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsCreate(sMSDeviceRequest: SMSDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsCreateWithRequestBuilder(sMSDeviceRequest: sMSDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /authenticators/admin/sms/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sMSDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsCreateWithRequestBuilder(sMSDeviceRequest: SMSDeviceRequest) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/sms/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sMSDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/admin/sms/{id}/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSMSDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/sms/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/sms/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter patchedSMSDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsPartialUpdateWithRequestBuilder(id: id, patchedSMSDeviceRequest: patchedSMSDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/admin/sms/{id}/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter patchedSMSDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsPartialUpdateWithRequestBuilder(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSMSDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/sms/{id}/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter sMSDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminSmsUpdateWithRequestBuilder(id: id, sMSDeviceRequest: sMSDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/admin/sms/{id}/ - - Viewset for sms authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter sMSDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminSmsUpdateWithRequestBuilder(id: Int, sMSDeviceRequest: SMSDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sMSDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter staticDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticCreate(staticDeviceRequest: StaticDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticCreateWithRequestBuilder(staticDeviceRequest: staticDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /authenticators/admin/static/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter staticDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticCreateWithRequestBuilder(staticDeviceRequest: StaticDeviceRequest) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/static/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: staticDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/admin/static/{id}/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedStaticDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/static/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/static/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter patchedStaticDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticPartialUpdateWithRequestBuilder(id: id, patchedStaticDeviceRequest: patchedStaticDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/admin/static/{id}/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter patchedStaticDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticPartialUpdateWithRequestBuilder(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedStaticDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/static/{id}/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter staticDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminStaticUpdateWithRequestBuilder(id: id, staticDeviceRequest: staticDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/admin/static/{id}/ - - Viewset for static authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter staticDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminStaticUpdateWithRequestBuilder(id: Int, staticDeviceRequest: StaticDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: staticDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tOTPDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpCreate(tOTPDeviceRequest: TOTPDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpCreateWithRequestBuilder(tOTPDeviceRequest: tOTPDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /authenticators/admin/totp/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tOTPDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpCreateWithRequestBuilder(tOTPDeviceRequest: TOTPDeviceRequest) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/totp/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tOTPDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/admin/totp/{id}/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTOTPDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/totp/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/totp/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter patchedTOTPDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpPartialUpdateWithRequestBuilder(id: id, patchedTOTPDeviceRequest: patchedTOTPDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/admin/totp/{id}/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter patchedTOTPDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpPartialUpdateWithRequestBuilder(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedTOTPDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/totp/{id}/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter tOTPDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminTotpUpdateWithRequestBuilder(id: id, tOTPDeviceRequest: tOTPDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/admin/totp/{id}/ - - Viewset for totp authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter tOTPDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminTotpUpdateWithRequestBuilder(id: Int, tOTPDeviceRequest: TOTPDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tOTPDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter webAuthnDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnCreate(webAuthnDeviceRequest: WebAuthnDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnCreateWithRequestBuilder(webAuthnDeviceRequest: webAuthnDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /authenticators/admin/webauthn/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter webAuthnDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnCreateWithRequestBuilder(webAuthnDeviceRequest: WebAuthnDeviceRequest) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/webauthn/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: webAuthnDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/admin/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedWebAuthnDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/webauthn/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/admin/webauthn/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter patchedWebAuthnDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnPartialUpdateWithRequestBuilder(id: id, patchedWebAuthnDeviceRequest: patchedWebAuthnDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/admin/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter patchedWebAuthnDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnPartialUpdateWithRequestBuilder(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedWebAuthnDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/admin/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter webAuthnDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAdminWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAdminWebauthnUpdateWithRequestBuilder(id: id, webAuthnDeviceRequest: webAuthnDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/admin/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices (for admins) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter webAuthnDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsAdminWebauthnUpdateWithRequestBuilder(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/admin/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: webAuthnDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsAllList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Device]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsAllListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/all/ - - Get all devices for current user - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[Device]> - */ - open class func authenticatorsAllListWithRequestBuilder() -> RequestBuilder<[Device]> { - let localVariablePath = "/authenticators/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Device]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/duo/{id}/ - - Viewset for Duo authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - returns: RequestBuilder - */ - open class func authenticatorsDuoDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDuoDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/duo/ - - Viewset for Duo authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsDuoListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/duo/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter patchedDuoDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoPartialUpdateWithRequestBuilder(id: id, patchedDuoDeviceRequest: patchedDuoDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/duo/{id}/ - - Viewset for Duo authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter patchedDuoDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsDuoPartialUpdateWithRequestBuilder(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDuoDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/duo/{id}/ - - Viewset for Duo authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - returns: RequestBuilder - */ - open class func authenticatorsDuoRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter duoDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoUpdateWithRequestBuilder(id: id, duoDeviceRequest: duoDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/duo/{id}/ - - Viewset for Duo authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter duoDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsDuoUpdateWithRequestBuilder(id: Int, duoDeviceRequest: DuoDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/duo/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: duoDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Duo Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsDuoUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsDuoUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/duo/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Duo Device. - - returns: RequestBuilder<[UsedBy]> - */ - open class func authenticatorsDuoUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/authenticators/duo/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/sms/{id}/ - - Viewset for sms authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - returns: RequestBuilder - */ - open class func authenticatorsSmsDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSMSDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/sms/ - - Viewset for sms authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsSmsListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/sms/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter patchedSMSDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsPartialUpdateWithRequestBuilder(id: id, patchedSMSDeviceRequest: patchedSMSDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/sms/{id}/ - - Viewset for sms authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter patchedSMSDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsSmsPartialUpdateWithRequestBuilder(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSMSDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/sms/{id}/ - - Viewset for sms authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - returns: RequestBuilder - */ - open class func authenticatorsSmsRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter sMSDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SMSDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsUpdateWithRequestBuilder(id: id, sMSDeviceRequest: sMSDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/sms/{id}/ - - Viewset for sms authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter sMSDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsSmsUpdateWithRequestBuilder(id: Int, sMSDeviceRequest: SMSDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/sms/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sMSDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SMS Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsSmsUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsSmsUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/sms/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SMS Device. - - returns: RequestBuilder<[UsedBy]> - */ - open class func authenticatorsSmsUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/authenticators/sms/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/static/{id}/ - - Viewset for static authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - returns: RequestBuilder - */ - open class func authenticatorsStaticDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedStaticDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/static/ - - Viewset for static authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsStaticListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/static/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter patchedStaticDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticPartialUpdateWithRequestBuilder(id: id, patchedStaticDeviceRequest: patchedStaticDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/static/{id}/ - - Viewset for static authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter patchedStaticDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsStaticPartialUpdateWithRequestBuilder(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedStaticDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/static/{id}/ - - Viewset for static authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - returns: RequestBuilder - */ - open class func authenticatorsStaticRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter staticDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: StaticDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticUpdateWithRequestBuilder(id: id, staticDeviceRequest: staticDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/static/{id}/ - - Viewset for static authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter staticDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsStaticUpdateWithRequestBuilder(id: Int, staticDeviceRequest: StaticDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/static/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: staticDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Static Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsStaticUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsStaticUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/static/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Static Device. - - returns: RequestBuilder<[UsedBy]> - */ - open class func authenticatorsStaticUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/authenticators/static/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/totp/{id}/ - - Viewset for totp authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - returns: RequestBuilder - */ - open class func authenticatorsTotpDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTOTPDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/totp/ - - Viewset for totp authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsTotpListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/totp/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter patchedTOTPDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpPartialUpdateWithRequestBuilder(id: id, patchedTOTPDeviceRequest: patchedTOTPDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/totp/{id}/ - - Viewset for totp authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter patchedTOTPDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsTotpPartialUpdateWithRequestBuilder(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedTOTPDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/totp/{id}/ - - Viewset for totp authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - returns: RequestBuilder - */ - open class func authenticatorsTotpRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter tOTPDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TOTPDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpUpdateWithRequestBuilder(id: id, tOTPDeviceRequest: tOTPDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/totp/{id}/ - - Viewset for totp authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter tOTPDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsTotpUpdateWithRequestBuilder(id: Int, tOTPDeviceRequest: TOTPDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/totp/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tOTPDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this TOTP Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsTotpUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsTotpUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/totp/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this TOTP Device. - - returns: RequestBuilder<[UsedBy]> - */ - open class func authenticatorsTotpUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/authenticators/totp/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /authenticators/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - returns: RequestBuilder - */ - open class func authenticatorsWebauthnDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedWebAuthnDeviceList?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/webauthn/ - - Viewset for WebAuthn authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func authenticatorsWebauthnListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/authenticators/webauthn/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter patchedWebAuthnDeviceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnPartialUpdateWithRequestBuilder(id: id, patchedWebAuthnDeviceRequest: patchedWebAuthnDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /authenticators/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter patchedWebAuthnDeviceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func authenticatorsWebauthnPartialUpdateWithRequestBuilder(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/authenticators/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedWebAuthnDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - returns: RequestBuilder - */ - open class func authenticatorsWebauthnRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/authenticators/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter webAuthnDeviceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: WebAuthnDevice?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnUpdateWithRequestBuilder(id: id, webAuthnDeviceRequest: webAuthnDeviceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /authenticators/webauthn/{id}/ - - Viewset for WebAuthn authenticator devices - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter webAuthnDeviceRequest: (body) - - returns: RequestBuilder - */ - open class func authenticatorsWebauthnUpdateWithRequestBuilder(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest) -> RequestBuilder { - var localVariablePath = "/authenticators/webauthn/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: webAuthnDeviceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func authenticatorsWebauthnUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return authenticatorsWebauthnUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /authenticators/webauthn/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this WebAuthn Device. - - returns: RequestBuilder<[UsedBy]> - */ - open class func authenticatorsWebauthnUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/authenticators/webauthn/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/CoreAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/CoreAPI.swift deleted file mode 100644 index fff513c..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/CoreAPI.swift +++ /dev/null @@ -1,3237 +0,0 @@ -// -// CoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class CoreAPI { - - /** - - - parameter slug: (path) - - parameter forUser: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsCheckAccessRetrieve(slug: String, forUser: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyTestResult?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsCheckAccessRetrieveWithRequestBuilder(slug: slug, forUser: forUser).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/applications/{slug}/check_access/ - - Check access to a single application by slug - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter forUser: (query) (optional) - - returns: RequestBuilder - */ - open class func coreApplicationsCheckAccessRetrieveWithRequestBuilder(slug: String, forUser: Int? = nil) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/check_access/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "for_user": (wrappedValue: forUser?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter applicationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsCreate(applicationRequest: ApplicationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Application?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsCreateWithRequestBuilder(applicationRequest: applicationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/applications/ - - Application Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter applicationRequest: (body) - - returns: RequestBuilder - */ - open class func coreApplicationsCreateWithRequestBuilder(applicationRequest: ApplicationRequest) -> RequestBuilder { - let localVariablePath = "/core/applications/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: applicationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/applications/{slug}/ - - Application Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func coreApplicationsDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter group: (query) (optional) - - parameter metaDescription: (query) (optional) - - parameter metaLaunchUrl: (query) (optional) - - parameter metaPublisher: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter superuserFullList: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsList(group: String? = nil, metaDescription: String? = nil, metaLaunchUrl: String? = nil, metaPublisher: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, superuserFullList: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedApplicationList?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsListWithRequestBuilder(group: group, metaDescription: metaDescription, metaLaunchUrl: metaLaunchUrl, metaPublisher: metaPublisher, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug, superuserFullList: superuserFullList).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/applications/ - - Custom list method that checks Policy based access instead of guardian - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter group: (query) (optional) - - parameter metaDescription: (query) (optional) - - parameter metaLaunchUrl: (query) (optional) - - parameter metaPublisher: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter superuserFullList: (query) (optional) - - returns: RequestBuilder - */ - open class func coreApplicationsListWithRequestBuilder(group: String? = nil, metaDescription: String? = nil, metaLaunchUrl: String? = nil, metaPublisher: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, superuserFullList: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/core/applications/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "group": (wrappedValue: group?.encodeToJSON(), isExplode: true), - "meta_description": (wrappedValue: metaDescription?.encodeToJSON(), isExplode: true), - "meta_launch_url": (wrappedValue: metaLaunchUrl?.encodeToJSON(), isExplode: true), - "meta_publisher": (wrappedValue: metaPublisher?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - "superuser_full_list": (wrappedValue: superuserFullList?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsMetricsList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Coordinate]?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsMetricsListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/applications/{slug}/metrics/ - - Metrics for application logins - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[Coordinate]> - */ - open class func coreApplicationsMetricsListWithRequestBuilder(slug: String) -> RequestBuilder<[Coordinate]> { - var localVariablePath = "/core/applications/{slug}/metrics/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Coordinate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedApplicationRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsPartialUpdate(slug: String, patchedApplicationRequest: PatchedApplicationRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Application?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsPartialUpdateWithRequestBuilder(slug: slug, patchedApplicationRequest: patchedApplicationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /core/applications/{slug}/ - - Application Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedApplicationRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func coreApplicationsPartialUpdateWithRequestBuilder(slug: String, patchedApplicationRequest: PatchedApplicationRequest? = nil) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedApplicationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Application?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/applications/{slug}/ - - Application Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func coreApplicationsRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsSetIconCreate(slug: String, file: URL? = nil, clear: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsSetIconCreateWithRequestBuilder(slug: slug, file: file, clear: clear).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/applications/{slug}/set_icon/ - - Set application icon - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - returns: RequestBuilder - */ - open class func coreApplicationsSetIconCreateWithRequestBuilder(slug: String, file: URL? = nil, clear: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/set_icon/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableFormParams: [String: Any?] = [ - "file": file?.encodeToJSON(), - "clear": clear?.encodeToJSON(), - ] - - let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) - let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - "Content-Type": "multipart/form-data", - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter filePathRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsSetIconUrlCreateWithRequestBuilder(slug: slug, filePathRequest: filePathRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/applications/{slug}/set_icon_url/ - - Set application icon (as URL) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter filePathRequest: (body) - - returns: RequestBuilder - */ - open class func coreApplicationsSetIconUrlCreateWithRequestBuilder(slug: String, filePathRequest: FilePathRequest) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/set_icon_url/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: filePathRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter applicationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsUpdate(slug: String, applicationRequest: ApplicationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Application?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsUpdateWithRequestBuilder(slug: slug, applicationRequest: applicationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/applications/{slug}/ - - Application Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter applicationRequest: (body) - - returns: RequestBuilder - */ - open class func coreApplicationsUpdateWithRequestBuilder(slug: String, applicationRequest: ApplicationRequest) -> RequestBuilder { - var localVariablePath = "/core/applications/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: applicationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreApplicationsUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreApplicationsUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/applications/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreApplicationsUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/applications/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreAuthenticatedSessionsDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreAuthenticatedSessionsDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/authenticated_sessions/{uuid}/ - - AuthenticatedSession Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - returns: RequestBuilder - */ - open class func coreAuthenticatedSessionsDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/authenticated_sessions/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter lastIp: (query) (optional) - - parameter lastUserAgent: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter userUsername: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreAuthenticatedSessionsList(lastIp: String? = nil, lastUserAgent: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatedSessionList?, _ error: Error?) -> Void)) -> RequestTask { - return coreAuthenticatedSessionsListWithRequestBuilder(lastIp: lastIp, lastUserAgent: lastUserAgent, ordering: ordering, page: page, pageSize: pageSize, search: search, userUsername: userUsername).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/authenticated_sessions/ - - AuthenticatedSession Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter lastIp: (query) (optional) - - parameter lastUserAgent: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter userUsername: (query) (optional) - - returns: RequestBuilder - */ - open class func coreAuthenticatedSessionsListWithRequestBuilder(lastIp: String? = nil, lastUserAgent: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil) -> RequestBuilder { - let localVariablePath = "/core/authenticated_sessions/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "last_ip": (wrappedValue: lastIp?.encodeToJSON(), isExplode: true), - "last_user_agent": (wrappedValue: lastUserAgent?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user__username": (wrappedValue: userUsername?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreAuthenticatedSessionsRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatedSession?, _ error: Error?) -> Void)) -> RequestTask { - return coreAuthenticatedSessionsRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/authenticated_sessions/{uuid}/ - - AuthenticatedSession Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - returns: RequestBuilder - */ - open class func coreAuthenticatedSessionsRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/authenticated_sessions/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreAuthenticatedSessionsUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreAuthenticatedSessionsUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/authenticated_sessions/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Authenticated Session. - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreAuthenticatedSessionsUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/authenticated_sessions/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter userAccountRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsAddUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsAddUserCreateWithRequestBuilder(groupUuid: groupUuid, userAccountRequest: userAccountRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/groups/{group_uuid}/add_user/ - - Add user to group - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter userAccountRequest: (body) - - returns: RequestBuilder - */ - open class func coreGroupsAddUserCreateWithRequestBuilder(groupUuid: UUID, userAccountRequest: UserAccountRequest) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/add_user/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userAccountRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsCreate(groupRequest: GroupRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Group?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsCreateWithRequestBuilder(groupRequest: groupRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/groups/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupRequest: (body) - - returns: RequestBuilder - */ - open class func coreGroupsCreateWithRequestBuilder(groupRequest: GroupRequest) -> RequestBuilder { - let localVariablePath = "/core/groups/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: groupRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsDestroy(groupUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsDestroyWithRequestBuilder(groupUuid: groupUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/groups/{group_uuid}/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - returns: RequestBuilder - */ - open class func coreGroupsDestroyWithRequestBuilder(groupUuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter attributes: (query) Attributes (optional) - - parameter isSuperuser: (query) (optional) - - parameter membersByPk: (query) (optional) - - parameter membersByUsername: (query) Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsList(attributes: String? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedGroupList?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsListWithRequestBuilder(attributes: attributes, isSuperuser: isSuperuser, membersByPk: membersByPk, membersByUsername: membersByUsername, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/groups/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter attributes: (query) Attributes (optional) - - parameter isSuperuser: (query) (optional) - - parameter membersByPk: (query) (optional) - - parameter membersByUsername: (query) Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func coreGroupsListWithRequestBuilder(attributes: String? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/core/groups/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "attributes": (wrappedValue: attributes?.encodeToJSON(), isExplode: true), - "is_superuser": (wrappedValue: isSuperuser?.encodeToJSON(), isExplode: true), - "members_by_pk": (wrappedValue: membersByPk?.encodeToJSON(), isExplode: true), - "members_by_username": (wrappedValue: membersByUsername?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter patchedGroupRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsPartialUpdate(groupUuid: UUID, patchedGroupRequest: PatchedGroupRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Group?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsPartialUpdateWithRequestBuilder(groupUuid: groupUuid, patchedGroupRequest: patchedGroupRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /core/groups/{group_uuid}/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter patchedGroupRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func coreGroupsPartialUpdateWithRequestBuilder(groupUuid: UUID, patchedGroupRequest: PatchedGroupRequest? = nil) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedGroupRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter userAccountRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsRemoveUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsRemoveUserCreateWithRequestBuilder(groupUuid: groupUuid, userAccountRequest: userAccountRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/groups/{group_uuid}/remove_user/ - - Add user to group - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter userAccountRequest: (body) - - returns: RequestBuilder - */ - open class func coreGroupsRemoveUserCreateWithRequestBuilder(groupUuid: UUID, userAccountRequest: UserAccountRequest) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/remove_user/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userAccountRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsRetrieve(groupUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Group?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsRetrieveWithRequestBuilder(groupUuid: groupUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/groups/{group_uuid}/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - returns: RequestBuilder - */ - open class func coreGroupsRetrieveWithRequestBuilder(groupUuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter groupRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsUpdate(groupUuid: UUID, groupRequest: GroupRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Group?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsUpdateWithRequestBuilder(groupUuid: groupUuid, groupRequest: groupRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/groups/{group_uuid}/ - - Group Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter groupRequest: (body) - - returns: RequestBuilder - */ - open class func coreGroupsUpdateWithRequestBuilder(groupUuid: UUID, groupRequest: GroupRequest) -> RequestBuilder { - var localVariablePath = "/core/groups/{group_uuid}/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: groupRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupUuid: (path) A UUID string identifying this Group. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreGroupsUsedByList(groupUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreGroupsUsedByListWithRequestBuilder(groupUuid: groupUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/groups/{group_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupUuid: (path) A UUID string identifying this Group. - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreGroupsUsedByListWithRequestBuilder(groupUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/groups/{group_uuid}/used_by/" - let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))" - let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{group_uuid}", with: groupUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsCreate(tenantRequest: TenantRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Tenant?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsCreateWithRequestBuilder(tenantRequest: tenantRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/tenants/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantRequest: (body) - - returns: RequestBuilder - */ - open class func coreTenantsCreateWithRequestBuilder(tenantRequest: TenantRequest) -> RequestBuilder { - let localVariablePath = "/core/tenants/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tenantRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsCurrentRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CurrentTenant?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsCurrentRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tenants/current/ - - Get current tenant - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func coreTenantsCurrentRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/core/tenants/current/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsDestroy(tenantUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsDestroyWithRequestBuilder(tenantUuid: tenantUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/tenants/{tenant_uuid}/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - returns: RequestBuilder - */ - open class func coreTenantsDestroyWithRequestBuilder(tenantUuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/tenants/{tenant_uuid}/" - let tenantUuidPreEscape = "\(APIHelper.mapValueToPathItem(tenantUuid))" - let tenantUuidPostEscape = tenantUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter brandingFavicon: (query) (optional) - - parameter brandingLogo: (query) (optional) - - parameter brandingTitle: (query) (optional) - - parameter _default: (query) (optional) - - parameter domain: (query) (optional) - - parameter eventRetention: (query) (optional) - - parameter flowAuthentication: (query) (optional) - - parameter flowDeviceCode: (query) (optional) - - parameter flowInvalidation: (query) (optional) - - parameter flowRecovery: (query) (optional) - - parameter flowUnenrollment: (query) (optional) - - parameter flowUserSettings: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantUuid: (query) (optional) - - parameter webCertificate: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsList(brandingFavicon: String? = nil, brandingLogo: String? = nil, brandingTitle: String? = nil, _default: Bool? = nil, domain: String? = nil, eventRetention: String? = nil, flowAuthentication: UUID? = nil, flowDeviceCode: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantUuid: UUID? = nil, webCertificate: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTenantList?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsListWithRequestBuilder(brandingFavicon: brandingFavicon, brandingLogo: brandingLogo, brandingTitle: brandingTitle, _default: _default, domain: domain, eventRetention: eventRetention, flowAuthentication: flowAuthentication, flowDeviceCode: flowDeviceCode, flowInvalidation: flowInvalidation, flowRecovery: flowRecovery, flowUnenrollment: flowUnenrollment, flowUserSettings: flowUserSettings, ordering: ordering, page: page, pageSize: pageSize, search: search, tenantUuid: tenantUuid, webCertificate: webCertificate).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tenants/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter brandingFavicon: (query) (optional) - - parameter brandingLogo: (query) (optional) - - parameter brandingTitle: (query) (optional) - - parameter _default: (query) (optional) - - parameter domain: (query) (optional) - - parameter eventRetention: (query) (optional) - - parameter flowAuthentication: (query) (optional) - - parameter flowDeviceCode: (query) (optional) - - parameter flowInvalidation: (query) (optional) - - parameter flowRecovery: (query) (optional) - - parameter flowUnenrollment: (query) (optional) - - parameter flowUserSettings: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantUuid: (query) (optional) - - parameter webCertificate: (query) (optional) - - returns: RequestBuilder - */ - open class func coreTenantsListWithRequestBuilder(brandingFavicon: String? = nil, brandingLogo: String? = nil, brandingTitle: String? = nil, _default: Bool? = nil, domain: String? = nil, eventRetention: String? = nil, flowAuthentication: UUID? = nil, flowDeviceCode: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantUuid: UUID? = nil, webCertificate: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/core/tenants/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "branding_favicon": (wrappedValue: brandingFavicon?.encodeToJSON(), isExplode: true), - "branding_logo": (wrappedValue: brandingLogo?.encodeToJSON(), isExplode: true), - "branding_title": (wrappedValue: brandingTitle?.encodeToJSON(), isExplode: true), - "default": (wrappedValue: _default?.encodeToJSON(), isExplode: true), - "domain": (wrappedValue: domain?.encodeToJSON(), isExplode: true), - "event_retention": (wrappedValue: eventRetention?.encodeToJSON(), isExplode: true), - "flow_authentication": (wrappedValue: flowAuthentication?.encodeToJSON(), isExplode: true), - "flow_device_code": (wrappedValue: flowDeviceCode?.encodeToJSON(), isExplode: true), - "flow_invalidation": (wrappedValue: flowInvalidation?.encodeToJSON(), isExplode: true), - "flow_recovery": (wrappedValue: flowRecovery?.encodeToJSON(), isExplode: true), - "flow_unenrollment": (wrappedValue: flowUnenrollment?.encodeToJSON(), isExplode: true), - "flow_user_settings": (wrappedValue: flowUserSettings?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "tenant_uuid": (wrappedValue: tenantUuid?.encodeToJSON(), isExplode: true), - "web_certificate": (wrappedValue: webCertificate?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter patchedTenantRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsPartialUpdate(tenantUuid: UUID, patchedTenantRequest: PatchedTenantRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Tenant?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsPartialUpdateWithRequestBuilder(tenantUuid: tenantUuid, patchedTenantRequest: patchedTenantRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /core/tenants/{tenant_uuid}/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter patchedTenantRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func coreTenantsPartialUpdateWithRequestBuilder(tenantUuid: UUID, patchedTenantRequest: PatchedTenantRequest? = nil) -> RequestBuilder { - var localVariablePath = "/core/tenants/{tenant_uuid}/" - let tenantUuidPreEscape = "\(APIHelper.mapValueToPathItem(tenantUuid))" - let tenantUuidPostEscape = tenantUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedTenantRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsRetrieve(tenantUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Tenant?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsRetrieveWithRequestBuilder(tenantUuid: tenantUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tenants/{tenant_uuid}/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - returns: RequestBuilder - */ - open class func coreTenantsRetrieveWithRequestBuilder(tenantUuid: UUID) -> RequestBuilder { - var localVariablePath = "/core/tenants/{tenant_uuid}/" - let tenantUuidPreEscape = "\(APIHelper.mapValueToPathItem(tenantUuid))" - let tenantUuidPostEscape = tenantUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter tenantRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsUpdate(tenantUuid: UUID, tenantRequest: TenantRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Tenant?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsUpdateWithRequestBuilder(tenantUuid: tenantUuid, tenantRequest: tenantRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/tenants/{tenant_uuid}/ - - Tenant Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter tenantRequest: (body) - - returns: RequestBuilder - */ - open class func coreTenantsUpdateWithRequestBuilder(tenantUuid: UUID, tenantRequest: TenantRequest) -> RequestBuilder { - var localVariablePath = "/core/tenants/{tenant_uuid}/" - let tenantUuidPreEscape = "\(APIHelper.mapValueToPathItem(tenantUuid))" - let tenantUuidPostEscape = tenantUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tenantRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTenantsUsedByList(tenantUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreTenantsUsedByListWithRequestBuilder(tenantUuid: tenantUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tenants/{tenant_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tenantUuid: (path) A UUID string identifying this Tenant. - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreTenantsUsedByListWithRequestBuilder(tenantUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/tenants/{tenant_uuid}/used_by/" - let tenantUuidPreEscape = "\(APIHelper.mapValueToPathItem(tenantUuid))" - let tenantUuidPostEscape = tenantUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter tokenRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensCreate(tokenRequest: TokenRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Token?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensCreateWithRequestBuilder(tokenRequest: tokenRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/tokens/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter tokenRequest: (body) - - returns: RequestBuilder - */ - open class func coreTokensCreateWithRequestBuilder(tokenRequest: TokenRequest) -> RequestBuilder { - let localVariablePath = "/core/tokens/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tokenRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensDestroy(identifier: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensDestroyWithRequestBuilder(identifier: identifier).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/tokens/{identifier}/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - returns: RequestBuilder - */ - open class func coreTokensDestroyWithRequestBuilder(identifier: String) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter intent - */ - public enum Intent_coreTokensList: String, CaseIterable { - case api = "api" - case appPassword = "app_password" - case recovery = "recovery" - case verification = "verification" - } - - /** - - - parameter description: (query) (optional) - - parameter expires: (query) (optional) - - parameter expiring: (query) (optional) - - parameter identifier: (query) (optional) - - parameter intent: (query) * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password (optional) - - parameter managed: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter userUsername: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensList(description: String? = nil, expires: Date? = nil, expiring: Bool? = nil, identifier: String? = nil, intent: Intent_coreTokensList? = nil, managed: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTokenList?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensListWithRequestBuilder(description: description, expires: expires, expiring: expiring, identifier: identifier, intent: intent, managed: managed, ordering: ordering, page: page, pageSize: pageSize, search: search, userUsername: userUsername).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tokens/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter description: (query) (optional) - - parameter expires: (query) (optional) - - parameter expiring: (query) (optional) - - parameter identifier: (query) (optional) - - parameter intent: (query) * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password (optional) - - parameter managed: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter userUsername: (query) (optional) - - returns: RequestBuilder - */ - open class func coreTokensListWithRequestBuilder(description: String? = nil, expires: Date? = nil, expiring: Bool? = nil, identifier: String? = nil, intent: Intent_coreTokensList? = nil, managed: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil) -> RequestBuilder { - let localVariablePath = "/core/tokens/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "description": (wrappedValue: description?.encodeToJSON(), isExplode: true), - "expires": (wrappedValue: expires?.encodeToJSON(), isExplode: true), - "expiring": (wrappedValue: expiring?.encodeToJSON(), isExplode: true), - "identifier": (wrappedValue: identifier?.encodeToJSON(), isExplode: true), - "intent": (wrappedValue: intent?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user__username": (wrappedValue: userUsername?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter patchedTokenRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensPartialUpdate(identifier: String, patchedTokenRequest: PatchedTokenRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Token?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensPartialUpdateWithRequestBuilder(identifier: identifier, patchedTokenRequest: patchedTokenRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /core/tokens/{identifier}/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - parameter patchedTokenRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func coreTokensPartialUpdateWithRequestBuilder(identifier: String, patchedTokenRequest: PatchedTokenRequest? = nil) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedTokenRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensRetrieve(identifier: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Token?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensRetrieveWithRequestBuilder(identifier: identifier).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tokens/{identifier}/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - returns: RequestBuilder - */ - open class func coreTokensRetrieveWithRequestBuilder(identifier: String) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter tokenSetKeyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensSetKeyCreate(identifier: String, tokenSetKeyRequest: TokenSetKeyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensSetKeyCreateWithRequestBuilder(identifier: identifier, tokenSetKeyRequest: tokenSetKeyRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/tokens/{identifier}/set_key/ - - Set token key. Action is logged as event. `authentik_core.set_token_key` permission is required. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - parameter tokenSetKeyRequest: (body) - - returns: RequestBuilder - */ - open class func coreTokensSetKeyCreateWithRequestBuilder(identifier: String, tokenSetKeyRequest: TokenSetKeyRequest) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/set_key/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tokenSetKeyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter tokenRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensUpdate(identifier: String, tokenRequest: TokenRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Token?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensUpdateWithRequestBuilder(identifier: identifier, tokenRequest: tokenRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/tokens/{identifier}/ - - Token Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - parameter tokenRequest: (body) - - returns: RequestBuilder - */ - open class func coreTokensUpdateWithRequestBuilder(identifier: String, tokenRequest: TokenRequest) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: tokenRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensUsedByList(identifier: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensUsedByListWithRequestBuilder(identifier: identifier).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tokens/{identifier}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreTokensUsedByListWithRequestBuilder(identifier: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/tokens/{identifier}/used_by/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTokensViewKeyRetrieve(identifier: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TokenView?, _ error: Error?) -> Void)) -> RequestTask { - return coreTokensViewKeyRetrieveWithRequestBuilder(identifier: identifier).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/tokens/{identifier}/view_key/ - - Return token key and log access - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (path) - - returns: RequestBuilder - */ - open class func coreTokensViewKeyRetrieveWithRequestBuilder(identifier: String) -> RequestBuilder { - var localVariablePath = "/core/tokens/{identifier}/view_key/" - let identifierPreEscape = "\(APIHelper.mapValueToPathItem(identifier))" - let identifierPostEscape = identifierPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{identifier}", with: identifierPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter transactionApplicationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreTransactionalApplicationsUpdate(transactionApplicationRequest: TransactionApplicationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TransactionApplicationResponse?, _ error: Error?) -> Void)) -> RequestTask { - return coreTransactionalApplicationsUpdateWithRequestBuilder(transactionApplicationRequest: transactionApplicationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/transactional/applications/ - - Convert data into a blueprint, validate it and apply it - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter transactionApplicationRequest: (body) - - returns: RequestBuilder - */ - open class func coreTransactionalApplicationsUpdateWithRequestBuilder(transactionApplicationRequest: TransactionApplicationRequest) -> RequestBuilder { - let localVariablePath = "/core/transactional/applications/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: transactionApplicationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Consent. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUserConsentDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUserConsentDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/user_consent/{id}/ - - UserConsent Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Consent. - - returns: RequestBuilder - */ - open class func coreUserConsentDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/user_consent/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter application: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUserConsentList(application: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserConsentList?, _ error: Error?) -> Void)) -> RequestTask { - return coreUserConsentListWithRequestBuilder(application: application, ordering: ordering, page: page, pageSize: pageSize, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/user_consent/ - - UserConsent Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter application: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func coreUserConsentListWithRequestBuilder(application: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/core/user_consent/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "application": (wrappedValue: application?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Consent. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUserConsentRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserConsent?, _ error: Error?) -> Void)) -> RequestTask { - return coreUserConsentRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/user_consent/{id}/ - - UserConsent Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Consent. - - returns: RequestBuilder - */ - open class func coreUserConsentRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/user_consent/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Consent. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUserConsentUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreUserConsentUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/user_consent/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Consent. - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreUserConsentUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/user_consent/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersCreate(userRequest: UserRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersCreateWithRequestBuilder(userRequest: userRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/users/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userRequest: (body) - - returns: RequestBuilder - */ - open class func coreUsersCreateWithRequestBuilder(userRequest: UserRequest) -> RequestBuilder { - let localVariablePath = "/core/users/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /core/users/{id}/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersImpersonateCreate(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersImpersonateCreateWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/users/{id}/impersonate/ - - Impersonate a user - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersImpersonateCreateWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/impersonate/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersImpersonateEndRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersImpersonateEndRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/impersonate_end/ - - End Impersonation a user - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func coreUsersImpersonateEndRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/core/users/impersonate_end/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter type - */ - public enum ModelType_coreUsersList: String, CaseIterable { - case external = "external" - case _internal = "internal" - case internalServiceAccount = "internal_service_account" - case serviceAccount = "service_account" - } - - /** - - - parameter attributes: (query) Attributes (optional) - - parameter email: (query) (optional) - - parameter groupsByName: (query) (optional) - - parameter groupsByPk: (query) (optional) - - parameter isActive: (query) (optional) - - parameter isSuperuser: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter path: (query) (optional) - - parameter pathStartswith: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter type: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) - - parameter username: (query) (optional) - - parameter uuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersList(attributes: String? = nil, email: String? = nil, groupsByName: [String]? = nil, groupsByPk: [UUID]? = nil, isActive: Bool? = nil, isSuperuser: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, pathStartswith: String? = nil, search: String? = nil, type: [ModelType_coreUsersList]? = nil, username: String? = nil, uuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserList?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersListWithRequestBuilder(attributes: attributes, email: email, groupsByName: groupsByName, groupsByPk: groupsByPk, isActive: isActive, isSuperuser: isSuperuser, name: name, ordering: ordering, page: page, pageSize: pageSize, path: path, pathStartswith: pathStartswith, search: search, type: type, username: username, uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter attributes: (query) Attributes (optional) - - parameter email: (query) (optional) - - parameter groupsByName: (query) (optional) - - parameter groupsByPk: (query) (optional) - - parameter isActive: (query) (optional) - - parameter isSuperuser: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter path: (query) (optional) - - parameter pathStartswith: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter type: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) - - parameter username: (query) (optional) - - parameter uuid: (query) (optional) - - returns: RequestBuilder - */ - open class func coreUsersListWithRequestBuilder(attributes: String? = nil, email: String? = nil, groupsByName: [String]? = nil, groupsByPk: [UUID]? = nil, isActive: Bool? = nil, isSuperuser: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, pathStartswith: String? = nil, search: String? = nil, type: [ModelType_coreUsersList]? = nil, username: String? = nil, uuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/core/users/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "attributes": (wrappedValue: attributes?.encodeToJSON(), isExplode: true), - "email": (wrappedValue: email?.encodeToJSON(), isExplode: true), - "groups_by_name": (wrappedValue: groupsByName?.encodeToJSON(), isExplode: true), - "groups_by_pk": (wrappedValue: groupsByPk?.encodeToJSON(), isExplode: true), - "is_active": (wrappedValue: isActive?.encodeToJSON(), isExplode: true), - "is_superuser": (wrappedValue: isSuperuser?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "path": (wrappedValue: path?.encodeToJSON(), isExplode: true), - "path_startswith": (wrappedValue: pathStartswith?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "type": (wrappedValue: type?.encodeToJSON(), isExplode: true), - "username": (wrappedValue: username?.encodeToJSON(), isExplode: true), - "uuid": (wrappedValue: uuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersMeRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SessionUser?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersMeRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/me/ - - Get information about current user - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func coreUsersMeRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/core/users/me/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersMetricsRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserMetrics?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersMetricsRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/{id}/metrics/ - - User metrics per 1h - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersMetricsRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/metrics/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter patchedUserRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersPartialUpdate(id: Int, patchedUserRequest: PatchedUserRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersPartialUpdateWithRequestBuilder(id: id, patchedUserRequest: patchedUserRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /core/users/{id}/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - parameter patchedUserRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func coreUsersPartialUpdateWithRequestBuilder(id: Int, patchedUserRequest: PatchedUserRequest? = nil) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter search: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersPathsRetrieve(search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserPath?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersPathsRetrieveWithRequestBuilder(search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/paths/ - - Get all user paths - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter search: (query) (optional) - - returns: RequestBuilder - */ - open class func coreUsersPathsRetrieveWithRequestBuilder(search: String? = nil) -> RequestBuilder { - let localVariablePath = "/core/users/paths/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter emailStage: (query) - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersRecoveryEmailRetrieve(emailStage: String, id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersRecoveryEmailRetrieveWithRequestBuilder(emailStage: emailStage, id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/{id}/recovery_email/ - - Create a temporary link that a user can use to recover their accounts - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter emailStage: (query) - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersRecoveryEmailRetrieveWithRequestBuilder(emailStage: String, id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/recovery_email/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "email_stage": (wrappedValue: emailStage.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersRecoveryRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Link?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersRecoveryRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/{id}/recovery/ - - Create a temporary link that a user can use to recover their accounts - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersRecoveryRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/recovery/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/{id}/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder - */ - open class func coreUsersRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userServiceAccountRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersServiceAccountCreate(userServiceAccountRequest: UserServiceAccountRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserServiceAccountResponse?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersServiceAccountCreateWithRequestBuilder(userServiceAccountRequest: userServiceAccountRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/users/service_account/ - - Create a new user account that is marked as a service account - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userServiceAccountRequest: (body) - - returns: RequestBuilder - */ - open class func coreUsersServiceAccountCreateWithRequestBuilder(userServiceAccountRequest: UserServiceAccountRequest) -> RequestBuilder { - let localVariablePath = "/core/users/service_account/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userServiceAccountRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter userPasswordSetRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersSetPasswordCreate(id: Int, userPasswordSetRequest: UserPasswordSetRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersSetPasswordCreateWithRequestBuilder(id: id, userPasswordSetRequest: userPasswordSetRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /core/users/{id}/set_password/ - - Set password for user - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - parameter userPasswordSetRequest: (body) - - returns: RequestBuilder - */ - open class func coreUsersSetPasswordCreateWithRequestBuilder(id: Int, userPasswordSetRequest: UserPasswordSetRequest) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/set_password/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userPasswordSetRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter userRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersUpdate(id: Int, userRequest: UserRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersUpdateWithRequestBuilder(id: id, userRequest: userRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /core/users/{id}/ - - User Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - parameter userRequest: (body) - - returns: RequestBuilder - */ - open class func coreUsersUpdateWithRequestBuilder(id: Int, userRequest: UserRequest) -> RequestBuilder { - var localVariablePath = "/core/users/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func coreUsersUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return coreUsersUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /core/users/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - returns: RequestBuilder<[UsedBy]> - */ - open class func coreUsersUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/core/users/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/CryptoAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/CryptoAPI.swift deleted file mode 100644 index 9a2bda4..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/CryptoAPI.swift +++ /dev/null @@ -1,523 +0,0 @@ -// -// CryptoAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class CryptoAPI { - - /** - - - parameter certificateKeyPairRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsCreate(certificateKeyPairRequest: CertificateKeyPairRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateKeyPair?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsCreateWithRequestBuilder(certificateKeyPairRequest: certificateKeyPairRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /crypto/certificatekeypairs/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter certificateKeyPairRequest: (body) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsCreateWithRequestBuilder(certificateKeyPairRequest: CertificateKeyPairRequest) -> RequestBuilder { - let localVariablePath = "/crypto/certificatekeypairs/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: certificateKeyPairRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsDestroy(kpUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsDestroyWithRequestBuilder(kpUuid: kpUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /crypto/certificatekeypairs/{kp_uuid}/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsDestroyWithRequestBuilder(kpUuid: UUID) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter certificateGenerationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsGenerateCreate(certificateGenerationRequest: CertificateGenerationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateKeyPair?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsGenerateCreateWithRequestBuilder(certificateGenerationRequest: certificateGenerationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /crypto/certificatekeypairs/generate/ - - Generate a new, self-signed certificate-key pair - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter certificateGenerationRequest: (body) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsGenerateCreateWithRequestBuilder(certificateGenerationRequest: CertificateGenerationRequest) -> RequestBuilder { - let localVariablePath = "/crypto/certificatekeypairs/generate/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: certificateGenerationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter hasKey: (query) Only return certificate-key pairs with keys (optional) - - parameter includeDetails: (query) (optional, default to true) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsList(hasKey: Bool? = nil, includeDetails: Bool? = nil, managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedCertificateKeyPairList?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsListWithRequestBuilder(hasKey: hasKey, includeDetails: includeDetails, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /crypto/certificatekeypairs/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter hasKey: (query) Only return certificate-key pairs with keys (optional) - - parameter includeDetails: (query) (optional, default to true) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsListWithRequestBuilder(hasKey: Bool? = nil, includeDetails: Bool? = nil, managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/crypto/certificatekeypairs/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "has_key": (wrappedValue: hasKey?.encodeToJSON(), isExplode: true), - "include_details": (wrappedValue: includeDetails?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter patchedCertificateKeyPairRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsPartialUpdate(kpUuid: UUID, patchedCertificateKeyPairRequest: PatchedCertificateKeyPairRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateKeyPair?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsPartialUpdateWithRequestBuilder(kpUuid: kpUuid, patchedCertificateKeyPairRequest: patchedCertificateKeyPairRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /crypto/certificatekeypairs/{kp_uuid}/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter patchedCertificateKeyPairRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsPartialUpdateWithRequestBuilder(kpUuid: UUID, patchedCertificateKeyPairRequest: PatchedCertificateKeyPairRequest? = nil) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedCertificateKeyPairRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsRetrieve(kpUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateKeyPair?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsRetrieveWithRequestBuilder(kpUuid: kpUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /crypto/certificatekeypairs/{kp_uuid}/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsRetrieveWithRequestBuilder(kpUuid: UUID) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter certificateKeyPairRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsUpdate(kpUuid: UUID, certificateKeyPairRequest: CertificateKeyPairRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateKeyPair?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsUpdateWithRequestBuilder(kpUuid: kpUuid, certificateKeyPairRequest: certificateKeyPairRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /crypto/certificatekeypairs/{kp_uuid}/ - - CertificateKeyPair Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter certificateKeyPairRequest: (body) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsUpdateWithRequestBuilder(kpUuid: UUID, certificateKeyPairRequest: CertificateKeyPairRequest) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: certificateKeyPairRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsUsedByList(kpUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsUsedByListWithRequestBuilder(kpUuid: kpUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /crypto/certificatekeypairs/{kp_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - returns: RequestBuilder<[UsedBy]> - */ - open class func cryptoCertificatekeypairsUsedByListWithRequestBuilder(kpUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/used_by/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter download: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsViewCertificateRetrieve(kpUuid: UUID, download: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateData?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsViewCertificateRetrieveWithRequestBuilder(kpUuid: kpUuid, download: download).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /crypto/certificatekeypairs/{kp_uuid}/view_certificate/ - - Return certificate-key pairs certificate and log access - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter download: (query) (optional) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsViewCertificateRetrieveWithRequestBuilder(kpUuid: UUID, download: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/view_certificate/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "download": (wrappedValue: download?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter download: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func cryptoCertificatekeypairsViewPrivateKeyRetrieve(kpUuid: UUID, download: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CertificateData?, _ error: Error?) -> Void)) -> RequestTask { - return cryptoCertificatekeypairsViewPrivateKeyRetrieveWithRequestBuilder(kpUuid: kpUuid, download: download).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /crypto/certificatekeypairs/{kp_uuid}/view_private_key/ - - Return certificate-key pairs private key and log access - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. - - parameter download: (query) (optional) - - returns: RequestBuilder - */ - open class func cryptoCertificatekeypairsViewPrivateKeyRetrieveWithRequestBuilder(kpUuid: UUID, download: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/crypto/certificatekeypairs/{kp_uuid}/view_private_key/" - let kpUuidPreEscape = "\(APIHelper.mapValueToPathItem(kpUuid))" - let kpUuidPostEscape = kpUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{kp_uuid}", with: kpUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "download": (wrappedValue: download?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/EnterpriseAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/EnterpriseAPI.swift deleted file mode 100644 index 909d4bc..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/EnterpriseAPI.swift +++ /dev/null @@ -1,492 +0,0 @@ -// -// EnterpriseAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class EnterpriseAPI { - - /** - - - parameter licenseRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseCreate(licenseRequest: LicenseRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: License?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseCreateWithRequestBuilder(licenseRequest: licenseRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /enterprise/license/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseRequest: (body) - - returns: RequestBuilder - */ - open class func enterpriseLicenseCreateWithRequestBuilder(licenseRequest: LicenseRequest) -> RequestBuilder { - let localVariablePath = "/enterprise/license/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: licenseRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseDestroy(licenseUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseDestroyWithRequestBuilder(licenseUuid: licenseUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /enterprise/license/{license_uuid}/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseUuid: (path) A UUID string identifying this License. - - returns: RequestBuilder - */ - open class func enterpriseLicenseDestroyWithRequestBuilder(licenseUuid: UUID) -> RequestBuilder { - var localVariablePath = "/enterprise/license/{license_uuid}/" - let licenseUuidPreEscape = "\(APIHelper.mapValueToPathItem(licenseUuid))" - let licenseUuidPostEscape = licenseUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{license_uuid}", with: licenseUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseForecastRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LicenseForecast?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseForecastRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/forecast/ - - Forecast how many users will be required in a year - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func enterpriseLicenseForecastRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/enterprise/license/forecast/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseGetInstallIdRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: InstallID?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseGetInstallIdRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/get_install_id/ - - Get install_id - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func enterpriseLicenseGetInstallIdRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/enterprise/license/get_install_id/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedLicenseList?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func enterpriseLicenseListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/enterprise/license/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter patchedLicenseRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicensePartialUpdate(licenseUuid: UUID, patchedLicenseRequest: PatchedLicenseRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: License?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicensePartialUpdateWithRequestBuilder(licenseUuid: licenseUuid, patchedLicenseRequest: patchedLicenseRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /enterprise/license/{license_uuid}/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter patchedLicenseRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func enterpriseLicensePartialUpdateWithRequestBuilder(licenseUuid: UUID, patchedLicenseRequest: PatchedLicenseRequest? = nil) -> RequestBuilder { - var localVariablePath = "/enterprise/license/{license_uuid}/" - let licenseUuidPreEscape = "\(APIHelper.mapValueToPathItem(licenseUuid))" - let licenseUuidPostEscape = licenseUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{license_uuid}", with: licenseUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedLicenseRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseRetrieve(licenseUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: License?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseRetrieveWithRequestBuilder(licenseUuid: licenseUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/{license_uuid}/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseUuid: (path) A UUID string identifying this License. - - returns: RequestBuilder - */ - open class func enterpriseLicenseRetrieveWithRequestBuilder(licenseUuid: UUID) -> RequestBuilder { - var localVariablePath = "/enterprise/license/{license_uuid}/" - let licenseUuidPreEscape = "\(APIHelper.mapValueToPathItem(licenseUuid))" - let licenseUuidPostEscape = licenseUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{license_uuid}", with: licenseUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseSummaryRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LicenseSummary?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseSummaryRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/summary/ - - Get the total license status - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func enterpriseLicenseSummaryRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/enterprise/license/summary/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter licenseRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseUpdate(licenseUuid: UUID, licenseRequest: LicenseRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: License?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseUpdateWithRequestBuilder(licenseUuid: licenseUuid, licenseRequest: licenseRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /enterprise/license/{license_uuid}/ - - License Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter licenseRequest: (body) - - returns: RequestBuilder - */ - open class func enterpriseLicenseUpdateWithRequestBuilder(licenseUuid: UUID, licenseRequest: LicenseRequest) -> RequestBuilder { - var localVariablePath = "/enterprise/license/{license_uuid}/" - let licenseUuidPreEscape = "\(APIHelper.mapValueToPathItem(licenseUuid))" - let licenseUuidPostEscape = licenseUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{license_uuid}", with: licenseUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: licenseRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter licenseUuid: (path) A UUID string identifying this License. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func enterpriseLicenseUsedByList(licenseUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return enterpriseLicenseUsedByListWithRequestBuilder(licenseUuid: licenseUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /enterprise/license/{license_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter licenseUuid: (path) A UUID string identifying this License. - - returns: RequestBuilder<[UsedBy]> - */ - open class func enterpriseLicenseUsedByListWithRequestBuilder(licenseUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/enterprise/license/{license_uuid}/used_by/" - let licenseUuidPreEscape = "\(APIHelper.mapValueToPathItem(licenseUuid))" - let licenseUuidPostEscape = licenseUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{license_uuid}", with: licenseUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/EventsAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/EventsAPI.swift deleted file mode 100644 index 808cde9..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/EventsAPI.swift +++ /dev/null @@ -1,1707 +0,0 @@ -// -// EventsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class EventsAPI { - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsActionsList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsActionsListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/actions/ - - Get all actions - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func eventsEventsActionsListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/events/events/actions/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsCreate(eventRequest: EventRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Event?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsCreateWithRequestBuilder(eventRequest: eventRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /events/events/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventRequest: (body) - - returns: RequestBuilder - */ - open class func eventsEventsCreateWithRequestBuilder(eventRequest: EventRequest) -> RequestBuilder { - let localVariablePath = "/events/events/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: eventRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsDestroy(eventUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsDestroyWithRequestBuilder(eventUuid: eventUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /events/events/{event_uuid}/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventUuid: (path) A UUID string identifying this Event. - - returns: RequestBuilder - */ - open class func eventsEventsDestroyWithRequestBuilder(eventUuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/events/{event_uuid}/" - let eventUuidPreEscape = "\(APIHelper.mapValueToPathItem(eventUuid))" - let eventUuidPostEscape = eventUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{event_uuid}", with: eventUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter action: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter contextAuthorizedApp: (query) Context Authorized application (optional) - - parameter contextModelApp: (query) Context Model App (optional) - - parameter contextModelName: (query) Context Model Name (optional) - - parameter contextModelPk: (query) Context Model Primary Key (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantName: (query) Tenant name (optional) - - parameter username: (query) Username (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedEventList?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsListWithRequestBuilder(action: action, clientIp: clientIp, contextAuthorizedApp: contextAuthorizedApp, contextModelApp: contextModelApp, contextModelName: contextModelName, contextModelPk: contextModelPk, ordering: ordering, page: page, pageSize: pageSize, search: search, tenantName: tenantName, username: username).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter action: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter contextAuthorizedApp: (query) Context Authorized application (optional) - - parameter contextModelApp: (query) Context Model App (optional) - - parameter contextModelName: (query) Context Model Name (optional) - - parameter contextModelPk: (query) Context Model Primary Key (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantName: (query) Tenant name (optional) - - parameter username: (query) Username (optional) - - returns: RequestBuilder - */ - open class func eventsEventsListWithRequestBuilder(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil) -> RequestBuilder { - let localVariablePath = "/events/events/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "action": (wrappedValue: action?.encodeToJSON(), isExplode: true), - "client_ip": (wrappedValue: clientIp?.encodeToJSON(), isExplode: true), - "context_authorized_app": (wrappedValue: contextAuthorizedApp?.encodeToJSON(), isExplode: true), - "context_model_app": (wrappedValue: contextModelApp?.encodeToJSON(), isExplode: true), - "context_model_name": (wrappedValue: contextModelName?.encodeToJSON(), isExplode: true), - "context_model_pk": (wrappedValue: contextModelPk?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "tenant_name": (wrappedValue: tenantName?.encodeToJSON(), isExplode: true), - "username": (wrappedValue: username?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter patchedEventRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsPartialUpdate(eventUuid: UUID, patchedEventRequest: PatchedEventRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Event?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsPartialUpdateWithRequestBuilder(eventUuid: eventUuid, patchedEventRequest: patchedEventRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /events/events/{event_uuid}/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter patchedEventRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func eventsEventsPartialUpdateWithRequestBuilder(eventUuid: UUID, patchedEventRequest: PatchedEventRequest? = nil) -> RequestBuilder { - var localVariablePath = "/events/events/{event_uuid}/" - let eventUuidPreEscape = "\(APIHelper.mapValueToPathItem(eventUuid))" - let eventUuidPostEscape = eventUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{event_uuid}", with: eventUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedEventRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter action: (query) (optional) - - parameter query: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsPerMonthList(action: String? = nil, query: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Coordinate]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsPerMonthListWithRequestBuilder(action: action, query: query).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/per_month/ - - Get the count of events per month - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter action: (query) (optional) - - parameter query: (query) (optional) - - returns: RequestBuilder<[Coordinate]> - */ - open class func eventsEventsPerMonthListWithRequestBuilder(action: String? = nil, query: String? = nil) -> RequestBuilder<[Coordinate]> { - let localVariablePath = "/events/events/per_month/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "action": (wrappedValue: action?.encodeToJSON(), isExplode: true), - "query": (wrappedValue: query?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Coordinate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsRetrieve(eventUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Event?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsRetrieveWithRequestBuilder(eventUuid: eventUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/{event_uuid}/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventUuid: (path) A UUID string identifying this Event. - - returns: RequestBuilder - */ - open class func eventsEventsRetrieveWithRequestBuilder(eventUuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/events/{event_uuid}/" - let eventUuidPreEscape = "\(APIHelper.mapValueToPathItem(eventUuid))" - let eventUuidPostEscape = eventUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{event_uuid}", with: eventUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter action: (query) (optional) - - parameter topN: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsTopPerUserList(action: String? = nil, topN: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [EventTopPerUser]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsTopPerUserListWithRequestBuilder(action: action, topN: topN).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/top_per_user/ - - Get the top_n events grouped by user count - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter action: (query) (optional) - - parameter topN: (query) (optional) - - returns: RequestBuilder<[EventTopPerUser]> - */ - open class func eventsEventsTopPerUserListWithRequestBuilder(action: String? = nil, topN: Int? = nil) -> RequestBuilder<[EventTopPerUser]> { - let localVariablePath = "/events/events/top_per_user/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "action": (wrappedValue: action?.encodeToJSON(), isExplode: true), - "top_n": (wrappedValue: topN?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[EventTopPerUser]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter eventRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsUpdate(eventUuid: UUID, eventRequest: EventRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Event?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsUpdateWithRequestBuilder(eventUuid: eventUuid, eventRequest: eventRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /events/events/{event_uuid}/ - - Event Read-Only Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventUuid: (path) A UUID string identifying this Event. - - parameter eventRequest: (body) - - returns: RequestBuilder - */ - open class func eventsEventsUpdateWithRequestBuilder(eventUuid: UUID, eventRequest: EventRequest) -> RequestBuilder { - var localVariablePath = "/events/events/{event_uuid}/" - let eventUuidPreEscape = "\(APIHelper.mapValueToPathItem(eventUuid))" - let eventUuidPostEscape = eventUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{event_uuid}", with: eventUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: eventRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter action: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter contextAuthorizedApp: (query) Context Authorized application (optional) - - parameter contextModelApp: (query) Context Model App (optional) - - parameter contextModelName: (query) Context Model Name (optional) - - parameter contextModelPk: (query) Context Model Primary Key (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantName: (query) Tenant name (optional) - - parameter username: (query) Username (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsEventsVolumeList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Coordinate]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsEventsVolumeListWithRequestBuilder(action: action, clientIp: clientIp, contextAuthorizedApp: contextAuthorizedApp, contextModelApp: contextModelApp, contextModelName: contextModelName, contextModelPk: contextModelPk, ordering: ordering, search: search, tenantName: tenantName, username: username).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/events/volume/ - - Get event volume for specified filters and timeframe - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter action: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter contextAuthorizedApp: (query) Context Authorized application (optional) - - parameter contextModelApp: (query) Context Model App (optional) - - parameter contextModelName: (query) Context Model Name (optional) - - parameter contextModelPk: (query) Context Model Primary Key (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter search: (query) A search term. (optional) - - parameter tenantName: (query) Tenant name (optional) - - parameter username: (query) Username (optional) - - returns: RequestBuilder<[Coordinate]> - */ - open class func eventsEventsVolumeListWithRequestBuilder(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil) -> RequestBuilder<[Coordinate]> { - let localVariablePath = "/events/events/volume/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "action": (wrappedValue: action?.encodeToJSON(), isExplode: true), - "client_ip": (wrappedValue: clientIp?.encodeToJSON(), isExplode: true), - "context_authorized_app": (wrappedValue: contextAuthorizedApp?.encodeToJSON(), isExplode: true), - "context_model_app": (wrappedValue: contextModelApp?.encodeToJSON(), isExplode: true), - "context_model_name": (wrappedValue: contextModelName?.encodeToJSON(), isExplode: true), - "context_model_pk": (wrappedValue: contextModelPk?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "tenant_name": (wrappedValue: tenantName?.encodeToJSON(), isExplode: true), - "username": (wrappedValue: username?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[Coordinate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /events/notifications/{uuid}/ - - Notification Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification. - - returns: RequestBuilder - */ - open class func eventsNotificationsDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/notifications/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter severity - */ - public enum Severity_eventsNotificationsList: String, CaseIterable { - case alert = "alert" - case notice = "notice" - case warning = "warning" - } - - /** - - - parameter body: (query) (optional) - - parameter created: (query) (optional) - - parameter event: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter seen: (query) (optional) - - parameter severity: (query) * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsList(body: String? = nil, created: Date? = nil, event: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, seen: Bool? = nil, severity: Severity_eventsNotificationsList? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedNotificationList?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsListWithRequestBuilder(body: body, created: created, event: event, ordering: ordering, page: page, pageSize: pageSize, search: search, seen: seen, severity: severity, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/notifications/ - - Notification Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter body: (query) (optional) - - parameter created: (query) (optional) - - parameter event: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter seen: (query) (optional) - - parameter severity: (query) * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func eventsNotificationsListWithRequestBuilder(body: String? = nil, created: Date? = nil, event: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, seen: Bool? = nil, severity: Severity_eventsNotificationsList? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/events/notifications/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "body": (wrappedValue: body?.encodeToJSON(), isExplode: true), - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "event": (wrappedValue: event?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "seen": (wrappedValue: seen?.encodeToJSON(), isExplode: true), - "severity": (wrappedValue: severity?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsMarkAllSeenCreate(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsMarkAllSeenCreateWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /events/notifications/mark_all_seen/ - - Mark all the user's notifications as seen - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func eventsNotificationsMarkAllSeenCreateWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/events/notifications/mark_all_seen/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter patchedNotificationRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsPartialUpdate(uuid: UUID, patchedNotificationRequest: PatchedNotificationRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Notification?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsPartialUpdateWithRequestBuilder(uuid: uuid, patchedNotificationRequest: patchedNotificationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /events/notifications/{uuid}/ - - Notification Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter patchedNotificationRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func eventsNotificationsPartialUpdateWithRequestBuilder(uuid: UUID, patchedNotificationRequest: PatchedNotificationRequest? = nil) -> RequestBuilder { - var localVariablePath = "/events/notifications/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedNotificationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Notification?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/notifications/{uuid}/ - - Notification Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification. - - returns: RequestBuilder - */ - open class func eventsNotificationsRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/notifications/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter notificationRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsUpdate(uuid: UUID, notificationRequest: NotificationRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Notification?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsUpdateWithRequestBuilder(uuid: uuid, notificationRequest: notificationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /events/notifications/{uuid}/ - - Notification Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter notificationRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func eventsNotificationsUpdateWithRequestBuilder(uuid: UUID, notificationRequest: NotificationRequest? = nil) -> RequestBuilder { - var localVariablePath = "/events/notifications/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsNotificationsUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsNotificationsUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/notifications/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification. - - returns: RequestBuilder<[UsedBy]> - */ - open class func eventsNotificationsUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/events/notifications/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter notificationRuleRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesCreate(notificationRuleRequest: NotificationRuleRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationRule?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesCreateWithRequestBuilder(notificationRuleRequest: notificationRuleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /events/rules/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter notificationRuleRequest: (body) - - returns: RequestBuilder - */ - open class func eventsRulesCreateWithRequestBuilder(notificationRuleRequest: NotificationRuleRequest) -> RequestBuilder { - let localVariablePath = "/events/rules/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationRuleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesDestroy(pbmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesDestroyWithRequestBuilder(pbmUuid: pbmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /events/rules/{pbm_uuid}/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - returns: RequestBuilder - */ - open class func eventsRulesDestroyWithRequestBuilder(pbmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/rules/{pbm_uuid}/" - let pbmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pbmUuid))" - let pbmUuidPostEscape = pbmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter severity - */ - public enum Severity_eventsRulesList: String, CaseIterable { - case alert = "alert" - case notice = "notice" - case warning = "warning" - } - - /** - - - parameter groupName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter severity: (query) Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesList(groupName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, severity: Severity_eventsRulesList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedNotificationRuleList?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesListWithRequestBuilder(groupName: groupName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, severity: severity).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/rules/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter severity: (query) Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) - - returns: RequestBuilder - */ - open class func eventsRulesListWithRequestBuilder(groupName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, severity: Severity_eventsRulesList? = nil) -> RequestBuilder { - let localVariablePath = "/events/rules/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "group__name": (wrappedValue: groupName?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "severity": (wrappedValue: severity?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter patchedNotificationRuleRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesPartialUpdate(pbmUuid: UUID, patchedNotificationRuleRequest: PatchedNotificationRuleRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationRule?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesPartialUpdateWithRequestBuilder(pbmUuid: pbmUuid, patchedNotificationRuleRequest: patchedNotificationRuleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /events/rules/{pbm_uuid}/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter patchedNotificationRuleRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func eventsRulesPartialUpdateWithRequestBuilder(pbmUuid: UUID, patchedNotificationRuleRequest: PatchedNotificationRuleRequest? = nil) -> RequestBuilder { - var localVariablePath = "/events/rules/{pbm_uuid}/" - let pbmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pbmUuid))" - let pbmUuidPostEscape = pbmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedNotificationRuleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesRetrieve(pbmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationRule?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesRetrieveWithRequestBuilder(pbmUuid: pbmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/rules/{pbm_uuid}/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - returns: RequestBuilder - */ - open class func eventsRulesRetrieveWithRequestBuilder(pbmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/rules/{pbm_uuid}/" - let pbmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pbmUuid))" - let pbmUuidPostEscape = pbmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter notificationRuleRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesUpdate(pbmUuid: UUID, notificationRuleRequest: NotificationRuleRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationRule?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesUpdateWithRequestBuilder(pbmUuid: pbmUuid, notificationRuleRequest: notificationRuleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /events/rules/{pbm_uuid}/ - - NotificationRule Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter notificationRuleRequest: (body) - - returns: RequestBuilder - */ - open class func eventsRulesUpdateWithRequestBuilder(pbmUuid: UUID, notificationRuleRequest: NotificationRuleRequest) -> RequestBuilder { - var localVariablePath = "/events/rules/{pbm_uuid}/" - let pbmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pbmUuid))" - let pbmUuidPostEscape = pbmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationRuleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsRulesUsedByList(pbmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsRulesUsedByListWithRequestBuilder(pbmUuid: pbmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/rules/{pbm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. - - returns: RequestBuilder<[UsedBy]> - */ - open class func eventsRulesUsedByListWithRequestBuilder(pbmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/events/rules/{pbm_uuid}/used_by/" - let pbmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pbmUuid))" - let pbmUuidPostEscape = pbmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter notificationTransportRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsCreate(notificationTransportRequest: NotificationTransportRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationTransport?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsCreateWithRequestBuilder(notificationTransportRequest: notificationTransportRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /events/transports/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter notificationTransportRequest: (body) - - returns: RequestBuilder - */ - open class func eventsTransportsCreateWithRequestBuilder(notificationTransportRequest: NotificationTransportRequest) -> RequestBuilder { - let localVariablePath = "/events/transports/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationTransportRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /events/transports/{uuid}/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - returns: RequestBuilder - */ - open class func eventsTransportsDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/transports/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter mode - */ - public enum Mode_eventsTransportsList: String, CaseIterable { - case email = "email" - case local = "local" - case webhook = "webhook" - case webhookSlack = "webhook_slack" - } - - /** - - - parameter mode: (query) * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sendOnce: (query) (optional) - - parameter webhookUrl: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsList(mode: Mode_eventsTransportsList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sendOnce: Bool? = nil, webhookUrl: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedNotificationTransportList?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsListWithRequestBuilder(mode: mode, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, sendOnce: sendOnce, webhookUrl: webhookUrl).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/transports/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter mode: (query) * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sendOnce: (query) (optional) - - parameter webhookUrl: (query) (optional) - - returns: RequestBuilder - */ - open class func eventsTransportsListWithRequestBuilder(mode: Mode_eventsTransportsList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sendOnce: Bool? = nil, webhookUrl: String? = nil) -> RequestBuilder { - let localVariablePath = "/events/transports/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "mode": (wrappedValue: mode?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "send_once": (wrappedValue: sendOnce?.encodeToJSON(), isExplode: true), - "webhook_url": (wrappedValue: webhookUrl?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter patchedNotificationTransportRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsPartialUpdate(uuid: UUID, patchedNotificationTransportRequest: PatchedNotificationTransportRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationTransport?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsPartialUpdateWithRequestBuilder(uuid: uuid, patchedNotificationTransportRequest: patchedNotificationTransportRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /events/transports/{uuid}/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter patchedNotificationTransportRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func eventsTransportsPartialUpdateWithRequestBuilder(uuid: UUID, patchedNotificationTransportRequest: PatchedNotificationTransportRequest? = nil) -> RequestBuilder { - var localVariablePath = "/events/transports/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedNotificationTransportRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationTransport?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/transports/{uuid}/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - returns: RequestBuilder - */ - open class func eventsTransportsRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/transports/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsTestCreate(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationTransportTest?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsTestCreateWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /events/transports/{uuid}/test/ - - Send example notification using selected transport. Requires Modify permissions. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - returns: RequestBuilder - */ - open class func eventsTransportsTestCreateWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/events/transports/{uuid}/test/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter notificationTransportRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsUpdate(uuid: UUID, notificationTransportRequest: NotificationTransportRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationTransport?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsUpdateWithRequestBuilder(uuid: uuid, notificationTransportRequest: notificationTransportRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /events/transports/{uuid}/ - - NotificationTransport Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter notificationTransportRequest: (body) - - returns: RequestBuilder - */ - open class func eventsTransportsUpdateWithRequestBuilder(uuid: UUID, notificationTransportRequest: NotificationTransportRequest) -> RequestBuilder { - var localVariablePath = "/events/transports/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationTransportRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func eventsTransportsUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return eventsTransportsUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /events/transports/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Notification Transport. - - returns: RequestBuilder<[UsedBy]> - */ - open class func eventsTransportsUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/events/transports/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/FlowsAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/FlowsAPI.swift deleted file mode 100644 index 3ec44b0..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/FlowsAPI.swift +++ /dev/null @@ -1,1337 +0,0 @@ -// -// FlowsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class FlowsAPI { - - /** - - - parameter flowStageBindingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsCreate(flowStageBindingRequest: FlowStageBindingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowStageBinding?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsCreateWithRequestBuilder(flowStageBindingRequest: flowStageBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/bindings/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter flowStageBindingRequest: (body) - - returns: RequestBuilder - */ - open class func flowsBindingsCreateWithRequestBuilder(flowStageBindingRequest: FlowStageBindingRequest) -> RequestBuilder { - let localVariablePath = "/flows/bindings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: flowStageBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsDestroy(fsbUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsDestroyWithRequestBuilder(fsbUuid: fsbUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /flows/bindings/{fsb_uuid}/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - returns: RequestBuilder - */ - open class func flowsBindingsDestroyWithRequestBuilder(fsbUuid: UUID) -> RequestBuilder { - var localVariablePath = "/flows/bindings/{fsb_uuid}/" - let fsbUuidPreEscape = "\(APIHelper.mapValueToPathItem(fsbUuid))" - let fsbUuidPostEscape = fsbUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter invalidResponseAction - */ - public enum InvalidResponseAction_flowsBindingsList: String, CaseIterable { - case restart = "restart" - case restartWithContext = "restart_with_context" - case retry = "retry" - } - - /** - * enum for parameter policyEngineMode - */ - public enum PolicyEngineMode_flowsBindingsList: String, CaseIterable { - case all = "all" - case any = "any" - } - - /** - - - parameter evaluateOnPlan: (query) (optional) - - parameter fsbUuid: (query) (optional) - - parameter invalidResponseAction: (query) Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context (optional) - - parameter order: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pbmUuid: (query) (optional) - - parameter policies: (query) (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter reEvaluatePolicies: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter stage: (query) (optional) - - parameter target: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsList(evaluateOnPlan: Bool? = nil, fsbUuid: UUID? = nil, invalidResponseAction: InvalidResponseAction_flowsBindingsList? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pbmUuid: UUID? = nil, policies: [UUID]? = nil, policyEngineMode: PolicyEngineMode_flowsBindingsList? = nil, reEvaluatePolicies: Bool? = nil, search: String? = nil, stage: UUID? = nil, target: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedFlowStageBindingList?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsListWithRequestBuilder(evaluateOnPlan: evaluateOnPlan, fsbUuid: fsbUuid, invalidResponseAction: invalidResponseAction, order: order, ordering: ordering, page: page, pageSize: pageSize, pbmUuid: pbmUuid, policies: policies, policyEngineMode: policyEngineMode, reEvaluatePolicies: reEvaluatePolicies, search: search, stage: stage, target: target).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/bindings/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter evaluateOnPlan: (query) (optional) - - parameter fsbUuid: (query) (optional) - - parameter invalidResponseAction: (query) Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context (optional) - - parameter order: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pbmUuid: (query) (optional) - - parameter policies: (query) (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter reEvaluatePolicies: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter stage: (query) (optional) - - parameter target: (query) (optional) - - returns: RequestBuilder - */ - open class func flowsBindingsListWithRequestBuilder(evaluateOnPlan: Bool? = nil, fsbUuid: UUID? = nil, invalidResponseAction: InvalidResponseAction_flowsBindingsList? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pbmUuid: UUID? = nil, policies: [UUID]? = nil, policyEngineMode: PolicyEngineMode_flowsBindingsList? = nil, reEvaluatePolicies: Bool? = nil, search: String? = nil, stage: UUID? = nil, target: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/flows/bindings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "evaluate_on_plan": (wrappedValue: evaluateOnPlan?.encodeToJSON(), isExplode: true), - "fsb_uuid": (wrappedValue: fsbUuid?.encodeToJSON(), isExplode: true), - "invalid_response_action": (wrappedValue: invalidResponseAction?.encodeToJSON(), isExplode: true), - "order": (wrappedValue: order?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "pbm_uuid": (wrappedValue: pbmUuid?.encodeToJSON(), isExplode: true), - "policies": (wrappedValue: policies?.encodeToJSON(), isExplode: true), - "policy_engine_mode": (wrappedValue: policyEngineMode?.encodeToJSON(), isExplode: true), - "re_evaluate_policies": (wrappedValue: reEvaluatePolicies?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage": (wrappedValue: stage?.encodeToJSON(), isExplode: true), - "target": (wrappedValue: target?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter patchedFlowStageBindingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsPartialUpdate(fsbUuid: UUID, patchedFlowStageBindingRequest: PatchedFlowStageBindingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowStageBinding?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsPartialUpdateWithRequestBuilder(fsbUuid: fsbUuid, patchedFlowStageBindingRequest: patchedFlowStageBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /flows/bindings/{fsb_uuid}/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter patchedFlowStageBindingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func flowsBindingsPartialUpdateWithRequestBuilder(fsbUuid: UUID, patchedFlowStageBindingRequest: PatchedFlowStageBindingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/flows/bindings/{fsb_uuid}/" - let fsbUuidPreEscape = "\(APIHelper.mapValueToPathItem(fsbUuid))" - let fsbUuidPostEscape = fsbUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedFlowStageBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsRetrieve(fsbUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowStageBinding?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsRetrieveWithRequestBuilder(fsbUuid: fsbUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/bindings/{fsb_uuid}/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - returns: RequestBuilder - */ - open class func flowsBindingsRetrieveWithRequestBuilder(fsbUuid: UUID) -> RequestBuilder { - var localVariablePath = "/flows/bindings/{fsb_uuid}/" - let fsbUuidPreEscape = "\(APIHelper.mapValueToPathItem(fsbUuid))" - let fsbUuidPostEscape = fsbUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter flowStageBindingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsUpdate(fsbUuid: UUID, flowStageBindingRequest: FlowStageBindingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowStageBinding?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsUpdateWithRequestBuilder(fsbUuid: fsbUuid, flowStageBindingRequest: flowStageBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /flows/bindings/{fsb_uuid}/ - - FlowStageBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter flowStageBindingRequest: (body) - - returns: RequestBuilder - */ - open class func flowsBindingsUpdateWithRequestBuilder(fsbUuid: UUID, flowStageBindingRequest: FlowStageBindingRequest) -> RequestBuilder { - var localVariablePath = "/flows/bindings/{fsb_uuid}/" - let fsbUuidPreEscape = "\(APIHelper.mapValueToPathItem(fsbUuid))" - let fsbUuidPostEscape = fsbUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: flowStageBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsBindingsUsedByList(fsbUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return flowsBindingsUsedByListWithRequestBuilder(fsbUuid: fsbUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/bindings/{fsb_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. - - returns: RequestBuilder<[UsedBy]> - */ - open class func flowsBindingsUsedByListWithRequestBuilder(fsbUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/flows/bindings/{fsb_uuid}/used_by/" - let fsbUuidPreEscape = "\(APIHelper.mapValueToPathItem(fsbUuid))" - let fsbUuidPostEscape = fsbUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter flowSlug: (path) - - parameter query: (query) Querystring as received - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsExecutorGet(flowSlug: String, query: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ChallengeTypes?, _ error: Error?) -> Void)) -> RequestTask { - return flowsExecutorGetWithRequestBuilder(flowSlug: flowSlug, query: query).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/executor/{flow_slug}/ - - Get the next pending challenge from the currently active flow. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter flowSlug: (path) - - parameter query: (query) Querystring as received - - returns: RequestBuilder - */ - open class func flowsExecutorGetWithRequestBuilder(flowSlug: String, query: String) -> RequestBuilder { - var localVariablePath = "/flows/executor/{flow_slug}/" - let flowSlugPreEscape = "\(APIHelper.mapValueToPathItem(flowSlug))" - let flowSlugPostEscape = flowSlugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{flow_slug}", with: flowSlugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": (wrappedValue: query.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter flowSlug: (path) - - parameter query: (query) Querystring as received - - parameter flowChallengeResponseRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsExecutorSolve(flowSlug: String, query: String, flowChallengeResponseRequest: FlowChallengeResponseRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ChallengeTypes?, _ error: Error?) -> Void)) -> RequestTask { - return flowsExecutorSolveWithRequestBuilder(flowSlug: flowSlug, query: query, flowChallengeResponseRequest: flowChallengeResponseRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/executor/{flow_slug}/ - - Solve the previously retrieved challenge and advanced to the next stage. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter flowSlug: (path) - - parameter query: (query) Querystring as received - - parameter flowChallengeResponseRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func flowsExecutorSolveWithRequestBuilder(flowSlug: String, query: String, flowChallengeResponseRequest: FlowChallengeResponseRequest? = nil) -> RequestBuilder { - var localVariablePath = "/flows/executor/{flow_slug}/" - let flowSlugPreEscape = "\(APIHelper.mapValueToPathItem(flowSlug))" - let flowSlugPostEscape = flowSlugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{flow_slug}", with: flowSlugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: flowChallengeResponseRequest) - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": (wrappedValue: query.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter flowSlug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInspectorGet(flowSlug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowInspection?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInspectorGetWithRequestBuilder(flowSlug: flowSlug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/inspector/{flow_slug}/ - - Get current flow state and record it - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter flowSlug: (path) - - returns: RequestBuilder - */ - open class func flowsInspectorGetWithRequestBuilder(flowSlug: String) -> RequestBuilder { - var localVariablePath = "/flows/inspector/{flow_slug}/" - let flowSlugPreEscape = "\(APIHelper.mapValueToPathItem(flowSlug))" - let flowSlugPostEscape = flowSlugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{flow_slug}", with: flowSlugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesCacheClearCreate(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesCacheClearCreateWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/instances/cache_clear/ - - Clear flow cache - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func flowsInstancesCacheClearCreateWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/flows/instances/cache_clear/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesCacheInfoRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Cache?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesCacheInfoRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/cache_info/ - - Info about cached flows - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func flowsInstancesCacheInfoRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/flows/instances/cache_info/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter flowRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesCreate(flowRequest: FlowRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Flow?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesCreateWithRequestBuilder(flowRequest: flowRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/instances/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter flowRequest: (body) - - returns: RequestBuilder - */ - open class func flowsInstancesCreateWithRequestBuilder(flowRequest: FlowRequest) -> RequestBuilder { - let localVariablePath = "/flows/instances/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: flowRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /flows/instances/{slug}/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func flowsInstancesDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesDiagramRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowDiagram?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesDiagramRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/{slug}/diagram/ - - Return diagram for flow with slug `slug`, in the format used by flowchart.js - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func flowsInstancesDiagramRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/diagram/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesExecuteRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Link?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesExecuteRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/{slug}/execute/ - - Execute flow for current user - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func flowsInstancesExecuteRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/execute/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesExportRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: URL?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesExportRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/{slug}/export/ - - Export flow to .yaml file - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func flowsInstancesExportRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/export/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesImportCreate(file: URL? = nil, clear: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: FlowImportResult?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesImportCreateWithRequestBuilder(file: file, clear: clear).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/instances/import/ - - Import flow from .yaml file - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - returns: RequestBuilder - */ - open class func flowsInstancesImportCreateWithRequestBuilder(file: URL? = nil, clear: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/flows/instances/import/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableFormParams: [String: Any?] = [ - "file": file?.encodeToJSON(), - "clear": clear?.encodeToJSON(), - ] - - let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) - let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - "Content-Type": "multipart/form-data", - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter deniedAction - */ - public enum DeniedAction_flowsInstancesList: String, CaseIterable { - case _continue = "continue" - case message = "message" - case messageContinue = "message_continue" - } - - /** - * enum for parameter designation - */ - public enum Designation_flowsInstancesList: String, CaseIterable { - case authentication = "authentication" - case authorization = "authorization" - case enrollment = "enrollment" - case invalidation = "invalidation" - case recovery = "recovery" - case stageConfiguration = "stage_configuration" - case unenrollment = "unenrollment" - } - - /** - - - parameter deniedAction: (query) Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue (optional) - - parameter designation: (query) Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration (optional) - - parameter flowUuid: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesList(deniedAction: DeniedAction_flowsInstancesList? = nil, designation: Designation_flowsInstancesList? = nil, flowUuid: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedFlowList?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesListWithRequestBuilder(deniedAction: deniedAction, designation: designation, flowUuid: flowUuid, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter deniedAction: (query) Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue (optional) - - parameter designation: (query) Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration (optional) - - parameter flowUuid: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - returns: RequestBuilder - */ - open class func flowsInstancesListWithRequestBuilder(deniedAction: DeniedAction_flowsInstancesList? = nil, designation: Designation_flowsInstancesList? = nil, flowUuid: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil) -> RequestBuilder { - let localVariablePath = "/flows/instances/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "denied_action": (wrappedValue: deniedAction?.encodeToJSON(), isExplode: true), - "designation": (wrappedValue: designation?.encodeToJSON(), isExplode: true), - "flow_uuid": (wrappedValue: flowUuid?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedFlowRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesPartialUpdate(slug: String, patchedFlowRequest: PatchedFlowRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Flow?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesPartialUpdateWithRequestBuilder(slug: slug, patchedFlowRequest: patchedFlowRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /flows/instances/{slug}/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedFlowRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func flowsInstancesPartialUpdateWithRequestBuilder(slug: String, patchedFlowRequest: PatchedFlowRequest? = nil) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedFlowRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Flow?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/{slug}/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func flowsInstancesRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesSetBackgroundCreate(slug: String, file: URL? = nil, clear: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesSetBackgroundCreateWithRequestBuilder(slug: slug, file: file, clear: clear).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/instances/{slug}/set_background/ - - Set Flow background - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - returns: RequestBuilder - */ - open class func flowsInstancesSetBackgroundCreateWithRequestBuilder(slug: String, file: URL? = nil, clear: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/set_background/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableFormParams: [String: Any?] = [ - "file": file?.encodeToJSON(), - "clear": clear?.encodeToJSON(), - ] - - let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) - let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - "Content-Type": "multipart/form-data", - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter filePathRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesSetBackgroundUrlCreate(slug: String, filePathRequest: FilePathRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesSetBackgroundUrlCreateWithRequestBuilder(slug: slug, filePathRequest: filePathRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /flows/instances/{slug}/set_background_url/ - - Set Flow background (as URL) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter filePathRequest: (body) - - returns: RequestBuilder - */ - open class func flowsInstancesSetBackgroundUrlCreateWithRequestBuilder(slug: String, filePathRequest: FilePathRequest) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/set_background_url/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: filePathRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter flowRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesUpdate(slug: String, flowRequest: FlowRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Flow?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesUpdateWithRequestBuilder(slug: slug, flowRequest: flowRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /flows/instances/{slug}/ - - Flow Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter flowRequest: (body) - - returns: RequestBuilder - */ - open class func flowsInstancesUpdateWithRequestBuilder(slug: String, flowRequest: FlowRequest) -> RequestBuilder { - var localVariablePath = "/flows/instances/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: flowRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func flowsInstancesUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return flowsInstancesUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /flows/instances/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func flowsInstancesUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/flows/instances/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/ManagedAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/ManagedAPI.swift deleted file mode 100644 index a5414a1..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/ManagedAPI.swift +++ /dev/null @@ -1,457 +0,0 @@ -// -// ManagedAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class ManagedAPI { - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsApplyCreate(instanceUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: BlueprintInstance?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsApplyCreateWithRequestBuilder(instanceUuid: instanceUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /managed/blueprints/{instance_uuid}/apply/ - - Apply a blueprint - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - returns: RequestBuilder - */ - open class func managedBlueprintsApplyCreateWithRequestBuilder(instanceUuid: UUID) -> RequestBuilder { - var localVariablePath = "/managed/blueprints/{instance_uuid}/apply/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsAvailableList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [BlueprintFile]?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsAvailableListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /managed/blueprints/available/ - - Get blueprints - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[BlueprintFile]> - */ - open class func managedBlueprintsAvailableListWithRequestBuilder() -> RequestBuilder<[BlueprintFile]> { - let localVariablePath = "/managed/blueprints/available/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[BlueprintFile]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter blueprintInstanceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsCreate(blueprintInstanceRequest: BlueprintInstanceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: BlueprintInstance?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsCreateWithRequestBuilder(blueprintInstanceRequest: blueprintInstanceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /managed/blueprints/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter blueprintInstanceRequest: (body) - - returns: RequestBuilder - */ - open class func managedBlueprintsCreateWithRequestBuilder(blueprintInstanceRequest: BlueprintInstanceRequest) -> RequestBuilder { - let localVariablePath = "/managed/blueprints/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: blueprintInstanceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsDestroy(instanceUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsDestroyWithRequestBuilder(instanceUuid: instanceUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /managed/blueprints/{instance_uuid}/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - returns: RequestBuilder - */ - open class func managedBlueprintsDestroyWithRequestBuilder(instanceUuid: UUID) -> RequestBuilder { - var localVariablePath = "/managed/blueprints/{instance_uuid}/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter path: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedBlueprintInstanceList?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, path: path, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /managed/blueprints/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter path: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func managedBlueprintsListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/managed/blueprints/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "path": (wrappedValue: path?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter patchedBlueprintInstanceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsPartialUpdate(instanceUuid: UUID, patchedBlueprintInstanceRequest: PatchedBlueprintInstanceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: BlueprintInstance?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsPartialUpdateWithRequestBuilder(instanceUuid: instanceUuid, patchedBlueprintInstanceRequest: patchedBlueprintInstanceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /managed/blueprints/{instance_uuid}/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter patchedBlueprintInstanceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func managedBlueprintsPartialUpdateWithRequestBuilder(instanceUuid: UUID, patchedBlueprintInstanceRequest: PatchedBlueprintInstanceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/managed/blueprints/{instance_uuid}/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedBlueprintInstanceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsRetrieve(instanceUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: BlueprintInstance?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsRetrieveWithRequestBuilder(instanceUuid: instanceUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /managed/blueprints/{instance_uuid}/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - returns: RequestBuilder - */ - open class func managedBlueprintsRetrieveWithRequestBuilder(instanceUuid: UUID) -> RequestBuilder { - var localVariablePath = "/managed/blueprints/{instance_uuid}/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter blueprintInstanceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsUpdate(instanceUuid: UUID, blueprintInstanceRequest: BlueprintInstanceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: BlueprintInstance?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsUpdateWithRequestBuilder(instanceUuid: instanceUuid, blueprintInstanceRequest: blueprintInstanceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /managed/blueprints/{instance_uuid}/ - - Blueprint instances - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter blueprintInstanceRequest: (body) - - returns: RequestBuilder - */ - open class func managedBlueprintsUpdateWithRequestBuilder(instanceUuid: UUID, blueprintInstanceRequest: BlueprintInstanceRequest) -> RequestBuilder { - var localVariablePath = "/managed/blueprints/{instance_uuid}/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: blueprintInstanceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func managedBlueprintsUsedByList(instanceUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return managedBlueprintsUsedByListWithRequestBuilder(instanceUuid: instanceUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /managed/blueprints/{instance_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. - - returns: RequestBuilder<[UsedBy]> - */ - open class func managedBlueprintsUsedByListWithRequestBuilder(instanceUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/managed/blueprints/{instance_uuid}/used_by/" - let instanceUuidPreEscape = "\(APIHelper.mapValueToPathItem(instanceUuid))" - let instanceUuidPostEscape = instanceUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{instance_uuid}", with: instanceUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/Oauth2API.swift b/authentikClient/Classes/OpenAPIs/APIs/Oauth2API.swift deleted file mode 100644 index b275483..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/Oauth2API.swift +++ /dev/null @@ -1,635 +0,0 @@ -// -// Oauth2API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class Oauth2API { - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AccessTokensDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AccessTokensDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /oauth2/access_tokens/{id}/ - - AccessToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - returns: RequestBuilder - */ - open class func oauth2AccessTokensDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/access_tokens/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AccessTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTokenModelList?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AccessTokensListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/access_tokens/ - - AccessToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func oauth2AccessTokensListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/oauth2/access_tokens/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "provider": (wrappedValue: provider?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AccessTokensRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TokenModel?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AccessTokensRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/access_tokens/{id}/ - - AccessToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - returns: RequestBuilder - */ - open class func oauth2AccessTokensRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/access_tokens/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AccessTokensUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AccessTokensUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/access_tokens/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. - - returns: RequestBuilder<[UsedBy]> - */ - open class func oauth2AccessTokensUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/oauth2/access_tokens/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Authorization Code. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AuthorizationCodesDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AuthorizationCodesDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /oauth2/authorization_codes/{id}/ - - AuthorizationCode Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Authorization Code. - - returns: RequestBuilder - */ - open class func oauth2AuthorizationCodesDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/authorization_codes/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AuthorizationCodesList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedExpiringBaseGrantModelList?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AuthorizationCodesListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/authorization_codes/ - - AuthorizationCode Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func oauth2AuthorizationCodesListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/oauth2/authorization_codes/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "provider": (wrappedValue: provider?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Authorization Code. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AuthorizationCodesRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ExpiringBaseGrantModel?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AuthorizationCodesRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/authorization_codes/{id}/ - - AuthorizationCode Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Authorization Code. - - returns: RequestBuilder - */ - open class func oauth2AuthorizationCodesRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/authorization_codes/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Authorization Code. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2AuthorizationCodesUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2AuthorizationCodesUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/authorization_codes/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Authorization Code. - - returns: RequestBuilder<[UsedBy]> - */ - open class func oauth2AuthorizationCodesUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/oauth2/authorization_codes/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2RefreshTokensDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2RefreshTokensDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /oauth2/refresh_tokens/{id}/ - - RefreshToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - returns: RequestBuilder - */ - open class func oauth2RefreshTokensDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/refresh_tokens/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2RefreshTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedTokenModelList?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2RefreshTokensListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/refresh_tokens/ - - RefreshToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func oauth2RefreshTokensListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/oauth2/refresh_tokens/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "provider": (wrappedValue: provider?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2RefreshTokensRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: TokenModel?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2RefreshTokensRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/refresh_tokens/{id}/ - - RefreshToken Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - returns: RequestBuilder - */ - open class func oauth2RefreshTokensRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/oauth2/refresh_tokens/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func oauth2RefreshTokensUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return oauth2RefreshTokensUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /oauth2/refresh_tokens/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. - - returns: RequestBuilder<[UsedBy]> - */ - open class func oauth2RefreshTokensUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/oauth2/refresh_tokens/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/OutpostsAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/OutpostsAPI.swift deleted file mode 100644 index 84fab70..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/OutpostsAPI.swift +++ /dev/null @@ -1,1839 +0,0 @@ -// -// OutpostsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class OutpostsAPI { - - /** - - - parameter outpostRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesCreate(outpostRequest: OutpostRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Outpost?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesCreateWithRequestBuilder(outpostRequest: outpostRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /outposts/instances/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter outpostRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsInstancesCreateWithRequestBuilder(outpostRequest: OutpostRequest) -> RequestBuilder { - let localVariablePath = "/outposts/instances/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: outpostRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesDefaultSettingsRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OutpostDefaultConfig?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesDefaultSettingsRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/instances/default_settings/ - - Global default outpost config - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func outpostsInstancesDefaultSettingsRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/outposts/instances/default_settings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /outposts/instances/{uuid}/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - returns: RequestBuilder - */ - open class func outpostsInstancesDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/instances/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter managedIcontains: (query) (optional) - - parameter managedIexact: (query) (optional) - - parameter nameIcontains: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter providersIsnull: (query) (optional) - - parameter providersByPk: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serviceConnectionNameIcontains: (query) (optional) - - parameter serviceConnectionNameIexact: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesHealthList(uuid: UUID, managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [OutpostHealth]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesHealthListWithRequestBuilder(uuid: uuid, managedIcontains: managedIcontains, managedIexact: managedIexact, nameIcontains: nameIcontains, nameIexact: nameIexact, ordering: ordering, providersIsnull: providersIsnull, providersByPk: providersByPk, search: search, serviceConnectionNameIcontains: serviceConnectionNameIcontains, serviceConnectionNameIexact: serviceConnectionNameIexact).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/instances/{uuid}/health/ - - Get outposts current health - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter managedIcontains: (query) (optional) - - parameter managedIexact: (query) (optional) - - parameter nameIcontains: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter providersIsnull: (query) (optional) - - parameter providersByPk: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serviceConnectionNameIcontains: (query) (optional) - - parameter serviceConnectionNameIexact: (query) (optional) - - returns: RequestBuilder<[OutpostHealth]> - */ - open class func outpostsInstancesHealthListWithRequestBuilder(uuid: UUID, managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil) -> RequestBuilder<[OutpostHealth]> { - var localVariablePath = "/outposts/instances/{uuid}/health/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "managed__icontains": (wrappedValue: managedIcontains?.encodeToJSON(), isExplode: true), - "managed__iexact": (wrappedValue: managedIexact?.encodeToJSON(), isExplode: true), - "name__icontains": (wrappedValue: nameIcontains?.encodeToJSON(), isExplode: true), - "name__iexact": (wrappedValue: nameIexact?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "providers__isnull": (wrappedValue: providersIsnull?.encodeToJSON(), isExplode: true), - "providers_by_pk": (wrappedValue: providersByPk?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "service_connection__name__icontains": (wrappedValue: serviceConnectionNameIcontains?.encodeToJSON(), isExplode: true), - "service_connection__name__iexact": (wrappedValue: serviceConnectionNameIexact?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[OutpostHealth]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter managedIcontains: (query) (optional) - - parameter managedIexact: (query) (optional) - - parameter nameIcontains: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter providersIsnull: (query) (optional) - - parameter providersByPk: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serviceConnectionNameIcontains: (query) (optional) - - parameter serviceConnectionNameIexact: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesList(managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedOutpostList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesListWithRequestBuilder(managedIcontains: managedIcontains, managedIexact: managedIexact, nameIcontains: nameIcontains, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, providersIsnull: providersIsnull, providersByPk: providersByPk, search: search, serviceConnectionNameIcontains: serviceConnectionNameIcontains, serviceConnectionNameIexact: serviceConnectionNameIexact).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/instances/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter managedIcontains: (query) (optional) - - parameter managedIexact: (query) (optional) - - parameter nameIcontains: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter providersIsnull: (query) (optional) - - parameter providersByPk: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serviceConnectionNameIcontains: (query) (optional) - - parameter serviceConnectionNameIexact: (query) (optional) - - returns: RequestBuilder - */ - open class func outpostsInstancesListWithRequestBuilder(managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/instances/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "managed__icontains": (wrappedValue: managedIcontains?.encodeToJSON(), isExplode: true), - "managed__iexact": (wrappedValue: managedIexact?.encodeToJSON(), isExplode: true), - "name__icontains": (wrappedValue: nameIcontains?.encodeToJSON(), isExplode: true), - "name__iexact": (wrappedValue: nameIexact?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "providers__isnull": (wrappedValue: providersIsnull?.encodeToJSON(), isExplode: true), - "providers_by_pk": (wrappedValue: providersByPk?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "service_connection__name__icontains": (wrappedValue: serviceConnectionNameIcontains?.encodeToJSON(), isExplode: true), - "service_connection__name__iexact": (wrappedValue: serviceConnectionNameIexact?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter patchedOutpostRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesPartialUpdate(uuid: UUID, patchedOutpostRequest: PatchedOutpostRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Outpost?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesPartialUpdateWithRequestBuilder(uuid: uuid, patchedOutpostRequest: patchedOutpostRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /outposts/instances/{uuid}/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter patchedOutpostRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func outpostsInstancesPartialUpdateWithRequestBuilder(uuid: UUID, patchedOutpostRequest: PatchedOutpostRequest? = nil) -> RequestBuilder { - var localVariablePath = "/outposts/instances/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedOutpostRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Outpost?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/instances/{uuid}/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - returns: RequestBuilder - */ - open class func outpostsInstancesRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/instances/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter outpostRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesUpdate(uuid: UUID, outpostRequest: OutpostRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Outpost?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesUpdateWithRequestBuilder(uuid: uuid, outpostRequest: outpostRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /outposts/instances/{uuid}/ - - Outpost Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter outpostRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsInstancesUpdateWithRequestBuilder(uuid: UUID, outpostRequest: OutpostRequest) -> RequestBuilder { - var localVariablePath = "/outposts/instances/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: outpostRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsInstancesUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsInstancesUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/instances/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost. - - returns: RequestBuilder<[UsedBy]> - */ - open class func outpostsInstancesUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/outposts/instances/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsLdapList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedLDAPOutpostConfigList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsLdapListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/ldap/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func outpostsLdapListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsLdapRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPOutpostConfig?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsLdapRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/ldap/{id}/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - returns: RequestBuilder - */ - open class func outpostsLdapRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/outposts/ldap/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsProxyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedProxyOutpostConfigList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsProxyListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/proxy/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func outpostsProxyListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/proxy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsProxyRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ProxyOutpostConfig?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsProxyRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/proxy/{id}/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - returns: RequestBuilder - */ - open class func outpostsProxyRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/outposts/proxy/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsRadiusList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedRadiusOutpostConfigList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsRadiusListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/radius/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func outpostsRadiusListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/radius/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsRadiusRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RadiusOutpostConfig?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsRadiusRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/radius/{id}/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - returns: RequestBuilder - */ - open class func outpostsRadiusRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/outposts/radius/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /outposts/service_connections/all/{uuid}/ - - ServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsAllDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/all/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedServiceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/all/ - - ServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsAllListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/service_connections/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/all/{uuid}/ - - ServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsAllRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/all/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllStateRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ServiceConnectionState?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllStateRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/all/{uuid}/state/ - - Get the service connection's state - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsAllStateRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/all/{uuid}/state/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/all/types/ - - Get all creatable service connection types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func outpostsServiceConnectionsAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/outposts/service_connections/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsAllUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsAllUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/all/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func outpostsServiceConnectionsAllUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/outposts/service_connections/all/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter dockerServiceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerCreate(dockerServiceConnectionRequest: DockerServiceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DockerServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerCreateWithRequestBuilder(dockerServiceConnectionRequest: dockerServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /outposts/service_connections/docker/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter dockerServiceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerCreateWithRequestBuilder(dockerServiceConnectionRequest: DockerServiceConnectionRequest) -> RequestBuilder { - let localVariablePath = "/outposts/service_connections/docker/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dockerServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /outposts/service_connections/docker/{uuid}/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/docker/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter local: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tlsAuthentication: (query) (optional) - - parameter tlsVerification: (query) (optional) - - parameter url: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tlsAuthentication: UUID? = nil, tlsVerification: UUID? = nil, url: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDockerServiceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerListWithRequestBuilder(local: local, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, tlsAuthentication: tlsAuthentication, tlsVerification: tlsVerification, url: url).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/docker/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter local: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter tlsAuthentication: (query) (optional) - - parameter tlsVerification: (query) (optional) - - parameter url: (query) (optional) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerListWithRequestBuilder(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tlsAuthentication: UUID? = nil, tlsVerification: UUID? = nil, url: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/service_connections/docker/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "local": (wrappedValue: local?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "tls_authentication": (wrappedValue: tlsAuthentication?.encodeToJSON(), isExplode: true), - "tls_verification": (wrappedValue: tlsVerification?.encodeToJSON(), isExplode: true), - "url": (wrappedValue: url?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter patchedDockerServiceConnectionRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerPartialUpdate(uuid: UUID, patchedDockerServiceConnectionRequest: PatchedDockerServiceConnectionRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DockerServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerPartialUpdateWithRequestBuilder(uuid: uuid, patchedDockerServiceConnectionRequest: patchedDockerServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /outposts/service_connections/docker/{uuid}/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter patchedDockerServiceConnectionRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerPartialUpdateWithRequestBuilder(uuid: UUID, patchedDockerServiceConnectionRequest: PatchedDockerServiceConnectionRequest? = nil) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/docker/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDockerServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DockerServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/docker/{uuid}/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/docker/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter dockerServiceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerUpdate(uuid: UUID, dockerServiceConnectionRequest: DockerServiceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DockerServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerUpdateWithRequestBuilder(uuid: uuid, dockerServiceConnectionRequest: dockerServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /outposts/service_connections/docker/{uuid}/ - - DockerServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter dockerServiceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsDockerUpdateWithRequestBuilder(uuid: UUID, dockerServiceConnectionRequest: DockerServiceConnectionRequest) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/docker/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dockerServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsDockerUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsDockerUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/docker/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func outpostsServiceConnectionsDockerUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/outposts/service_connections/docker/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter kubernetesServiceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesCreate(kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: KubernetesServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesCreateWithRequestBuilder(kubernetesServiceConnectionRequest: kubernetesServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /outposts/service_connections/kubernetes/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter kubernetesServiceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesCreateWithRequestBuilder(kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest) -> RequestBuilder { - let localVariablePath = "/outposts/service_connections/kubernetes/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: kubernetesServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /outposts/service_connections/kubernetes/{uuid}/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/kubernetes/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter local: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedKubernetesServiceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesListWithRequestBuilder(local: local, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/kubernetes/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter local: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesListWithRequestBuilder(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/outposts/service_connections/kubernetes/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "local": (wrappedValue: local?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter patchedKubernetesServiceConnectionRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesPartialUpdate(uuid: UUID, patchedKubernetesServiceConnectionRequest: PatchedKubernetesServiceConnectionRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: KubernetesServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesPartialUpdateWithRequestBuilder(uuid: uuid, patchedKubernetesServiceConnectionRequest: patchedKubernetesServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /outposts/service_connections/kubernetes/{uuid}/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter patchedKubernetesServiceConnectionRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesPartialUpdateWithRequestBuilder(uuid: UUID, patchedKubernetesServiceConnectionRequest: PatchedKubernetesServiceConnectionRequest? = nil) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/kubernetes/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedKubernetesServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: KubernetesServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/kubernetes/{uuid}/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/kubernetes/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter kubernetesServiceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesUpdate(uuid: UUID, kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: KubernetesServiceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesUpdateWithRequestBuilder(uuid: uuid, kubernetesServiceConnectionRequest: kubernetesServiceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /outposts/service_connections/kubernetes/{uuid}/ - - KubernetesServiceConnection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter kubernetesServiceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func outpostsServiceConnectionsKubernetesUpdateWithRequestBuilder(uuid: UUID, kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest) -> RequestBuilder { - var localVariablePath = "/outposts/service_connections/kubernetes/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: kubernetesServiceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func outpostsServiceConnectionsKubernetesUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return outpostsServiceConnectionsKubernetesUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /outposts/service_connections/kubernetes/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func outpostsServiceConnectionsKubernetesUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/outposts/service_connections/kubernetes/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/PoliciesAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/PoliciesAPI.swift deleted file mode 100644 index 9842d3f..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/PoliciesAPI.swift +++ /dev/null @@ -1,3254 +0,0 @@ -// -// PoliciesAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class PoliciesAPI { - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllCacheClearCreate(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllCacheClearCreateWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/all/cache_clear/ - - Clear policy cache - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func policiesAllCacheClearCreateWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/policies/all/cache_clear/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllCacheInfoRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Cache?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllCacheInfoRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/all/cache_info/ - - Info about cached policies - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func policiesAllCacheInfoRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/policies/all/cache_info/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/all/{policy_uuid}/ - - Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Policy. - - returns: RequestBuilder - */ - open class func policiesAllDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/all/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter bindingsIsnull: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter promptstageIsnull: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllList(bindingsIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, promptstageIsnull: Bool? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllListWithRequestBuilder(bindingsIsnull: bindingsIsnull, ordering: ordering, page: page, pageSize: pageSize, promptstageIsnull: promptstageIsnull, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/all/ - - Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter bindingsIsnull: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter promptstageIsnull: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func policiesAllListWithRequestBuilder(bindingsIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, promptstageIsnull: Bool? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/policies/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "bindings__isnull": (wrappedValue: bindingsIsnull?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "promptstage__isnull": (wrappedValue: promptstageIsnull?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Policy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/all/{policy_uuid}/ - - Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Policy. - - returns: RequestBuilder - */ - open class func policiesAllRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/all/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Policy. - - parameter policyTestRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllTestCreate(policyUuid: UUID, policyTestRequest: PolicyTestRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyTestResult?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllTestCreateWithRequestBuilder(policyUuid: policyUuid, policyTestRequest: policyTestRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/all/{policy_uuid}/test/ - - Test policy - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Policy. - - parameter policyTestRequest: (body) - - returns: RequestBuilder - */ - open class func policiesAllTestCreateWithRequestBuilder(policyUuid: UUID, policyTestRequest: PolicyTestRequest) -> RequestBuilder { - var localVariablePath = "/policies/all/{policy_uuid}/test/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: policyTestRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/all/types/ - - Get all creatable policy types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func policiesAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/policies/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesAllUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesAllUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/all/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesAllUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/all/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsCreate(policyBindingRequest: PolicyBindingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyBinding?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsCreateWithRequestBuilder(policyBindingRequest: policyBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/bindings/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingRequest: (body) - - returns: RequestBuilder - */ - open class func policiesBindingsCreateWithRequestBuilder(policyBindingRequest: PolicyBindingRequest) -> RequestBuilder { - let localVariablePath = "/policies/bindings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: policyBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsDestroy(policyBindingUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsDestroyWithRequestBuilder(policyBindingUuid: policyBindingUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/bindings/{policy_binding_uuid}/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - returns: RequestBuilder - */ - open class func policiesBindingsDestroyWithRequestBuilder(policyBindingUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/bindings/{policy_binding_uuid}/" - let policyBindingUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyBindingUuid))" - let policyBindingUuidPostEscape = policyBindingUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter enabled: (query) (optional) - - parameter order: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policy: (query) (optional) - - parameter policyIsnull: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter target: (query) (optional) - - parameter targetIn: (query) (optional) - - parameter timeout: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsList(enabled: Bool? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policy: UUID? = nil, policyIsnull: Bool? = nil, search: String? = nil, target: UUID? = nil, targetIn: [UUID]? = nil, timeout: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPolicyBindingList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsListWithRequestBuilder(enabled: enabled, order: order, ordering: ordering, page: page, pageSize: pageSize, policy: policy, policyIsnull: policyIsnull, search: search, target: target, targetIn: targetIn, timeout: timeout).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/bindings/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter enabled: (query) (optional) - - parameter order: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policy: (query) (optional) - - parameter policyIsnull: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter target: (query) (optional) - - parameter targetIn: (query) (optional) - - parameter timeout: (query) (optional) - - returns: RequestBuilder - */ - open class func policiesBindingsListWithRequestBuilder(enabled: Bool? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policy: UUID? = nil, policyIsnull: Bool? = nil, search: String? = nil, target: UUID? = nil, targetIn: [UUID]? = nil, timeout: Int? = nil) -> RequestBuilder { - let localVariablePath = "/policies/bindings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "enabled": (wrappedValue: enabled?.encodeToJSON(), isExplode: true), - "order": (wrappedValue: order?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy": (wrappedValue: policy?.encodeToJSON(), isExplode: true), - "policy__isnull": (wrappedValue: policyIsnull?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "target": (wrappedValue: target?.encodeToJSON(), isExplode: true), - "target_in": (wrappedValue: targetIn?.encodeToJSON(), isExplode: true), - "timeout": (wrappedValue: timeout?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter patchedPolicyBindingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsPartialUpdate(policyBindingUuid: UUID, patchedPolicyBindingRequest: PatchedPolicyBindingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyBinding?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsPartialUpdateWithRequestBuilder(policyBindingUuid: policyBindingUuid, patchedPolicyBindingRequest: patchedPolicyBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/bindings/{policy_binding_uuid}/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter patchedPolicyBindingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesBindingsPartialUpdateWithRequestBuilder(policyBindingUuid: UUID, patchedPolicyBindingRequest: PatchedPolicyBindingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/bindings/{policy_binding_uuid}/" - let policyBindingUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyBindingUuid))" - let policyBindingUuidPostEscape = policyBindingUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPolicyBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsRetrieve(policyBindingUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyBinding?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsRetrieveWithRequestBuilder(policyBindingUuid: policyBindingUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/bindings/{policy_binding_uuid}/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - returns: RequestBuilder - */ - open class func policiesBindingsRetrieveWithRequestBuilder(policyBindingUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/bindings/{policy_binding_uuid}/" - let policyBindingUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyBindingUuid))" - let policyBindingUuidPostEscape = policyBindingUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter policyBindingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsUpdate(policyBindingUuid: UUID, policyBindingRequest: PolicyBindingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PolicyBinding?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsUpdateWithRequestBuilder(policyBindingUuid: policyBindingUuid, policyBindingRequest: policyBindingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/bindings/{policy_binding_uuid}/ - - PolicyBinding Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter policyBindingRequest: (body) - - returns: RequestBuilder - */ - open class func policiesBindingsUpdateWithRequestBuilder(policyBindingUuid: UUID, policyBindingRequest: PolicyBindingRequest) -> RequestBuilder { - var localVariablePath = "/policies/bindings/{policy_binding_uuid}/" - let policyBindingUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyBindingUuid))" - let policyBindingUuidPostEscape = policyBindingUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: policyBindingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesBindingsUsedByList(policyBindingUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesBindingsUsedByListWithRequestBuilder(policyBindingUuid: policyBindingUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/bindings/{policy_binding_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesBindingsUsedByListWithRequestBuilder(policyBindingUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/bindings/{policy_binding_uuid}/used_by/" - let policyBindingUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyBindingUuid))" - let policyBindingUuidPostEscape = policyBindingUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter dummyPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyCreate(dummyPolicyRequest: DummyPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyCreateWithRequestBuilder(dummyPolicyRequest: dummyPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/dummy/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter dummyPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesDummyCreateWithRequestBuilder(dummyPolicyRequest: DummyPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/dummy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dummyPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/dummy/{policy_uuid}/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - returns: RequestBuilder - */ - open class func policiesDummyDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/dummy/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter result: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter waitMax: (query) (optional) - - parameter waitMin: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyList(created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, result: Bool? = nil, search: String? = nil, waitMax: Int? = nil, waitMin: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDummyPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyListWithRequestBuilder(created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, result: result, search: search, waitMax: waitMax, waitMin: waitMin).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/dummy/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter result: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter waitMax: (query) (optional) - - parameter waitMin: (query) (optional) - - returns: RequestBuilder - */ - open class func policiesDummyListWithRequestBuilder(created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, result: Bool? = nil, search: String? = nil, waitMax: Int? = nil, waitMin: Int? = nil) -> RequestBuilder { - let localVariablePath = "/policies/dummy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "result": (wrappedValue: result?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "wait_max": (wrappedValue: waitMax?.encodeToJSON(), isExplode: true), - "wait_min": (wrappedValue: waitMin?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter patchedDummyPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyPartialUpdate(policyUuid: UUID, patchedDummyPolicyRequest: PatchedDummyPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedDummyPolicyRequest: patchedDummyPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/dummy/{policy_uuid}/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter patchedDummyPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesDummyPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedDummyPolicyRequest: PatchedDummyPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/dummy/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDummyPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/dummy/{policy_uuid}/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - returns: RequestBuilder - */ - open class func policiesDummyRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/dummy/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter dummyPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyUpdate(policyUuid: UUID, dummyPolicyRequest: DummyPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyUpdateWithRequestBuilder(policyUuid: policyUuid, dummyPolicyRequest: dummyPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/dummy/{policy_uuid}/ - - Dummy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter dummyPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesDummyUpdateWithRequestBuilder(policyUuid: UUID, dummyPolicyRequest: DummyPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/dummy/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dummyPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesDummyUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesDummyUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/dummy/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesDummyUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/dummy/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter eventMatcherPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherCreate(eventMatcherPolicyRequest: EventMatcherPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EventMatcherPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherCreateWithRequestBuilder(eventMatcherPolicyRequest: eventMatcherPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/event_matcher/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter eventMatcherPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesEventMatcherCreateWithRequestBuilder(eventMatcherPolicyRequest: EventMatcherPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/event_matcher/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: eventMatcherPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/event_matcher/{policy_uuid}/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - returns: RequestBuilder - */ - open class func policiesEventMatcherDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/event_matcher/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter action - */ - public enum Action_policiesEventMatcherList: String, CaseIterable { - case authorizeApplication = "authorize_application" - case configurationError = "configuration_error" - case custom = "custom_" - case emailSent = "email_sent" - case flowExecution = "flow_execution" - case impersonationEnded = "impersonation_ended" - case impersonationStarted = "impersonation_started" - case invitationUsed = "invitation_used" - case login = "login" - case loginFailed = "login_failed" - case logout = "logout" - case modelCreated = "model_created" - case modelDeleted = "model_deleted" - case modelUpdated = "model_updated" - case passwordSet = "password_set" - case policyException = "policy_exception" - case policyExecution = "policy_execution" - case propertyMappingException = "property_mapping_exception" - case secretRotate = "secret_rotate" - case secretView = "secret_view" - case sourceLinked = "source_linked" - case suspiciousRequest = "suspicious_request" - case systemException = "system_exception" - case systemTaskException = "system_task_exception" - case systemTaskExecution = "system_task_execution" - case updateAvailable = "update_available" - case userWrite = "user_write" - } - - /** - - - parameter action: (query) Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix (optional) - - parameter app: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter model: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherList(action: Action_policiesEventMatcherList? = nil, app: String? = nil, clientIp: String? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, model: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedEventMatcherPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherListWithRequestBuilder(action: action, app: app, clientIp: clientIp, created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, model: model, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/event_matcher/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter action: (query) Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix (optional) - - parameter app: (query) (optional) - - parameter clientIp: (query) (optional) - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter model: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func policiesEventMatcherListWithRequestBuilder(action: Action_policiesEventMatcherList? = nil, app: String? = nil, clientIp: String? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, model: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/policies/event_matcher/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "action": (wrappedValue: action?.encodeToJSON(), isExplode: true), - "app": (wrappedValue: app?.encodeToJSON(), isExplode: true), - "client_ip": (wrappedValue: clientIp?.encodeToJSON(), isExplode: true), - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "model": (wrappedValue: model?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter patchedEventMatcherPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherPartialUpdate(policyUuid: UUID, patchedEventMatcherPolicyRequest: PatchedEventMatcherPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EventMatcherPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedEventMatcherPolicyRequest: patchedEventMatcherPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/event_matcher/{policy_uuid}/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter patchedEventMatcherPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesEventMatcherPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedEventMatcherPolicyRequest: PatchedEventMatcherPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/event_matcher/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedEventMatcherPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EventMatcherPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/event_matcher/{policy_uuid}/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - returns: RequestBuilder - */ - open class func policiesEventMatcherRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/event_matcher/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter eventMatcherPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherUpdate(policyUuid: UUID, eventMatcherPolicyRequest: EventMatcherPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EventMatcherPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherUpdateWithRequestBuilder(policyUuid: policyUuid, eventMatcherPolicyRequest: eventMatcherPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/event_matcher/{policy_uuid}/ - - Event Matcher Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter eventMatcherPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesEventMatcherUpdateWithRequestBuilder(policyUuid: UUID, eventMatcherPolicyRequest: EventMatcherPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/event_matcher/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: eventMatcherPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesEventMatcherUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesEventMatcherUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/event_matcher/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesEventMatcherUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/event_matcher/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter expressionPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionCreate(expressionPolicyRequest: ExpressionPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ExpressionPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionCreateWithRequestBuilder(expressionPolicyRequest: expressionPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/expression/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter expressionPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesExpressionCreateWithRequestBuilder(expressionPolicyRequest: ExpressionPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/expression/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: expressionPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/expression/{policy_uuid}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - returns: RequestBuilder - */ - open class func policiesExpressionDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/expression/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter expression: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionList(created: Date? = nil, executionLogging: Bool? = nil, expression: String? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedExpressionPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionListWithRequestBuilder(created: created, executionLogging: executionLogging, expression: expression, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/expression/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter expression: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func policiesExpressionListWithRequestBuilder(created: Date? = nil, executionLogging: Bool? = nil, expression: String? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/policies/expression/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "expression": (wrappedValue: expression?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter patchedExpressionPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionPartialUpdate(policyUuid: UUID, patchedExpressionPolicyRequest: PatchedExpressionPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ExpressionPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedExpressionPolicyRequest: patchedExpressionPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/expression/{policy_uuid}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter patchedExpressionPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesExpressionPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedExpressionPolicyRequest: PatchedExpressionPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/expression/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedExpressionPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ExpressionPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/expression/{policy_uuid}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - returns: RequestBuilder - */ - open class func policiesExpressionRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/expression/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter expressionPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionUpdate(policyUuid: UUID, expressionPolicyRequest: ExpressionPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ExpressionPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionUpdateWithRequestBuilder(policyUuid: policyUuid, expressionPolicyRequest: expressionPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/expression/{policy_uuid}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter expressionPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesExpressionUpdateWithRequestBuilder(policyUuid: UUID, expressionPolicyRequest: ExpressionPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/expression/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: expressionPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesExpressionUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesExpressionUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/expression/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Expression Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesExpressionUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/expression/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter passwordPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordCreate(passwordPolicyRequest: PasswordPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordCreateWithRequestBuilder(passwordPolicyRequest: passwordPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/password/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter passwordPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesPasswordCreateWithRequestBuilder(passwordPolicyRequest: PasswordPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/password/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/password/{policy_uuid}/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - returns: RequestBuilder - */ - open class func policiesPasswordDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/password/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter passwordExpiryPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryCreate(passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryCreateWithRequestBuilder(passwordExpiryPolicyRequest: passwordExpiryPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/password_expiry/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter passwordExpiryPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryCreateWithRequestBuilder(passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/password_expiry/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordExpiryPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/password_expiry/{policy_uuid}/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/password_expiry/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter created: (query) (optional) - - parameter days: (query) (optional) - - parameter denyOnly: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryList(created: Date? = nil, days: Int? = nil, denyOnly: Bool? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPasswordExpiryPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryListWithRequestBuilder(created: created, days: days, denyOnly: denyOnly, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password_expiry/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter created: (query) (optional) - - parameter days: (query) (optional) - - parameter denyOnly: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryListWithRequestBuilder(created: Date? = nil, days: Int? = nil, denyOnly: Bool? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/policies/password_expiry/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "days": (wrappedValue: days?.encodeToJSON(), isExplode: true), - "deny_only": (wrappedValue: denyOnly?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter patchedPasswordExpiryPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryPartialUpdate(policyUuid: UUID, patchedPasswordExpiryPolicyRequest: PatchedPasswordExpiryPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedPasswordExpiryPolicyRequest: patchedPasswordExpiryPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/password_expiry/{policy_uuid}/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter patchedPasswordExpiryPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedPasswordExpiryPolicyRequest: PatchedPasswordExpiryPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/password_expiry/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPasswordExpiryPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password_expiry/{policy_uuid}/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/password_expiry/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter passwordExpiryPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryUpdate(policyUuid: UUID, passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryUpdateWithRequestBuilder(policyUuid: policyUuid, passwordExpiryPolicyRequest: passwordExpiryPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/password_expiry/{policy_uuid}/ - - Password Expiry Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter passwordExpiryPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesPasswordExpiryUpdateWithRequestBuilder(policyUuid: UUID, passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/password_expiry/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordExpiryPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordExpiryUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordExpiryUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password_expiry/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesPasswordExpiryUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/password_expiry/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter amountDigits: (query) (optional) - - parameter amountLowercase: (query) (optional) - - parameter amountSymbols: (query) (optional) - - parameter amountUppercase: (query) (optional) - - parameter checkHaveIBeenPwned: (query) (optional) - - parameter checkStaticRules: (query) (optional) - - parameter checkZxcvbn: (query) (optional) - - parameter created: (query) (optional) - - parameter errorMessage: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter hibpAllowedCount: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter lengthMin: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter passwordField: (query) (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter symbolCharset: (query) (optional) - - parameter zxcvbnScoreThreshold: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordList(amountDigits: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, amountUppercase: Int? = nil, checkHaveIBeenPwned: Bool? = nil, checkStaticRules: Bool? = nil, checkZxcvbn: Bool? = nil, created: Date? = nil, errorMessage: String? = nil, executionLogging: Bool? = nil, hibpAllowedCount: Int? = nil, lastUpdated: Date? = nil, lengthMin: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordField: String? = nil, policyUuid: UUID? = nil, search: String? = nil, symbolCharset: String? = nil, zxcvbnScoreThreshold: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPasswordPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordListWithRequestBuilder(amountDigits: amountDigits, amountLowercase: amountLowercase, amountSymbols: amountSymbols, amountUppercase: amountUppercase, checkHaveIBeenPwned: checkHaveIBeenPwned, checkStaticRules: checkStaticRules, checkZxcvbn: checkZxcvbn, created: created, errorMessage: errorMessage, executionLogging: executionLogging, hibpAllowedCount: hibpAllowedCount, lastUpdated: lastUpdated, lengthMin: lengthMin, name: name, ordering: ordering, page: page, pageSize: pageSize, passwordField: passwordField, policyUuid: policyUuid, search: search, symbolCharset: symbolCharset, zxcvbnScoreThreshold: zxcvbnScoreThreshold).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter amountDigits: (query) (optional) - - parameter amountLowercase: (query) (optional) - - parameter amountSymbols: (query) (optional) - - parameter amountUppercase: (query) (optional) - - parameter checkHaveIBeenPwned: (query) (optional) - - parameter checkStaticRules: (query) (optional) - - parameter checkZxcvbn: (query) (optional) - - parameter created: (query) (optional) - - parameter errorMessage: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter hibpAllowedCount: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter lengthMin: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter passwordField: (query) (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter symbolCharset: (query) (optional) - - parameter zxcvbnScoreThreshold: (query) (optional) - - returns: RequestBuilder - */ - open class func policiesPasswordListWithRequestBuilder(amountDigits: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, amountUppercase: Int? = nil, checkHaveIBeenPwned: Bool? = nil, checkStaticRules: Bool? = nil, checkZxcvbn: Bool? = nil, created: Date? = nil, errorMessage: String? = nil, executionLogging: Bool? = nil, hibpAllowedCount: Int? = nil, lastUpdated: Date? = nil, lengthMin: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordField: String? = nil, policyUuid: UUID? = nil, search: String? = nil, symbolCharset: String? = nil, zxcvbnScoreThreshold: Int? = nil) -> RequestBuilder { - let localVariablePath = "/policies/password/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "amount_digits": (wrappedValue: amountDigits?.encodeToJSON(), isExplode: true), - "amount_lowercase": (wrappedValue: amountLowercase?.encodeToJSON(), isExplode: true), - "amount_symbols": (wrappedValue: amountSymbols?.encodeToJSON(), isExplode: true), - "amount_uppercase": (wrappedValue: amountUppercase?.encodeToJSON(), isExplode: true), - "check_have_i_been_pwned": (wrappedValue: checkHaveIBeenPwned?.encodeToJSON(), isExplode: true), - "check_static_rules": (wrappedValue: checkStaticRules?.encodeToJSON(), isExplode: true), - "check_zxcvbn": (wrappedValue: checkZxcvbn?.encodeToJSON(), isExplode: true), - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "error_message": (wrappedValue: errorMessage?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "hibp_allowed_count": (wrappedValue: hibpAllowedCount?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "length_min": (wrappedValue: lengthMin?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "password_field": (wrappedValue: passwordField?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "symbol_charset": (wrappedValue: symbolCharset?.encodeToJSON(), isExplode: true), - "zxcvbn_score_threshold": (wrappedValue: zxcvbnScoreThreshold?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter patchedPasswordPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordPartialUpdate(policyUuid: UUID, patchedPasswordPolicyRequest: PatchedPasswordPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedPasswordPolicyRequest: patchedPasswordPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/password/{policy_uuid}/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter patchedPasswordPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesPasswordPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedPasswordPolicyRequest: PatchedPasswordPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/password/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPasswordPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password/{policy_uuid}/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - returns: RequestBuilder - */ - open class func policiesPasswordRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/password/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter passwordPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordUpdate(policyUuid: UUID, passwordPolicyRequest: PasswordPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordUpdateWithRequestBuilder(policyUuid: policyUuid, passwordPolicyRequest: passwordPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/password/{policy_uuid}/ - - Password Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter passwordPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesPasswordUpdateWithRequestBuilder(policyUuid: UUID, passwordPolicyRequest: PasswordPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/password/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesPasswordUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesPasswordUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/password/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Password Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesPasswordUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/password/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter reputationPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationCreate(reputationPolicyRequest: ReputationPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ReputationPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationCreateWithRequestBuilder(reputationPolicyRequest: reputationPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /policies/reputation/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter reputationPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesReputationCreateWithRequestBuilder(reputationPolicyRequest: ReputationPolicyRequest) -> RequestBuilder { - let localVariablePath = "/policies/reputation/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: reputationPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationDestroy(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationDestroyWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/reputation/{policy_uuid}/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - returns: RequestBuilder - */ - open class func policiesReputationDestroyWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/reputation/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter checkIp: (query) (optional) - - parameter checkUsername: (query) (optional) - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter threshold: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationList(checkIp: Bool? = nil, checkUsername: Bool? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, threshold: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedReputationPolicyList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationListWithRequestBuilder(checkIp: checkIp, checkUsername: checkUsername, created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search, threshold: threshold).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter checkIp: (query) (optional) - - parameter checkUsername: (query) (optional) - - parameter created: (query) (optional) - - parameter executionLogging: (query) (optional) - - parameter lastUpdated: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter threshold: (query) (optional) - - returns: RequestBuilder - */ - open class func policiesReputationListWithRequestBuilder(checkIp: Bool? = nil, checkUsername: Bool? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, threshold: Int? = nil) -> RequestBuilder { - let localVariablePath = "/policies/reputation/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "check_ip": (wrappedValue: checkIp?.encodeToJSON(), isExplode: true), - "check_username": (wrappedValue: checkUsername?.encodeToJSON(), isExplode: true), - "created": (wrappedValue: created?.encodeToJSON(), isExplode: true), - "execution_logging": (wrappedValue: executionLogging?.encodeToJSON(), isExplode: true), - "last_updated": (wrappedValue: lastUpdated?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_uuid": (wrappedValue: policyUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "threshold": (wrappedValue: threshold?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter patchedReputationPolicyRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationPartialUpdate(policyUuid: UUID, patchedReputationPolicyRequest: PatchedReputationPolicyRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ReputationPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationPartialUpdateWithRequestBuilder(policyUuid: policyUuid, patchedReputationPolicyRequest: patchedReputationPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /policies/reputation/{policy_uuid}/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter patchedReputationPolicyRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func policiesReputationPartialUpdateWithRequestBuilder(policyUuid: UUID, patchedReputationPolicyRequest: PatchedReputationPolicyRequest? = nil) -> RequestBuilder { - var localVariablePath = "/policies/reputation/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedReputationPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationRetrieve(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ReputationPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationRetrieveWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/{policy_uuid}/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - returns: RequestBuilder - */ - open class func policiesReputationRetrieveWithRequestBuilder(policyUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/reputation/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationScoresDestroy(reputationUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationScoresDestroyWithRequestBuilder(reputationUuid: reputationUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /policies/reputation/scores/{reputation_uuid}/ - - Reputation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - returns: RequestBuilder - */ - open class func policiesReputationScoresDestroyWithRequestBuilder(reputationUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/reputation/scores/{reputation_uuid}/" - let reputationUuidPreEscape = "\(APIHelper.mapValueToPathItem(reputationUuid))" - let reputationUuidPostEscape = reputationUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identifier: (query) (optional) - - parameter ip: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter score: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationScoresList(identifier: String? = nil, ip: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, score: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedReputationList?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationScoresListWithRequestBuilder(identifier: identifier, ip: ip, ordering: ordering, page: page, pageSize: pageSize, score: score, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/scores/ - - Reputation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identifier: (query) (optional) - - parameter ip: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter score: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func policiesReputationScoresListWithRequestBuilder(identifier: String? = nil, ip: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, score: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/policies/reputation/scores/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "identifier": (wrappedValue: identifier?.encodeToJSON(), isExplode: true), - "ip": (wrappedValue: ip?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "score": (wrappedValue: score?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationScoresRetrieve(reputationUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Reputation?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationScoresRetrieveWithRequestBuilder(reputationUuid: reputationUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/scores/{reputation_uuid}/ - - Reputation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - returns: RequestBuilder - */ - open class func policiesReputationScoresRetrieveWithRequestBuilder(reputationUuid: UUID) -> RequestBuilder { - var localVariablePath = "/policies/reputation/scores/{reputation_uuid}/" - let reputationUuidPreEscape = "\(APIHelper.mapValueToPathItem(reputationUuid))" - let reputationUuidPostEscape = reputationUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationScoresUsedByList(reputationUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationScoresUsedByListWithRequestBuilder(reputationUuid: reputationUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/scores/{reputation_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesReputationScoresUsedByListWithRequestBuilder(reputationUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/reputation/scores/{reputation_uuid}/used_by/" - let reputationUuidPreEscape = "\(APIHelper.mapValueToPathItem(reputationUuid))" - let reputationUuidPostEscape = reputationUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter reputationPolicyRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationUpdate(policyUuid: UUID, reputationPolicyRequest: ReputationPolicyRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ReputationPolicy?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationUpdateWithRequestBuilder(policyUuid: policyUuid, reputationPolicyRequest: reputationPolicyRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /policies/reputation/{policy_uuid}/ - - Reputation Policy Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter reputationPolicyRequest: (body) - - returns: RequestBuilder - */ - open class func policiesReputationUpdateWithRequestBuilder(policyUuid: UUID, reputationPolicyRequest: ReputationPolicyRequest) -> RequestBuilder { - var localVariablePath = "/policies/reputation/{policy_uuid}/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: reputationPolicyRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func policiesReputationUsedByList(policyUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return policiesReputationUsedByListWithRequestBuilder(policyUuid: policyUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /policies/reputation/{policy_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. - - returns: RequestBuilder<[UsedBy]> - */ - open class func policiesReputationUsedByListWithRequestBuilder(policyUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/policies/reputation/{policy_uuid}/used_by/" - let policyUuidPreEscape = "\(APIHelper.mapValueToPathItem(policyUuid))" - let policyUuidPostEscape = policyUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{policy_uuid}", with: policyUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/PropertymappingsAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/PropertymappingsAPI.swift deleted file mode 100644 index 416a7ef..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/PropertymappingsAPI.swift +++ /dev/null @@ -1,2103 +0,0 @@ -// -// PropertymappingsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class PropertymappingsAPI { - - /** - - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/all/{pm_uuid}/ - - PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsAllDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/all/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter managedIsnull: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllList(managedIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPropertyMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllListWithRequestBuilder(managedIsnull: managedIsnull, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/all/ - - PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter managedIsnull: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsAllListWithRequestBuilder(managedIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "managed__isnull": (wrappedValue: managedIsnull?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/all/{pm_uuid}/ - - PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsAllRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/all/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - parameter policyTestRequest: (body) - - parameter formatResult: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllTestCreate(pmUuid: UUID, policyTestRequest: PolicyTestRequest, formatResult: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PropertyMappingTestResult?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllTestCreateWithRequestBuilder(pmUuid: pmUuid, policyTestRequest: policyTestRequest, formatResult: formatResult).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/all/{pm_uuid}/test/ - - Test Property Mapping - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - parameter policyTestRequest: (body) - - parameter formatResult: (query) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsAllTestCreateWithRequestBuilder(pmUuid: UUID, policyTestRequest: PolicyTestRequest, formatResult: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/all/{pm_uuid}/test/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: policyTestRequest) - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "format_result": (wrappedValue: formatResult?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/all/types/ - - Get all creatable property-mapping types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func propertymappingsAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/propertymappings/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsAllUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsAllUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/all/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Property Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsAllUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/all/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter lDAPPropertyMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapCreate(lDAPPropertyMappingRequest: LDAPPropertyMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapCreateWithRequestBuilder(lDAPPropertyMappingRequest: lDAPPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/ldap/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter lDAPPropertyMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsLdapCreateWithRequestBuilder(lDAPPropertyMappingRequest: LDAPPropertyMappingRequest) -> RequestBuilder { - let localVariablePath = "/propertymappings/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/ldap/{pm_uuid}/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsLdapDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/ldap/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter expression: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter objectField: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, objectField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedLDAPPropertyMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapListWithRequestBuilder(expression: expression, managed: managed, name: name, objectField: objectField, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/ldap/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter expression: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter objectField: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsLdapListWithRequestBuilder(expression: String? = nil, managed: [String]? = nil, name: String? = nil, objectField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "expression": (wrappedValue: expression?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "object_field": (wrappedValue: objectField?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "pm_uuid": (wrappedValue: pmUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter patchedLDAPPropertyMappingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapPartialUpdate(pmUuid: UUID, patchedLDAPPropertyMappingRequest: PatchedLDAPPropertyMappingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapPartialUpdateWithRequestBuilder(pmUuid: pmUuid, patchedLDAPPropertyMappingRequest: patchedLDAPPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /propertymappings/ldap/{pm_uuid}/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter patchedLDAPPropertyMappingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsLdapPartialUpdateWithRequestBuilder(pmUuid: UUID, patchedLDAPPropertyMappingRequest: PatchedLDAPPropertyMappingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/ldap/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedLDAPPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/ldap/{pm_uuid}/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsLdapRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/ldap/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter lDAPPropertyMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapUpdate(pmUuid: UUID, lDAPPropertyMappingRequest: LDAPPropertyMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapUpdateWithRequestBuilder(pmUuid: pmUuid, lDAPPropertyMappingRequest: lDAPPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /propertymappings/ldap/{pm_uuid}/ - - LDAP PropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter lDAPPropertyMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsLdapUpdateWithRequestBuilder(pmUuid: UUID, lDAPPropertyMappingRequest: LDAPPropertyMappingRequest) -> RequestBuilder { - var localVariablePath = "/propertymappings/ldap/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsLdapUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsLdapUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/ldap/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsLdapUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/ldap/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter notificationWebhookMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationCreate(notificationWebhookMappingRequest: NotificationWebhookMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationWebhookMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationCreateWithRequestBuilder(notificationWebhookMappingRequest: notificationWebhookMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/notification/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter notificationWebhookMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsNotificationCreateWithRequestBuilder(notificationWebhookMappingRequest: NotificationWebhookMappingRequest) -> RequestBuilder { - let localVariablePath = "/propertymappings/notification/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationWebhookMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/notification/{pm_uuid}/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsNotificationDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/notification/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedNotificationWebhookMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/notification/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsNotificationListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/notification/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter patchedNotificationWebhookMappingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationPartialUpdate(pmUuid: UUID, patchedNotificationWebhookMappingRequest: PatchedNotificationWebhookMappingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationWebhookMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationPartialUpdateWithRequestBuilder(pmUuid: pmUuid, patchedNotificationWebhookMappingRequest: patchedNotificationWebhookMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /propertymappings/notification/{pm_uuid}/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter patchedNotificationWebhookMappingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsNotificationPartialUpdateWithRequestBuilder(pmUuid: UUID, patchedNotificationWebhookMappingRequest: PatchedNotificationWebhookMappingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/notification/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedNotificationWebhookMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationWebhookMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/notification/{pm_uuid}/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsNotificationRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/notification/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter notificationWebhookMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationUpdate(pmUuid: UUID, notificationWebhookMappingRequest: NotificationWebhookMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: NotificationWebhookMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationUpdateWithRequestBuilder(pmUuid: pmUuid, notificationWebhookMappingRequest: notificationWebhookMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /propertymappings/notification/{pm_uuid}/ - - NotificationWebhookMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter notificationWebhookMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsNotificationUpdateWithRequestBuilder(pmUuid: UUID, notificationWebhookMappingRequest: NotificationWebhookMappingRequest) -> RequestBuilder { - var localVariablePath = "/propertymappings/notification/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: notificationWebhookMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsNotificationUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsNotificationUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/notification/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsNotificationUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/notification/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sAMLPropertyMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlCreate(sAMLPropertyMappingRequest: SAMLPropertyMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlCreateWithRequestBuilder(sAMLPropertyMappingRequest: sAMLPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/saml/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sAMLPropertyMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsSamlCreateWithRequestBuilder(sAMLPropertyMappingRequest: SAMLPropertyMappingRequest) -> RequestBuilder { - let localVariablePath = "/propertymappings/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/saml/{pm_uuid}/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsSamlDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/saml/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter expression: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter samlName: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlList(expression: String? = nil, friendlyName: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, samlName: String? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSAMLPropertyMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlListWithRequestBuilder(expression: expression, friendlyName: friendlyName, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, samlName: samlName, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/saml/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter expression: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter samlName: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsSamlListWithRequestBuilder(expression: String? = nil, friendlyName: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, samlName: String? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "expression": (wrappedValue: expression?.encodeToJSON(), isExplode: true), - "friendly_name": (wrappedValue: friendlyName?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "pm_uuid": (wrappedValue: pmUuid?.encodeToJSON(), isExplode: true), - "saml_name": (wrappedValue: samlName?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter patchedSAMLPropertyMappingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlPartialUpdate(pmUuid: UUID, patchedSAMLPropertyMappingRequest: PatchedSAMLPropertyMappingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlPartialUpdateWithRequestBuilder(pmUuid: pmUuid, patchedSAMLPropertyMappingRequest: patchedSAMLPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /propertymappings/saml/{pm_uuid}/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter patchedSAMLPropertyMappingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsSamlPartialUpdateWithRequestBuilder(pmUuid: UUID, patchedSAMLPropertyMappingRequest: PatchedSAMLPropertyMappingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/saml/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSAMLPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/saml/{pm_uuid}/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsSamlRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/saml/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter sAMLPropertyMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlUpdate(pmUuid: UUID, sAMLPropertyMappingRequest: SAMLPropertyMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLPropertyMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlUpdateWithRequestBuilder(pmUuid: pmUuid, sAMLPropertyMappingRequest: sAMLPropertyMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /propertymappings/saml/{pm_uuid}/ - - SAMLPropertyMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter sAMLPropertyMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsSamlUpdateWithRequestBuilder(pmUuid: UUID, sAMLPropertyMappingRequest: SAMLPropertyMappingRequest) -> RequestBuilder { - var localVariablePath = "/propertymappings/saml/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLPropertyMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsSamlUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsSamlUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/saml/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsSamlUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/saml/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sCIMMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimCreate(sCIMMappingRequest: SCIMMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimCreateWithRequestBuilder(sCIMMappingRequest: sCIMMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/scim/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sCIMMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsScimCreateWithRequestBuilder(sCIMMappingRequest: SCIMMappingRequest) -> RequestBuilder { - let localVariablePath = "/propertymappings/scim/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sCIMMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/scim/{pm_uuid}/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsScimDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/scim/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter expression: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSCIMMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimListWithRequestBuilder(expression: expression, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scim/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter expression: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter pmUuid: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsScimListWithRequestBuilder(expression: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/scim/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "expression": (wrappedValue: expression?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "pm_uuid": (wrappedValue: pmUuid?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter patchedSCIMMappingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimPartialUpdate(pmUuid: UUID, patchedSCIMMappingRequest: PatchedSCIMMappingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimPartialUpdateWithRequestBuilder(pmUuid: pmUuid, patchedSCIMMappingRequest: patchedSCIMMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /propertymappings/scim/{pm_uuid}/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter patchedSCIMMappingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsScimPartialUpdateWithRequestBuilder(pmUuid: UUID, patchedSCIMMappingRequest: PatchedSCIMMappingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/scim/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSCIMMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scim/{pm_uuid}/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsScimRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/scim/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter sCIMMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimUpdate(pmUuid: UUID, sCIMMappingRequest: SCIMMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimUpdateWithRequestBuilder(pmUuid: pmUuid, sCIMMappingRequest: sCIMMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /propertymappings/scim/{pm_uuid}/ - - SCIMMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter sCIMMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsScimUpdateWithRequestBuilder(pmUuid: UUID, sCIMMappingRequest: SCIMMappingRequest) -> RequestBuilder { - var localVariablePath = "/propertymappings/scim/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sCIMMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScimUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScimUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scim/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsScimUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/scim/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter scopeMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeCreate(scopeMappingRequest: ScopeMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ScopeMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeCreateWithRequestBuilder(scopeMappingRequest: scopeMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /propertymappings/scope/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter scopeMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsScopeCreateWithRequestBuilder(scopeMappingRequest: ScopeMappingRequest) -> RequestBuilder { - let localVariablePath = "/propertymappings/scope/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: scopeMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeDestroy(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeDestroyWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /propertymappings/scope/{pm_uuid}/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsScopeDestroyWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/scope/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter scopeName: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeList(managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, scopeName: String? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedScopeMappingList?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeListWithRequestBuilder(managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, scopeName: scopeName, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scope/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter scopeName: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func propertymappingsScopeListWithRequestBuilder(managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, scopeName: String? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/propertymappings/scope/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "scope_name": (wrappedValue: scopeName?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter patchedScopeMappingRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopePartialUpdate(pmUuid: UUID, patchedScopeMappingRequest: PatchedScopeMappingRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ScopeMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopePartialUpdateWithRequestBuilder(pmUuid: pmUuid, patchedScopeMappingRequest: patchedScopeMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /propertymappings/scope/{pm_uuid}/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter patchedScopeMappingRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func propertymappingsScopePartialUpdateWithRequestBuilder(pmUuid: UUID, patchedScopeMappingRequest: PatchedScopeMappingRequest? = nil) -> RequestBuilder { - var localVariablePath = "/propertymappings/scope/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedScopeMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeRetrieve(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ScopeMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeRetrieveWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scope/{pm_uuid}/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - returns: RequestBuilder - */ - open class func propertymappingsScopeRetrieveWithRequestBuilder(pmUuid: UUID) -> RequestBuilder { - var localVariablePath = "/propertymappings/scope/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter scopeMappingRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeUpdate(pmUuid: UUID, scopeMappingRequest: ScopeMappingRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ScopeMapping?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeUpdateWithRequestBuilder(pmUuid: pmUuid, scopeMappingRequest: scopeMappingRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /propertymappings/scope/{pm_uuid}/ - - ScopeMapping Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter scopeMappingRequest: (body) - - returns: RequestBuilder - */ - open class func propertymappingsScopeUpdateWithRequestBuilder(pmUuid: UUID, scopeMappingRequest: ScopeMappingRequest) -> RequestBuilder { - var localVariablePath = "/propertymappings/scope/{pm_uuid}/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: scopeMappingRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func propertymappingsScopeUsedByList(pmUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return propertymappingsScopeUsedByListWithRequestBuilder(pmUuid: pmUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /propertymappings/scope/{pm_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. - - returns: RequestBuilder<[UsedBy]> - */ - open class func propertymappingsScopeUsedByListWithRequestBuilder(pmUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/propertymappings/scope/{pm_uuid}/used_by/" - let pmUuidPreEscape = "\(APIHelper.mapValueToPathItem(pmUuid))" - let pmUuidPostEscape = pmUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{pm_uuid}", with: pmUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/ProvidersAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/ProvidersAPI.swift deleted file mode 100644 index 8feaf09..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/ProvidersAPI.swift +++ /dev/null @@ -1,2913 +0,0 @@ -// -// ProvidersAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class ProvidersAPI { - - /** - - - parameter id: (path) A unique integer value identifying this provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersAllDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersAllDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/all/{id}/ - - Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this provider. - - returns: RequestBuilder - */ - open class func providersAllDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter applicationIsnull: (query) (optional) - - parameter backchannelOnly: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersAllList(applicationIsnull: Bool? = nil, backchannelOnly: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersAllListWithRequestBuilder(applicationIsnull: applicationIsnull, backchannelOnly: backchannelOnly, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/all/ - - Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter applicationIsnull: (query) (optional) - - parameter backchannelOnly: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func providersAllListWithRequestBuilder(applicationIsnull: Bool? = nil, backchannelOnly: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/providers/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "application__isnull": (wrappedValue: applicationIsnull?.encodeToJSON(), isExplode: true), - "backchannel_only": (wrappedValue: backchannelOnly?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersAllRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Provider?, _ error: Error?) -> Void)) -> RequestTask { - return providersAllRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/all/{id}/ - - Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this provider. - - returns: RequestBuilder - */ - open class func providersAllRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return providersAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/all/types/ - - Get all creatable provider types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func providersAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/providers/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersAllUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersAllUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/all/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersAllUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/all/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter lDAPProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapCreate(lDAPProviderRequest: LDAPProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapCreateWithRequestBuilder(lDAPProviderRequest: lDAPProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/ldap/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter lDAPProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersLdapCreateWithRequestBuilder(lDAPProviderRequest: LDAPProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/ldap/{id}/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - returns: RequestBuilder - */ - open class func providersLdapDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/ldap/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter baseDnIexact: (query) (optional) - - parameter certificateKpUuidIexact: (query) (optional) - - parameter certificateNameIexact: (query) (optional) - - parameter gidStartNumberIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter searchGroupGroupUuidIexact: (query) (optional) - - parameter searchGroupNameIexact: (query) (optional) - - parameter tlsServerNameIexact: (query) (optional) - - parameter uidStartNumberIexact: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, baseDnIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, gidStartNumberIexact: Int? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, searchGroupGroupUuidIexact: UUID? = nil, searchGroupNameIexact: String? = nil, tlsServerNameIexact: String? = nil, uidStartNumberIexact: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedLDAPProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapListWithRequestBuilder(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, baseDnIexact: baseDnIexact, certificateKpUuidIexact: certificateKpUuidIexact, certificateNameIexact: certificateNameIexact, gidStartNumberIexact: gidStartNumberIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, search: search, searchGroupGroupUuidIexact: searchGroupGroupUuidIexact, searchGroupNameIexact: searchGroupNameIexact, tlsServerNameIexact: tlsServerNameIexact, uidStartNumberIexact: uidStartNumberIexact).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/ldap/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter baseDnIexact: (query) (optional) - - parameter certificateKpUuidIexact: (query) (optional) - - parameter certificateNameIexact: (query) (optional) - - parameter gidStartNumberIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter searchGroupGroupUuidIexact: (query) (optional) - - parameter searchGroupNameIexact: (query) (optional) - - parameter tlsServerNameIexact: (query) (optional) - - parameter uidStartNumberIexact: (query) (optional) - - returns: RequestBuilder - */ - open class func providersLdapListWithRequestBuilder(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, baseDnIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, gidStartNumberIexact: Int? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, searchGroupGroupUuidIexact: UUID? = nil, searchGroupNameIexact: String? = nil, tlsServerNameIexact: String? = nil, uidStartNumberIexact: Int? = nil) -> RequestBuilder { - let localVariablePath = "/providers/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "application__isnull": (wrappedValue: applicationIsnull?.encodeToJSON(), isExplode: true), - "authorization_flow__slug__iexact": (wrappedValue: authorizationFlowSlugIexact?.encodeToJSON(), isExplode: true), - "base_dn__iexact": (wrappedValue: baseDnIexact?.encodeToJSON(), isExplode: true), - "certificate__kp_uuid__iexact": (wrappedValue: certificateKpUuidIexact?.encodeToJSON(), isExplode: true), - "certificate__name__iexact": (wrappedValue: certificateNameIexact?.encodeToJSON(), isExplode: true), - "gid_start_number__iexact": (wrappedValue: gidStartNumberIexact?.encodeToJSON(), isExplode: true), - "name__iexact": (wrappedValue: nameIexact?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "search_group__group_uuid__iexact": (wrappedValue: searchGroupGroupUuidIexact?.encodeToJSON(), isExplode: true), - "search_group__name__iexact": (wrappedValue: searchGroupNameIexact?.encodeToJSON(), isExplode: true), - "tls_server_name__iexact": (wrappedValue: tlsServerNameIexact?.encodeToJSON(), isExplode: true), - "uid_start_number__iexact": (wrappedValue: uidStartNumberIexact?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter patchedLDAPProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapPartialUpdate(id: Int, patchedLDAPProviderRequest: PatchedLDAPProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapPartialUpdateWithRequestBuilder(id: id, patchedLDAPProviderRequest: patchedLDAPProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/ldap/{id}/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter patchedLDAPProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersLdapPartialUpdateWithRequestBuilder(id: Int, patchedLDAPProviderRequest: PatchedLDAPProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/ldap/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedLDAPProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/ldap/{id}/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - returns: RequestBuilder - */ - open class func providersLdapRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/ldap/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter lDAPProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapUpdate(id: Int, lDAPProviderRequest: LDAPProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapUpdateWithRequestBuilder(id: id, lDAPProviderRequest: lDAPProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/ldap/{id}/ - - LDAPProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter lDAPProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersLdapUpdateWithRequestBuilder(id: Int, lDAPProviderRequest: LDAPProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/ldap/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersLdapUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersLdapUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/ldap/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this LDAP Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersLdapUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/ldap/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter oAuth2ProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2Create(oAuth2ProviderRequest: OAuth2ProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuth2Provider?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2CreateWithRequestBuilder(oAuth2ProviderRequest: oAuth2ProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/oauth2/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter oAuth2ProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersOauth2CreateWithRequestBuilder(oAuth2ProviderRequest: OAuth2ProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/oauth2/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: oAuth2ProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2Destroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2DestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/oauth2/{id}/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - returns: RequestBuilder - */ - open class func providersOauth2DestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter clientType - */ - public enum ClientType_providersOauth2List: String, CaseIterable { - case confidential = "confidential" - case _public = "public" - } - - /** - * enum for parameter issuerMode - */ - public enum IssuerMode_providersOauth2List: String, CaseIterable { - case global = "global" - case perProvider = "per_provider" - } - - /** - * enum for parameter subMode - */ - public enum SubMode_providersOauth2List: String, CaseIterable { - case hashedUserId = "hashed_user_id" - case userEmail = "user_email" - case userId = "user_id" - case userUpn = "user_upn" - case userUsername = "user_username" - case userUuid = "user_uuid" - } - - /** - - - parameter accessCodeValidity: (query) (optional) - - parameter accessTokenValidity: (query) (optional) - - parameter application: (query) (optional) - - parameter authorizationFlow: (query) (optional) - - parameter clientId: (query) (optional) - - parameter clientType: (query) Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public (optional) - - parameter includeClaimsInIdToken: (query) (optional) - - parameter issuerMode: (query) Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappings: (query) (optional) - - parameter redirectUris: (query) (optional) - - parameter refreshTokenValidity: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter signingKey: (query) (optional) - - parameter subMode: (query) Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2List(accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, application: UUID? = nil, authorizationFlow: UUID? = nil, clientId: String? = nil, clientType: ClientType_providersOauth2List? = nil, includeClaimsInIdToken: Bool? = nil, issuerMode: IssuerMode_providersOauth2List? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, redirectUris: String? = nil, refreshTokenValidity: String? = nil, search: String? = nil, signingKey: UUID? = nil, subMode: SubMode_providersOauth2List? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedOAuth2ProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2ListWithRequestBuilder(accessCodeValidity: accessCodeValidity, accessTokenValidity: accessTokenValidity, application: application, authorizationFlow: authorizationFlow, clientId: clientId, clientType: clientType, includeClaimsInIdToken: includeClaimsInIdToken, issuerMode: issuerMode, name: name, ordering: ordering, page: page, pageSize: pageSize, propertyMappings: propertyMappings, redirectUris: redirectUris, refreshTokenValidity: refreshTokenValidity, search: search, signingKey: signingKey, subMode: subMode).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/oauth2/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter accessCodeValidity: (query) (optional) - - parameter accessTokenValidity: (query) (optional) - - parameter application: (query) (optional) - - parameter authorizationFlow: (query) (optional) - - parameter clientId: (query) (optional) - - parameter clientType: (query) Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public (optional) - - parameter includeClaimsInIdToken: (query) (optional) - - parameter issuerMode: (query) Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappings: (query) (optional) - - parameter redirectUris: (query) (optional) - - parameter refreshTokenValidity: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter signingKey: (query) (optional) - - parameter subMode: (query) Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. (optional) - - returns: RequestBuilder - */ - open class func providersOauth2ListWithRequestBuilder(accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, application: UUID? = nil, authorizationFlow: UUID? = nil, clientId: String? = nil, clientType: ClientType_providersOauth2List? = nil, includeClaimsInIdToken: Bool? = nil, issuerMode: IssuerMode_providersOauth2List? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, redirectUris: String? = nil, refreshTokenValidity: String? = nil, search: String? = nil, signingKey: UUID? = nil, subMode: SubMode_providersOauth2List? = nil) -> RequestBuilder { - let localVariablePath = "/providers/oauth2/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "access_code_validity": (wrappedValue: accessCodeValidity?.encodeToJSON(), isExplode: true), - "access_token_validity": (wrappedValue: accessTokenValidity?.encodeToJSON(), isExplode: true), - "application": (wrappedValue: application?.encodeToJSON(), isExplode: true), - "authorization_flow": (wrappedValue: authorizationFlow?.encodeToJSON(), isExplode: true), - "client_id": (wrappedValue: clientId?.encodeToJSON(), isExplode: true), - "client_type": (wrappedValue: clientType?.encodeToJSON(), isExplode: true), - "include_claims_in_id_token": (wrappedValue: includeClaimsInIdToken?.encodeToJSON(), isExplode: true), - "issuer_mode": (wrappedValue: issuerMode?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "property_mappings": (wrappedValue: propertyMappings?.encodeToJSON(), isExplode: true), - "redirect_uris": (wrappedValue: redirectUris?.encodeToJSON(), isExplode: true), - "refresh_token_validity": (wrappedValue: refreshTokenValidity?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "signing_key": (wrappedValue: signingKey?.encodeToJSON(), isExplode: true), - "sub_mode": (wrappedValue: subMode?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter patchedOAuth2ProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2PartialUpdate(id: Int, patchedOAuth2ProviderRequest: PatchedOAuth2ProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuth2Provider?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2PartialUpdateWithRequestBuilder(id: id, patchedOAuth2ProviderRequest: patchedOAuth2ProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/oauth2/{id}/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter patchedOAuth2ProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersOauth2PartialUpdateWithRequestBuilder(id: Int, patchedOAuth2ProviderRequest: PatchedOAuth2ProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedOAuth2ProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2PreviewUserRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PropertyMappingPreview?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2PreviewUserRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/oauth2/{id}/preview_user/ - - Preview user data for provider - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - returns: RequestBuilder - */ - open class func providersOauth2PreviewUserRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/preview_user/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2Retrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuth2Provider?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2RetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/oauth2/{id}/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - returns: RequestBuilder - */ - open class func providersOauth2RetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2SetupUrlsRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuth2ProviderSetupURLs?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2SetupUrlsRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/oauth2/{id}/setup_urls/ - - Get Providers setup URLs - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - returns: RequestBuilder - */ - open class func providersOauth2SetupUrlsRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/setup_urls/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter oAuth2ProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2Update(id: Int, oAuth2ProviderRequest: OAuth2ProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuth2Provider?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2UpdateWithRequestBuilder(id: id, oAuth2ProviderRequest: oAuth2ProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/oauth2/{id}/ - - OAuth2Provider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter oAuth2ProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersOauth2UpdateWithRequestBuilder(id: Int, oAuth2ProviderRequest: OAuth2ProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/oauth2/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: oAuth2ProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersOauth2UsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersOauth2UsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/oauth2/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersOauth2UsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/oauth2/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter proxyProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyCreate(proxyProviderRequest: ProxyProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ProxyProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyCreateWithRequestBuilder(proxyProviderRequest: proxyProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/proxy/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter proxyProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersProxyCreateWithRequestBuilder(proxyProviderRequest: ProxyProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/proxy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: proxyProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/proxy/{id}/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - returns: RequestBuilder - */ - open class func providersProxyDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/proxy/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter basicAuthEnabledIexact: (query) (optional) - - parameter basicAuthPasswordAttributeIexact: (query) (optional) - - parameter basicAuthUserAttributeIexact: (query) (optional) - - parameter certificateKpUuidIexact: (query) (optional) - - parameter certificateNameIexact: (query) (optional) - - parameter cookieDomainIexact: (query) (optional) - - parameter externalHostIexact: (query) (optional) - - parameter internalHostIexact: (query) (optional) - - parameter internalHostSslValidationIexact: (query) (optional) - - parameter modeIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappingsIexact: (query) (optional) - - parameter redirectUrisIexact: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter skipPathRegexIexact: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, basicAuthEnabledIexact: Bool? = nil, basicAuthPasswordAttributeIexact: String? = nil, basicAuthUserAttributeIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, cookieDomainIexact: String? = nil, externalHostIexact: String? = nil, internalHostIexact: String? = nil, internalHostSslValidationIexact: Bool? = nil, modeIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappingsIexact: [UUID]? = nil, redirectUrisIexact: String? = nil, search: String? = nil, skipPathRegexIexact: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedProxyProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyListWithRequestBuilder(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, basicAuthEnabledIexact: basicAuthEnabledIexact, basicAuthPasswordAttributeIexact: basicAuthPasswordAttributeIexact, basicAuthUserAttributeIexact: basicAuthUserAttributeIexact, certificateKpUuidIexact: certificateKpUuidIexact, certificateNameIexact: certificateNameIexact, cookieDomainIexact: cookieDomainIexact, externalHostIexact: externalHostIexact, internalHostIexact: internalHostIexact, internalHostSslValidationIexact: internalHostSslValidationIexact, modeIexact: modeIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, propertyMappingsIexact: propertyMappingsIexact, redirectUrisIexact: redirectUrisIexact, search: search, skipPathRegexIexact: skipPathRegexIexact).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/proxy/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter basicAuthEnabledIexact: (query) (optional) - - parameter basicAuthPasswordAttributeIexact: (query) (optional) - - parameter basicAuthUserAttributeIexact: (query) (optional) - - parameter certificateKpUuidIexact: (query) (optional) - - parameter certificateNameIexact: (query) (optional) - - parameter cookieDomainIexact: (query) (optional) - - parameter externalHostIexact: (query) (optional) - - parameter internalHostIexact: (query) (optional) - - parameter internalHostSslValidationIexact: (query) (optional) - - parameter modeIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappingsIexact: (query) (optional) - - parameter redirectUrisIexact: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter skipPathRegexIexact: (query) (optional) - - returns: RequestBuilder - */ - open class func providersProxyListWithRequestBuilder(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, basicAuthEnabledIexact: Bool? = nil, basicAuthPasswordAttributeIexact: String? = nil, basicAuthUserAttributeIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, cookieDomainIexact: String? = nil, externalHostIexact: String? = nil, internalHostIexact: String? = nil, internalHostSslValidationIexact: Bool? = nil, modeIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappingsIexact: [UUID]? = nil, redirectUrisIexact: String? = nil, search: String? = nil, skipPathRegexIexact: String? = nil) -> RequestBuilder { - let localVariablePath = "/providers/proxy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "application__isnull": (wrappedValue: applicationIsnull?.encodeToJSON(), isExplode: true), - "authorization_flow__slug__iexact": (wrappedValue: authorizationFlowSlugIexact?.encodeToJSON(), isExplode: true), - "basic_auth_enabled__iexact": (wrappedValue: basicAuthEnabledIexact?.encodeToJSON(), isExplode: true), - "basic_auth_password_attribute__iexact": (wrappedValue: basicAuthPasswordAttributeIexact?.encodeToJSON(), isExplode: true), - "basic_auth_user_attribute__iexact": (wrappedValue: basicAuthUserAttributeIexact?.encodeToJSON(), isExplode: true), - "certificate__kp_uuid__iexact": (wrappedValue: certificateKpUuidIexact?.encodeToJSON(), isExplode: true), - "certificate__name__iexact": (wrappedValue: certificateNameIexact?.encodeToJSON(), isExplode: true), - "cookie_domain__iexact": (wrappedValue: cookieDomainIexact?.encodeToJSON(), isExplode: true), - "external_host__iexact": (wrappedValue: externalHostIexact?.encodeToJSON(), isExplode: true), - "internal_host__iexact": (wrappedValue: internalHostIexact?.encodeToJSON(), isExplode: true), - "internal_host_ssl_validation__iexact": (wrappedValue: internalHostSslValidationIexact?.encodeToJSON(), isExplode: true), - "mode__iexact": (wrappedValue: modeIexact?.encodeToJSON(), isExplode: true), - "name__iexact": (wrappedValue: nameIexact?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "property_mappings__iexact": (wrappedValue: propertyMappingsIexact?.encodeToJSON(), isExplode: true), - "redirect_uris__iexact": (wrappedValue: redirectUrisIexact?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "skip_path_regex__iexact": (wrappedValue: skipPathRegexIexact?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter patchedProxyProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyPartialUpdate(id: Int, patchedProxyProviderRequest: PatchedProxyProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ProxyProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyPartialUpdateWithRequestBuilder(id: id, patchedProxyProviderRequest: patchedProxyProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/proxy/{id}/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter patchedProxyProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersProxyPartialUpdateWithRequestBuilder(id: Int, patchedProxyProviderRequest: PatchedProxyProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/proxy/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedProxyProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ProxyProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/proxy/{id}/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - returns: RequestBuilder - */ - open class func providersProxyRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/proxy/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter proxyProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyUpdate(id: Int, proxyProviderRequest: ProxyProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ProxyProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyUpdateWithRequestBuilder(id: id, proxyProviderRequest: proxyProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/proxy/{id}/ - - ProxyProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter proxyProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersProxyUpdateWithRequestBuilder(id: Int, proxyProviderRequest: ProxyProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/proxy/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: proxyProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersProxyUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersProxyUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/proxy/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Proxy Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersProxyUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/proxy/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter radiusProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusCreate(radiusProviderRequest: RadiusProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RadiusProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusCreateWithRequestBuilder(radiusProviderRequest: radiusProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/radius/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter radiusProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersRadiusCreateWithRequestBuilder(radiusProviderRequest: RadiusProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/radius/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: radiusProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/radius/{id}/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - returns: RequestBuilder - */ - open class func providersRadiusDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/radius/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter clientNetworksIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, clientNetworksIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedRadiusProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusListWithRequestBuilder(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, clientNetworksIexact: clientNetworksIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/radius/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter applicationIsnull: (query) (optional) - - parameter authorizationFlowSlugIexact: (query) (optional) - - parameter clientNetworksIexact: (query) (optional) - - parameter nameIexact: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func providersRadiusListWithRequestBuilder(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, clientNetworksIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/providers/radius/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "application__isnull": (wrappedValue: applicationIsnull?.encodeToJSON(), isExplode: true), - "authorization_flow__slug__iexact": (wrappedValue: authorizationFlowSlugIexact?.encodeToJSON(), isExplode: true), - "client_networks__iexact": (wrappedValue: clientNetworksIexact?.encodeToJSON(), isExplode: true), - "name__iexact": (wrappedValue: nameIexact?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter patchedRadiusProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusPartialUpdate(id: Int, patchedRadiusProviderRequest: PatchedRadiusProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RadiusProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusPartialUpdateWithRequestBuilder(id: id, patchedRadiusProviderRequest: patchedRadiusProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/radius/{id}/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter patchedRadiusProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersRadiusPartialUpdateWithRequestBuilder(id: Int, patchedRadiusProviderRequest: PatchedRadiusProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/radius/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedRadiusProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RadiusProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/radius/{id}/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - returns: RequestBuilder - */ - open class func providersRadiusRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/radius/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter radiusProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusUpdate(id: Int, radiusProviderRequest: RadiusProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RadiusProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusUpdateWithRequestBuilder(id: id, radiusProviderRequest: radiusProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/radius/{id}/ - - RadiusProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter radiusProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersRadiusUpdateWithRequestBuilder(id: Int, radiusProviderRequest: RadiusProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/radius/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: radiusProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this Radius Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersRadiusUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersRadiusUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/radius/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this Radius Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersRadiusUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/radius/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sAMLProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlCreate(sAMLProviderRequest: SAMLProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlCreateWithRequestBuilder(sAMLProviderRequest: sAMLProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/saml/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sAMLProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersSamlCreateWithRequestBuilder(sAMLProviderRequest: SAMLProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/saml/{id}/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - returns: RequestBuilder - */ - open class func providersSamlDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (form) - - parameter authorizationFlow: (form) - - parameter file: (form) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlImportMetadataCreate(name: String, authorizationFlow: UUID, file: URL, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlImportMetadataCreateWithRequestBuilder(name: name, authorizationFlow: authorizationFlow, file: file).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/saml/import_metadata/ - - Create provider from SAML Metadata - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (form) - - parameter authorizationFlow: (form) - - parameter file: (form) - - returns: RequestBuilder - */ - open class func providersSamlImportMetadataCreateWithRequestBuilder(name: String, authorizationFlow: UUID, file: URL) -> RequestBuilder { - let localVariablePath = "/providers/saml/import_metadata/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableFormParams: [String: Any?] = [ - "name": name.encodeToJSON(), - "authorization_flow": authorizationFlow.encodeToJSON(), - "file": file.encodeToJSON(), - ] - - let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) - let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - "Content-Type": "multipart/form-data", - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter digestAlgorithm - */ - public enum DigestAlgorithm_providersSamlList: String, CaseIterable { - case _200009xmldsigHashSha1 = "http://www.w3.org/2000/09/xmldsig#sha1" - case _200104xmldsigMoreHashSha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" - case _200104xmlencHashSha256 = "http://www.w3.org/2001/04/xmlenc#sha256" - case _200104xmlencHashSha512 = "http://www.w3.org/2001/04/xmlenc#sha512" - } - - /** - * enum for parameter signatureAlgorithm - */ - public enum SignatureAlgorithm_providersSamlList: String, CaseIterable { - case _200009xmldsigHashDsaSha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" - case _200009xmldsigHashRsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" - case _200104xmldsigMoreHashRsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" - case _200104xmldsigMoreHashRsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" - case _200104xmldsigMoreHashRsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" - } - - /** - * enum for parameter spBinding - */ - public enum SpBinding_providersSamlList: String, CaseIterable { - case post = "post" - case redirect = "redirect" - } - - /** - - - parameter acsUrl: (query) (optional) - - parameter assertionValidNotBefore: (query) (optional) - - parameter assertionValidNotOnOrAfter: (query) (optional) - - parameter audience: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter authorizationFlow: (query) (optional) - - parameter backchannelApplication: (query) (optional) - - parameter defaultRelayState: (query) (optional) - - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) - - parameter isBackchannel: (query) (optional) - - parameter issuer: (query) (optional) - - parameter name: (query) (optional) - - parameter nameIdMapping: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappings: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter sessionValidNotOnOrAfter: (query) (optional) - - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) - - parameter signingKp: (query) (optional) - - parameter spBinding: (query) This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post (optional) - - parameter verificationKp: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlList(acsUrl: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, audience: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, backchannelApplication: UUID? = nil, defaultRelayState: String? = nil, digestAlgorithm: DigestAlgorithm_providersSamlList? = nil, isBackchannel: Bool? = nil, issuer: String? = nil, name: String? = nil, nameIdMapping: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, search: String? = nil, sessionValidNotOnOrAfter: String? = nil, signatureAlgorithm: SignatureAlgorithm_providersSamlList? = nil, signingKp: UUID? = nil, spBinding: SpBinding_providersSamlList? = nil, verificationKp: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSAMLProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlListWithRequestBuilder(acsUrl: acsUrl, assertionValidNotBefore: assertionValidNotBefore, assertionValidNotOnOrAfter: assertionValidNotOnOrAfter, audience: audience, authenticationFlow: authenticationFlow, authorizationFlow: authorizationFlow, backchannelApplication: backchannelApplication, defaultRelayState: defaultRelayState, digestAlgorithm: digestAlgorithm, isBackchannel: isBackchannel, issuer: issuer, name: name, nameIdMapping: nameIdMapping, ordering: ordering, page: page, pageSize: pageSize, propertyMappings: propertyMappings, search: search, sessionValidNotOnOrAfter: sessionValidNotOnOrAfter, signatureAlgorithm: signatureAlgorithm, signingKp: signingKp, spBinding: spBinding, verificationKp: verificationKp).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/saml/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter acsUrl: (query) (optional) - - parameter assertionValidNotBefore: (query) (optional) - - parameter assertionValidNotOnOrAfter: (query) (optional) - - parameter audience: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter authorizationFlow: (query) (optional) - - parameter backchannelApplication: (query) (optional) - - parameter defaultRelayState: (query) (optional) - - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) - - parameter isBackchannel: (query) (optional) - - parameter issuer: (query) (optional) - - parameter name: (query) (optional) - - parameter nameIdMapping: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter propertyMappings: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter sessionValidNotOnOrAfter: (query) (optional) - - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) - - parameter signingKp: (query) (optional) - - parameter spBinding: (query) This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post (optional) - - parameter verificationKp: (query) (optional) - - returns: RequestBuilder - */ - open class func providersSamlListWithRequestBuilder(acsUrl: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, audience: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, backchannelApplication: UUID? = nil, defaultRelayState: String? = nil, digestAlgorithm: DigestAlgorithm_providersSamlList? = nil, isBackchannel: Bool? = nil, issuer: String? = nil, name: String? = nil, nameIdMapping: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, search: String? = nil, sessionValidNotOnOrAfter: String? = nil, signatureAlgorithm: SignatureAlgorithm_providersSamlList? = nil, signingKp: UUID? = nil, spBinding: SpBinding_providersSamlList? = nil, verificationKp: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/providers/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "acs_url": (wrappedValue: acsUrl?.encodeToJSON(), isExplode: true), - "assertion_valid_not_before": (wrappedValue: assertionValidNotBefore?.encodeToJSON(), isExplode: true), - "assertion_valid_not_on_or_after": (wrappedValue: assertionValidNotOnOrAfter?.encodeToJSON(), isExplode: true), - "audience": (wrappedValue: audience?.encodeToJSON(), isExplode: true), - "authentication_flow": (wrappedValue: authenticationFlow?.encodeToJSON(), isExplode: true), - "authorization_flow": (wrappedValue: authorizationFlow?.encodeToJSON(), isExplode: true), - "backchannel_application": (wrappedValue: backchannelApplication?.encodeToJSON(), isExplode: true), - "default_relay_state": (wrappedValue: defaultRelayState?.encodeToJSON(), isExplode: true), - "digest_algorithm": (wrappedValue: digestAlgorithm?.encodeToJSON(), isExplode: true), - "is_backchannel": (wrappedValue: isBackchannel?.encodeToJSON(), isExplode: true), - "issuer": (wrappedValue: issuer?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "name_id_mapping": (wrappedValue: nameIdMapping?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "property_mappings": (wrappedValue: propertyMappings?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "session_valid_not_on_or_after": (wrappedValue: sessionValidNotOnOrAfter?.encodeToJSON(), isExplode: true), - "signature_algorithm": (wrappedValue: signatureAlgorithm?.encodeToJSON(), isExplode: true), - "signing_kp": (wrappedValue: signingKp?.encodeToJSON(), isExplode: true), - "sp_binding": (wrappedValue: spBinding?.encodeToJSON(), isExplode: true), - "verification_kp": (wrappedValue: verificationKp?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter forceBinding - */ - public enum ForceBinding_providersSamlMetadataRetrieve: String, CaseIterable { - case post = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" - case redirect = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter download: (query) (optional) - - parameter forceBinding: (query) Optionally force the metadata to only include one binding. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlMetadataRetrieve(id: Int, download: Bool? = nil, forceBinding: ForceBinding_providersSamlMetadataRetrieve? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLMetadata?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlMetadataRetrieveWithRequestBuilder(id: id, download: download, forceBinding: forceBinding).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/saml/{id}/metadata/ - - Return metadata as XML string - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter download: (query) (optional) - - parameter forceBinding: (query) Optionally force the metadata to only include one binding. (optional) - - returns: RequestBuilder - */ - open class func providersSamlMetadataRetrieveWithRequestBuilder(id: Int, download: Bool? = nil, forceBinding: ForceBinding_providersSamlMetadataRetrieve? = nil) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/metadata/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "download": (wrappedValue: download?.encodeToJSON(), isExplode: true), - "force_binding": (wrappedValue: forceBinding?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter patchedSAMLProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlPartialUpdate(id: Int, patchedSAMLProviderRequest: PatchedSAMLProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlPartialUpdateWithRequestBuilder(id: id, patchedSAMLProviderRequest: patchedSAMLProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/saml/{id}/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter patchedSAMLProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersSamlPartialUpdateWithRequestBuilder(id: Int, patchedSAMLProviderRequest: PatchedSAMLProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSAMLProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlPreviewUserRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PropertyMappingPreview?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlPreviewUserRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/saml/{id}/preview_user/ - - Preview user data for provider - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - returns: RequestBuilder - */ - open class func providersSamlPreviewUserRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/preview_user/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/saml/{id}/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - returns: RequestBuilder - */ - open class func providersSamlRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter sAMLProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlUpdate(id: Int, sAMLProviderRequest: SAMLProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlUpdateWithRequestBuilder(id: id, sAMLProviderRequest: sAMLProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/saml/{id}/ - - SAMLProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter sAMLProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersSamlUpdateWithRequestBuilder(id: Int, sAMLProviderRequest: SAMLProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SAML Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersSamlUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersSamlUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/saml/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SAML Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersSamlUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/saml/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sCIMProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimCreate(sCIMProviderRequest: SCIMProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimCreateWithRequestBuilder(sCIMProviderRequest: sCIMProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /providers/scim/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sCIMProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersScimCreateWithRequestBuilder(sCIMProviderRequest: SCIMProviderRequest) -> RequestBuilder { - let localVariablePath = "/providers/scim/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sCIMProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /providers/scim/{id}/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - returns: RequestBuilder - */ - open class func providersScimDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/scim/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter excludeUsersServiceAccount: (query) (optional) - - parameter filterGroup: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter url: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimList(excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, url: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSCIMProviderList?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimListWithRequestBuilder(excludeUsersServiceAccount: excludeUsersServiceAccount, filterGroup: filterGroup, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, url: url).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/scim/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter excludeUsersServiceAccount: (query) (optional) - - parameter filterGroup: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter url: (query) (optional) - - returns: RequestBuilder - */ - open class func providersScimListWithRequestBuilder(excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, url: String? = nil) -> RequestBuilder { - let localVariablePath = "/providers/scim/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "exclude_users_service_account": (wrappedValue: excludeUsersServiceAccount?.encodeToJSON(), isExplode: true), - "filter_group": (wrappedValue: filterGroup?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "url": (wrappedValue: url?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter patchedSCIMProviderRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimPartialUpdate(id: Int, patchedSCIMProviderRequest: PatchedSCIMProviderRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimPartialUpdateWithRequestBuilder(id: id, patchedSCIMProviderRequest: patchedSCIMProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /providers/scim/{id}/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter patchedSCIMProviderRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func providersScimPartialUpdateWithRequestBuilder(id: Int, patchedSCIMProviderRequest: PatchedSCIMProviderRequest? = nil) -> RequestBuilder { - var localVariablePath = "/providers/scim/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSCIMProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/scim/{id}/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - returns: RequestBuilder - */ - open class func providersScimRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/scim/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimSyncStatusRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Task?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimSyncStatusRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/scim/{id}/sync_status/ - - Get provider's sync status - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - returns: RequestBuilder - */ - open class func providersScimSyncStatusRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/providers/scim/{id}/sync_status/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter sCIMProviderRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimUpdate(id: Int, sCIMProviderRequest: SCIMProviderRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SCIMProvider?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimUpdateWithRequestBuilder(id: id, sCIMProviderRequest: sCIMProviderRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /providers/scim/{id}/ - - SCIMProvider Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter sCIMProviderRequest: (body) - - returns: RequestBuilder - */ - open class func providersScimUpdateWithRequestBuilder(id: Int, sCIMProviderRequest: SCIMProviderRequest) -> RequestBuilder { - var localVariablePath = "/providers/scim/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sCIMProviderRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func providersScimUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return providersScimUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /providers/scim/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this SCIM Provider. - - returns: RequestBuilder<[UsedBy]> - */ - open class func providersScimUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/providers/scim/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/RbacAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/RbacAPI.swift deleted file mode 100644 index 772a12c..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/RbacAPI.swift +++ /dev/null @@ -1,1089 +0,0 @@ -// -// RbacAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class RbacAPI { - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter permissionAssignRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByRolesAssignCreate(uuid: UUID, permissionAssignRequest: PermissionAssignRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByRolesAssignCreateWithRequestBuilder(uuid: uuid, permissionAssignRequest: permissionAssignRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /rbac/permissions/assigned_by_roles/{uuid}/assign/ - - Assign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - parameter permissionAssignRequest: (body) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByRolesAssignCreateWithRequestBuilder(uuid: UUID, permissionAssignRequest: PermissionAssignRequest) -> RequestBuilder { - var localVariablePath = "/rbac/permissions/assigned_by_roles/{uuid}/assign/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: permissionAssignRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter model - */ - public enum Model_rbacPermissionsAssignedByRolesList: String, CaseIterable { - case blueprintsPeriodBlueprintinstance = "authentik_blueprints.blueprintinstance" - case corePeriodApplication = "authentik_core.application" - case corePeriodGroup = "authentik_core.group" - case corePeriodToken = "authentik_core.token" - case corePeriodUser = "authentik_core.user" - case cryptoPeriodCertificatekeypair = "authentik_crypto.certificatekeypair" - case enterprisePeriodLicense = "authentik_enterprise.license" - case eventsPeriodEvent = "authentik_events.event" - case eventsPeriodNotification = "authentik_events.notification" - case eventsPeriodNotificationrule = "authentik_events.notificationrule" - case eventsPeriodNotificationtransport = "authentik_events.notificationtransport" - case eventsPeriodNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" - case flowsPeriodFlow = "authentik_flows.flow" - case flowsPeriodFlowstagebinding = "authentik_flows.flowstagebinding" - case outpostsPeriodDockerserviceconnection = "authentik_outposts.dockerserviceconnection" - case outpostsPeriodKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" - case outpostsPeriodOutpost = "authentik_outposts.outpost" - case policiesPeriodPolicybinding = "authentik_policies.policybinding" - case policiesDummyPeriodDummypolicy = "authentik_policies_dummy.dummypolicy" - case policiesEventMatcherPeriodEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" - case policiesExpiryPeriodPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" - case policiesExpressionPeriodExpressionpolicy = "authentik_policies_expression.expressionpolicy" - case policiesPasswordPeriodPasswordpolicy = "authentik_policies_password.passwordpolicy" - case policiesReputationPeriodReputation = "authentik_policies_reputation.reputation" - case policiesReputationPeriodReputationpolicy = "authentik_policies_reputation.reputationpolicy" - case providersLdapPeriodLdapprovider = "authentik_providers_ldap.ldapprovider" - case providersOauth2PeriodAccesstoken = "authentik_providers_oauth2.accesstoken" - case providersOauth2PeriodAuthorizationcode = "authentik_providers_oauth2.authorizationcode" - case providersOauth2PeriodOauth2provider = "authentik_providers_oauth2.oauth2provider" - case providersOauth2PeriodRefreshtoken = "authentik_providers_oauth2.refreshtoken" - case providersOauth2PeriodScopemapping = "authentik_providers_oauth2.scopemapping" - case providersProxyPeriodProxyprovider = "authentik_providers_proxy.proxyprovider" - case providersRadiusPeriodRadiusprovider = "authentik_providers_radius.radiusprovider" - case providersSamlPeriodSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" - case providersSamlPeriodSamlprovider = "authentik_providers_saml.samlprovider" - case providersScimPeriodScimmapping = "authentik_providers_scim.scimmapping" - case providersScimPeriodScimprovider = "authentik_providers_scim.scimprovider" - case rbacPeriodRole = "authentik_rbac.role" - case sourcesLdapPeriodLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" - case sourcesLdapPeriodLdapsource = "authentik_sources_ldap.ldapsource" - case sourcesOauthPeriodOauthsource = "authentik_sources_oauth.oauthsource" - case sourcesOauthPeriodUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" - case sourcesPlexPeriodPlexsource = "authentik_sources_plex.plexsource" - case sourcesPlexPeriodPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" - case sourcesSamlPeriodSamlsource = "authentik_sources_saml.samlsource" - case sourcesSamlPeriodUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" - case stagesAuthenticatorDuoPeriodAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" - case stagesAuthenticatorDuoPeriodDuodevice = "authentik_stages_authenticator_duo.duodevice" - case stagesAuthenticatorSmsPeriodAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" - case stagesAuthenticatorSmsPeriodSmsdevice = "authentik_stages_authenticator_sms.smsdevice" - case stagesAuthenticatorStaticPeriodAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" - case stagesAuthenticatorStaticPeriodStaticdevice = "authentik_stages_authenticator_static.staticdevice" - case stagesAuthenticatorTotpPeriodAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" - case stagesAuthenticatorTotpPeriodTotpdevice = "authentik_stages_authenticator_totp.totpdevice" - case stagesAuthenticatorValidatePeriodAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" - case stagesAuthenticatorWebauthnPeriodAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" - case stagesAuthenticatorWebauthnPeriodWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" - case stagesCaptchaPeriodCaptchastage = "authentik_stages_captcha.captchastage" - case stagesConsentPeriodConsentstage = "authentik_stages_consent.consentstage" - case stagesConsentPeriodUserconsent = "authentik_stages_consent.userconsent" - case stagesDenyPeriodDenystage = "authentik_stages_deny.denystage" - case stagesDummyPeriodDummystage = "authentik_stages_dummy.dummystage" - case stagesEmailPeriodEmailstage = "authentik_stages_email.emailstage" - case stagesIdentificationPeriodIdentificationstage = "authentik_stages_identification.identificationstage" - case stagesInvitationPeriodInvitation = "authentik_stages_invitation.invitation" - case stagesInvitationPeriodInvitationstage = "authentik_stages_invitation.invitationstage" - case stagesPasswordPeriodPasswordstage = "authentik_stages_password.passwordstage" - case stagesPromptPeriodPrompt = "authentik_stages_prompt.prompt" - case stagesPromptPeriodPromptstage = "authentik_stages_prompt.promptstage" - case stagesUserDeletePeriodUserdeletestage = "authentik_stages_user_delete.userdeletestage" - case stagesUserLoginPeriodUserloginstage = "authentik_stages_user_login.userloginstage" - case stagesUserLogoutPeriodUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" - case stagesUserWritePeriodUserwritestage = "authentik_stages_user_write.userwritestage" - case tenantsPeriodTenant = "authentik_tenants.tenant" - } - - /** - - - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License - - parameter objectPk: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByRolesList(model: Model_rbacPermissionsAssignedByRolesList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedRoleAssignedObjectPermissionList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByRolesListWithRequestBuilder(model: model, objectPk: objectPk, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/assigned_by_roles/ - - Get assigned object permissions for a single object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License - - parameter objectPk: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByRolesListWithRequestBuilder(model: Model_rbacPermissionsAssignedByRolesList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/permissions/assigned_by_roles/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "model": (wrappedValue: model.encodeToJSON(), isExplode: true), - "object_pk": (wrappedValue: objectPk?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter patchedPermissionAssignRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByRolesUnassignPartialUpdate(uuid: UUID, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByRolesUnassignPartialUpdateWithRequestBuilder(uuid: uuid, patchedPermissionAssignRequest: patchedPermissionAssignRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /rbac/permissions/assigned_by_roles/{uuid}/unassign/ - - Unassign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - parameter patchedPermissionAssignRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByRolesUnassignPartialUpdateWithRequestBuilder(uuid: UUID, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil) -> RequestBuilder { - var localVariablePath = "/rbac/permissions/assigned_by_roles/{uuid}/unassign/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPermissionAssignRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter permissionAssignRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByUsersAssignCreate(id: Int, permissionAssignRequest: PermissionAssignRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByUsersAssignCreateWithRequestBuilder(id: id, permissionAssignRequest: permissionAssignRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /rbac/permissions/assigned_by_users/{id}/assign/ - - Assign permission(s) to user - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - parameter permissionAssignRequest: (body) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByUsersAssignCreateWithRequestBuilder(id: Int, permissionAssignRequest: PermissionAssignRequest) -> RequestBuilder { - var localVariablePath = "/rbac/permissions/assigned_by_users/{id}/assign/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: permissionAssignRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter model - */ - public enum Model_rbacPermissionsAssignedByUsersList: String, CaseIterable { - case blueprintsPeriodBlueprintinstance = "authentik_blueprints.blueprintinstance" - case corePeriodApplication = "authentik_core.application" - case corePeriodGroup = "authentik_core.group" - case corePeriodToken = "authentik_core.token" - case corePeriodUser = "authentik_core.user" - case cryptoPeriodCertificatekeypair = "authentik_crypto.certificatekeypair" - case enterprisePeriodLicense = "authentik_enterprise.license" - case eventsPeriodEvent = "authentik_events.event" - case eventsPeriodNotification = "authentik_events.notification" - case eventsPeriodNotificationrule = "authentik_events.notificationrule" - case eventsPeriodNotificationtransport = "authentik_events.notificationtransport" - case eventsPeriodNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" - case flowsPeriodFlow = "authentik_flows.flow" - case flowsPeriodFlowstagebinding = "authentik_flows.flowstagebinding" - case outpostsPeriodDockerserviceconnection = "authentik_outposts.dockerserviceconnection" - case outpostsPeriodKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" - case outpostsPeriodOutpost = "authentik_outposts.outpost" - case policiesPeriodPolicybinding = "authentik_policies.policybinding" - case policiesDummyPeriodDummypolicy = "authentik_policies_dummy.dummypolicy" - case policiesEventMatcherPeriodEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" - case policiesExpiryPeriodPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" - case policiesExpressionPeriodExpressionpolicy = "authentik_policies_expression.expressionpolicy" - case policiesPasswordPeriodPasswordpolicy = "authentik_policies_password.passwordpolicy" - case policiesReputationPeriodReputation = "authentik_policies_reputation.reputation" - case policiesReputationPeriodReputationpolicy = "authentik_policies_reputation.reputationpolicy" - case providersLdapPeriodLdapprovider = "authentik_providers_ldap.ldapprovider" - case providersOauth2PeriodAccesstoken = "authentik_providers_oauth2.accesstoken" - case providersOauth2PeriodAuthorizationcode = "authentik_providers_oauth2.authorizationcode" - case providersOauth2PeriodOauth2provider = "authentik_providers_oauth2.oauth2provider" - case providersOauth2PeriodRefreshtoken = "authentik_providers_oauth2.refreshtoken" - case providersOauth2PeriodScopemapping = "authentik_providers_oauth2.scopemapping" - case providersProxyPeriodProxyprovider = "authentik_providers_proxy.proxyprovider" - case providersRadiusPeriodRadiusprovider = "authentik_providers_radius.radiusprovider" - case providersSamlPeriodSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" - case providersSamlPeriodSamlprovider = "authentik_providers_saml.samlprovider" - case providersScimPeriodScimmapping = "authentik_providers_scim.scimmapping" - case providersScimPeriodScimprovider = "authentik_providers_scim.scimprovider" - case rbacPeriodRole = "authentik_rbac.role" - case sourcesLdapPeriodLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" - case sourcesLdapPeriodLdapsource = "authentik_sources_ldap.ldapsource" - case sourcesOauthPeriodOauthsource = "authentik_sources_oauth.oauthsource" - case sourcesOauthPeriodUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" - case sourcesPlexPeriodPlexsource = "authentik_sources_plex.plexsource" - case sourcesPlexPeriodPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" - case sourcesSamlPeriodSamlsource = "authentik_sources_saml.samlsource" - case sourcesSamlPeriodUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" - case stagesAuthenticatorDuoPeriodAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" - case stagesAuthenticatorDuoPeriodDuodevice = "authentik_stages_authenticator_duo.duodevice" - case stagesAuthenticatorSmsPeriodAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" - case stagesAuthenticatorSmsPeriodSmsdevice = "authentik_stages_authenticator_sms.smsdevice" - case stagesAuthenticatorStaticPeriodAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" - case stagesAuthenticatorStaticPeriodStaticdevice = "authentik_stages_authenticator_static.staticdevice" - case stagesAuthenticatorTotpPeriodAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" - case stagesAuthenticatorTotpPeriodTotpdevice = "authentik_stages_authenticator_totp.totpdevice" - case stagesAuthenticatorValidatePeriodAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" - case stagesAuthenticatorWebauthnPeriodAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" - case stagesAuthenticatorWebauthnPeriodWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" - case stagesCaptchaPeriodCaptchastage = "authentik_stages_captcha.captchastage" - case stagesConsentPeriodConsentstage = "authentik_stages_consent.consentstage" - case stagesConsentPeriodUserconsent = "authentik_stages_consent.userconsent" - case stagesDenyPeriodDenystage = "authentik_stages_deny.denystage" - case stagesDummyPeriodDummystage = "authentik_stages_dummy.dummystage" - case stagesEmailPeriodEmailstage = "authentik_stages_email.emailstage" - case stagesIdentificationPeriodIdentificationstage = "authentik_stages_identification.identificationstage" - case stagesInvitationPeriodInvitation = "authentik_stages_invitation.invitation" - case stagesInvitationPeriodInvitationstage = "authentik_stages_invitation.invitationstage" - case stagesPasswordPeriodPasswordstage = "authentik_stages_password.passwordstage" - case stagesPromptPeriodPrompt = "authentik_stages_prompt.prompt" - case stagesPromptPeriodPromptstage = "authentik_stages_prompt.promptstage" - case stagesUserDeletePeriodUserdeletestage = "authentik_stages_user_delete.userdeletestage" - case stagesUserLoginPeriodUserloginstage = "authentik_stages_user_login.userloginstage" - case stagesUserLogoutPeriodUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" - case stagesUserWritePeriodUserwritestage = "authentik_stages_user_write.userwritestage" - case tenantsPeriodTenant = "authentik_tenants.tenant" - } - - /** - - - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License - - parameter objectPk: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByUsersList(model: Model_rbacPermissionsAssignedByUsersList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserAssignedObjectPermissionList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByUsersListWithRequestBuilder(model: model, objectPk: objectPk, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/assigned_by_users/ - - Get assigned object permissions for a single object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License - - parameter objectPk: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByUsersListWithRequestBuilder(model: Model_rbacPermissionsAssignedByUsersList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/permissions/assigned_by_users/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "model": (wrappedValue: model.encodeToJSON(), isExplode: true), - "object_pk": (wrappedValue: objectPk?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User. - - parameter patchedPermissionAssignRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsAssignedByUsersUnassignPartialUpdate(id: Int, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsAssignedByUsersUnassignPartialUpdateWithRequestBuilder(id: id, patchedPermissionAssignRequest: patchedPermissionAssignRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /rbac/permissions/assigned_by_users/{id}/unassign/ - - Unassign permission(s) to user. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User. - - parameter patchedPermissionAssignRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsAssignedByUsersUnassignPartialUpdateWithRequestBuilder(id: Int, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil) -> RequestBuilder { - var localVariablePath = "/rbac/permissions/assigned_by_users/{id}/unassign/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPermissionAssignRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter codename: (query) (optional) - - parameter contentTypeAppLabel: (query) (optional) - - parameter contentTypeModel: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter role: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsList(codename: String? = nil, contentTypeAppLabel: String? = nil, contentTypeModel: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, role: String? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPermissionList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsListWithRequestBuilder(codename: codename, contentTypeAppLabel: contentTypeAppLabel, contentTypeModel: contentTypeModel, ordering: ordering, page: page, pageSize: pageSize, role: role, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/ - - Read-only list of all permissions, filterable by model and app - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter codename: (query) (optional) - - parameter contentTypeAppLabel: (query) (optional) - - parameter contentTypeModel: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter role: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsListWithRequestBuilder(codename: String? = nil, contentTypeAppLabel: String? = nil, contentTypeModel: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, role: String? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/permissions/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "codename": (wrappedValue: codename?.encodeToJSON(), isExplode: true), - "content_type__app_label": (wrappedValue: contentTypeAppLabel?.encodeToJSON(), isExplode: true), - "content_type__model": (wrappedValue: contentTypeModel?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "role": (wrappedValue: role?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this permission. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Permission?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/{id}/ - - Read-only list of all permissions, filterable by model and app - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this permission. - - returns: RequestBuilder - */ - open class func rbacPermissionsRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/rbac/permissions/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (query) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsRolesList(uuid: UUID, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedExtraRoleObjectPermissionList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsRolesListWithRequestBuilder(uuid: uuid, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/roles/ - - Get a role's assigned object permissions - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (query) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsRolesListWithRequestBuilder(uuid: UUID, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/permissions/roles/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "uuid": (wrappedValue: uuid.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userId: (query) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacPermissionsUsersList(userId: Int, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedExtraUserObjectPermissionList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacPermissionsUsersListWithRequestBuilder(userId: userId, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/permissions/users/ - - Get a users's assigned object permissions - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userId: (query) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func rbacPermissionsUsersListWithRequestBuilder(userId: Int, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/permissions/users/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user_id": (wrappedValue: userId.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter roleRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesCreate(roleRequest: RoleRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Role?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesCreateWithRequestBuilder(roleRequest: roleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /rbac/roles/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter roleRequest: (body) - - returns: RequestBuilder - */ - open class func rbacRolesCreateWithRequestBuilder(roleRequest: RoleRequest) -> RequestBuilder { - let localVariablePath = "/rbac/roles/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: roleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesDestroy(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesDestroyWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /rbac/roles/{uuid}/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - returns: RequestBuilder - */ - open class func rbacRolesDestroyWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/rbac/roles/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter groupName: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesList(groupName: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedRoleList?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesListWithRequestBuilder(groupName: groupName, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/roles/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter groupName: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func rbacRolesListWithRequestBuilder(groupName: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/rbac/roles/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "group__name": (wrappedValue: groupName?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter patchedRoleRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesPartialUpdate(uuid: UUID, patchedRoleRequest: PatchedRoleRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Role?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesPartialUpdateWithRequestBuilder(uuid: uuid, patchedRoleRequest: patchedRoleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /rbac/roles/{uuid}/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - parameter patchedRoleRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func rbacRolesPartialUpdateWithRequestBuilder(uuid: UUID, patchedRoleRequest: PatchedRoleRequest? = nil) -> RequestBuilder { - var localVariablePath = "/rbac/roles/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedRoleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesRetrieve(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Role?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesRetrieveWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/roles/{uuid}/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - returns: RequestBuilder - */ - open class func rbacRolesRetrieveWithRequestBuilder(uuid: UUID) -> RequestBuilder { - var localVariablePath = "/rbac/roles/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter roleRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesUpdate(uuid: UUID, roleRequest: RoleRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Role?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesUpdateWithRequestBuilder(uuid: uuid, roleRequest: roleRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /rbac/roles/{uuid}/ - - Role viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - parameter roleRequest: (body) - - returns: RequestBuilder - */ - open class func rbacRolesUpdateWithRequestBuilder(uuid: UUID, roleRequest: RoleRequest) -> RequestBuilder { - var localVariablePath = "/rbac/roles/{uuid}/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: roleRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter uuid: (path) A UUID string identifying this Role. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rbacRolesUsedByList(uuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return rbacRolesUsedByListWithRequestBuilder(uuid: uuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /rbac/roles/{uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter uuid: (path) A UUID string identifying this Role. - - returns: RequestBuilder<[UsedBy]> - */ - open class func rbacRolesUsedByListWithRequestBuilder(uuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/rbac/roles/{uuid}/used_by/" - let uuidPreEscape = "\(APIHelper.mapValueToPathItem(uuid))" - let uuidPostEscape = uuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{uuid}", with: uuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/RootAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/RootAPI.swift deleted file mode 100644 index 0587e7d..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/RootAPI.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// RootAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class RootAPI { - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func rootConfigRetrieve(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Config?, _ error: Error?) -> Void)) -> RequestTask { - return rootConfigRetrieveWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /root/config/ - - Retrieve public configuration options - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder - */ - open class func rootConfigRetrieveWithRequestBuilder() -> RequestBuilder { - let localVariablePath = "/root/config/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/SchemaAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/SchemaAPI.swift deleted file mode 100644 index bcbf9eb..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/SchemaAPI.swift +++ /dev/null @@ -1,177 +0,0 @@ -// -// SchemaAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class SchemaAPI { - - /** - * enum for parameter format - */ - public enum Format_schemaRetrieve: String, CaseIterable { - case json = "json" - case yaml = "yaml" - } - - /** - * enum for parameter lang - */ - public enum Lang_schemaRetrieve: String, CaseIterable { - case af = "af" - case ar = "ar" - case arDz = "ar-dz" - case ast = "ast" - case az = "az" - case be = "be" - case bg = "bg" - case bn = "bn" - case br = "br" - case bs = "bs" - case ca = "ca" - case ckb = "ckb" - case cs = "cs" - case cy = "cy" - case da = "da" - case de = "de" - case dsb = "dsb" - case el = "el" - case en = "en" - case enAu = "en-au" - case enGb = "en-gb" - case eo = "eo" - case es = "es" - case esAr = "es-ar" - case esCo = "es-co" - case esMx = "es-mx" - case esNi = "es-ni" - case esVe = "es-ve" - case et = "et" - case eu = "eu" - case fa = "fa" - case fi = "fi" - case fr = "fr" - case fy = "fy" - case ga = "ga" - case gd = "gd" - case gl = "gl" - case he = "he" - case hi = "hi" - case hr = "hr" - case hsb = "hsb" - case hu = "hu" - case hy = "hy" - case ia = "ia" - case id = "id" - case ig = "ig" - case io = "io" - case _is = "is" - case it = "it" - case ja = "ja" - case ka = "ka" - case kab = "kab" - case kk = "kk" - case km = "km" - case kn = "kn" - case ko = "ko" - case ky = "ky" - case lb = "lb" - case lt = "lt" - case lv = "lv" - case mk = "mk" - case ml = "ml" - case mn = "mn" - case mr = "mr" - case ms = "ms" - case my = "my" - case nb = "nb" - case ne = "ne" - case nl = "nl" - case nn = "nn" - case os = "os" - case pa = "pa" - case pl = "pl" - case pt = "pt" - case ptBr = "pt-br" - case ro = "ro" - case ru = "ru" - case sk = "sk" - case sl = "sl" - case sq = "sq" - case sr = "sr" - case srLatn = "sr-latn" - case sv = "sv" - case sw = "sw" - case ta = "ta" - case te = "te" - case tg = "tg" - case th = "th" - case tk = "tk" - case tr = "tr" - case tt = "tt" - case udm = "udm" - case uk = "uk" - case ur = "ur" - case uz = "uz" - case vi = "vi" - case zhHans = "zh-hans" - case zhHant = "zh-hant" - } - - /** - - - parameter format: (query) (optional) - - parameter lang: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func schemaRetrieve(format: Format_schemaRetrieve? = nil, lang: Lang_schemaRetrieve? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: AnyCodable]?, _ error: Error?) -> Void)) -> RequestTask { - return schemaRetrieveWithRequestBuilder(format: format, lang: lang).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /schema/ - - OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter format: (query) (optional) - - parameter lang: (query) (optional) - - returns: RequestBuilder<[String: AnyCodable]> - */ - open class func schemaRetrieveWithRequestBuilder(format: Format_schemaRetrieve? = nil, lang: Lang_schemaRetrieve? = nil) -> RequestBuilder<[String: AnyCodable]> { - let localVariablePath = "/schema/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "format": (wrappedValue: format?.encodeToJSON(), isExplode: true), - "lang": (wrappedValue: lang?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[String: AnyCodable]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/SourcesAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/SourcesAPI.swift deleted file mode 100644 index 4af1180..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/SourcesAPI.swift +++ /dev/null @@ -1,3737 +0,0 @@ -// -// SourcesAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class SourcesAPI { - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/all/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesAllDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/all/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllList(managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSourceList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllListWithRequestBuilder(managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/all/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesAllListWithRequestBuilder(managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Source?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/all/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesAllRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/all/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllSetIconCreate(slug: String, file: URL? = nil, clear: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllSetIconCreateWithRequestBuilder(slug: slug, file: file, clear: clear).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/all/{slug}/set_icon/ - - Set source icon - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter file: (form) (optional) - - parameter clear: (form) (optional, default to false) - - returns: RequestBuilder - */ - open class func sourcesAllSetIconCreateWithRequestBuilder(slug: String, file: URL? = nil, clear: Bool? = nil) -> RequestBuilder { - var localVariablePath = "/sources/all/{slug}/set_icon/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableFormParams: [String: Any?] = [ - "file": file?.encodeToJSON(), - "clear": clear?.encodeToJSON(), - ] - - let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) - let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - "Content-Type": "multipart/form-data", - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter filePathRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllSetIconUrlCreateWithRequestBuilder(slug: slug, filePathRequest: filePathRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/all/{slug}/set_icon_url/ - - Set source icon (as URL) - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter filePathRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesAllSetIconUrlCreateWithRequestBuilder(slug: String, filePathRequest: FilePathRequest) -> RequestBuilder { - var localVariablePath = "/sources/all/{slug}/set_icon_url/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: filePathRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/all/types/ - - Get all creatable source types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func sourcesAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/sources/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/all/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesAllUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/all/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesAllUserSettingsList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UserSetting]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesAllUserSettingsListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/all/user_settings/ - - Get all sources the user can configure - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[UserSetting]> - */ - open class func sourcesAllUserSettingsListWithRequestBuilder() -> RequestBuilder<[UserSetting]> { - let localVariablePath = "/sources/all/user_settings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UserSetting]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter lDAPSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapCreate(lDAPSourceRequest: LDAPSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapCreateWithRequestBuilder(lDAPSourceRequest: lDAPSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/ldap/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter lDAPSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesLdapCreateWithRequestBuilder(lDAPSourceRequest: LDAPSourceRequest) -> RequestBuilder { - let localVariablePath = "/sources/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapDebugRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPDebug?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapDebugRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/ldap/{slug}/debug/ - - Get raw LDAP data to debug - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesLdapDebugRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/debug/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/ldap/{slug}/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesLdapDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter additionalGroupDn: (query) (optional) - - parameter additionalUserDn: (query) (optional) - - parameter baseDn: (query) (optional) - - parameter bindCn: (query) (optional) - - parameter clientCertificate: (query) (optional) - - parameter enabled: (query) (optional) - - parameter groupMembershipField: (query) (optional) - - parameter groupObjectFilter: (query) (optional) - - parameter name: (query) (optional) - - parameter objectUniquenessField: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter peerCertificate: (query) (optional) - - parameter propertyMappings: (query) (optional) - - parameter propertyMappingsGroup: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serverUri: (query) (optional) - - parameter slug: (query) (optional) - - parameter sni: (query) (optional) - - parameter startTls: (query) (optional) - - parameter syncGroups: (query) (optional) - - parameter syncParentGroup: (query) (optional) - - parameter syncUsers: (query) (optional) - - parameter syncUsersPassword: (query) (optional) - - parameter userObjectFilter: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapList(additionalGroupDn: String? = nil, additionalUserDn: String? = nil, baseDn: String? = nil, bindCn: String? = nil, clientCertificate: UUID? = nil, enabled: Bool? = nil, groupMembershipField: String? = nil, groupObjectFilter: String? = nil, name: String? = nil, objectUniquenessField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, peerCertificate: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, search: String? = nil, serverUri: String? = nil, slug: String? = nil, sni: Bool? = nil, startTls: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, userObjectFilter: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedLDAPSourceList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapListWithRequestBuilder(additionalGroupDn: additionalGroupDn, additionalUserDn: additionalUserDn, baseDn: baseDn, bindCn: bindCn, clientCertificate: clientCertificate, enabled: enabled, groupMembershipField: groupMembershipField, groupObjectFilter: groupObjectFilter, name: name, objectUniquenessField: objectUniquenessField, ordering: ordering, page: page, pageSize: pageSize, peerCertificate: peerCertificate, propertyMappings: propertyMappings, propertyMappingsGroup: propertyMappingsGroup, search: search, serverUri: serverUri, slug: slug, sni: sni, startTls: startTls, syncGroups: syncGroups, syncParentGroup: syncParentGroup, syncUsers: syncUsers, syncUsersPassword: syncUsersPassword, userObjectFilter: userObjectFilter).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/ldap/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter additionalGroupDn: (query) (optional) - - parameter additionalUserDn: (query) (optional) - - parameter baseDn: (query) (optional) - - parameter bindCn: (query) (optional) - - parameter clientCertificate: (query) (optional) - - parameter enabled: (query) (optional) - - parameter groupMembershipField: (query) (optional) - - parameter groupObjectFilter: (query) (optional) - - parameter name: (query) (optional) - - parameter objectUniquenessField: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter peerCertificate: (query) (optional) - - parameter propertyMappings: (query) (optional) - - parameter propertyMappingsGroup: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter serverUri: (query) (optional) - - parameter slug: (query) (optional) - - parameter sni: (query) (optional) - - parameter startTls: (query) (optional) - - parameter syncGroups: (query) (optional) - - parameter syncParentGroup: (query) (optional) - - parameter syncUsers: (query) (optional) - - parameter syncUsersPassword: (query) (optional) - - parameter userObjectFilter: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesLdapListWithRequestBuilder(additionalGroupDn: String? = nil, additionalUserDn: String? = nil, baseDn: String? = nil, bindCn: String? = nil, clientCertificate: UUID? = nil, enabled: Bool? = nil, groupMembershipField: String? = nil, groupObjectFilter: String? = nil, name: String? = nil, objectUniquenessField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, peerCertificate: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, search: String? = nil, serverUri: String? = nil, slug: String? = nil, sni: Bool? = nil, startTls: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, userObjectFilter: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/ldap/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "additional_group_dn": (wrappedValue: additionalGroupDn?.encodeToJSON(), isExplode: true), - "additional_user_dn": (wrappedValue: additionalUserDn?.encodeToJSON(), isExplode: true), - "base_dn": (wrappedValue: baseDn?.encodeToJSON(), isExplode: true), - "bind_cn": (wrappedValue: bindCn?.encodeToJSON(), isExplode: true), - "client_certificate": (wrappedValue: clientCertificate?.encodeToJSON(), isExplode: true), - "enabled": (wrappedValue: enabled?.encodeToJSON(), isExplode: true), - "group_membership_field": (wrappedValue: groupMembershipField?.encodeToJSON(), isExplode: true), - "group_object_filter": (wrappedValue: groupObjectFilter?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "object_uniqueness_field": (wrappedValue: objectUniquenessField?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "peer_certificate": (wrappedValue: peerCertificate?.encodeToJSON(), isExplode: true), - "property_mappings": (wrappedValue: propertyMappings?.encodeToJSON(), isExplode: true), - "property_mappings_group": (wrappedValue: propertyMappingsGroup?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "server_uri": (wrappedValue: serverUri?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - "sni": (wrappedValue: sni?.encodeToJSON(), isExplode: true), - "start_tls": (wrappedValue: startTls?.encodeToJSON(), isExplode: true), - "sync_groups": (wrappedValue: syncGroups?.encodeToJSON(), isExplode: true), - "sync_parent_group": (wrappedValue: syncParentGroup?.encodeToJSON(), isExplode: true), - "sync_users": (wrappedValue: syncUsers?.encodeToJSON(), isExplode: true), - "sync_users_password": (wrappedValue: syncUsersPassword?.encodeToJSON(), isExplode: true), - "user_object_filter": (wrappedValue: userObjectFilter?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedLDAPSourceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapPartialUpdate(slug: String, patchedLDAPSourceRequest: PatchedLDAPSourceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapPartialUpdateWithRequestBuilder(slug: slug, patchedLDAPSourceRequest: patchedLDAPSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/ldap/{slug}/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedLDAPSourceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesLdapPartialUpdateWithRequestBuilder(slug: String, patchedLDAPSourceRequest: PatchedLDAPSourceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedLDAPSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/ldap/{slug}/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesLdapRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapSyncStatusRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPSyncStatus?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapSyncStatusRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/ldap/{slug}/sync_status/ - - Get source's sync status - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesLdapSyncStatusRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/sync_status/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter lDAPSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapUpdate(slug: String, lDAPSourceRequest: LDAPSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: LDAPSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapUpdateWithRequestBuilder(slug: slug, lDAPSourceRequest: lDAPSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/ldap/{slug}/ - - LDAP Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter lDAPSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesLdapUpdateWithRequestBuilder(slug: String, lDAPSourceRequest: LDAPSourceRequest) -> RequestBuilder { - var localVariablePath = "/sources/ldap/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: lDAPSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesLdapUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesLdapUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/ldap/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesLdapUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/ldap/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter oAuthSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthCreate(oAuthSourceRequest: OAuthSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuthSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthCreateWithRequestBuilder(oAuthSourceRequest: oAuthSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/oauth/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter oAuthSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesOauthCreateWithRequestBuilder(oAuthSourceRequest: OAuthSourceRequest) -> RequestBuilder { - let localVariablePath = "/sources/oauth/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: oAuthSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/oauth/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesOauthDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/oauth/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter policyEngineMode - */ - public enum PolicyEngineMode_sourcesOauthList: String, CaseIterable { - case all = "all" - case any = "any" - } - - /** - * enum for parameter userMatchingMode - */ - public enum UserMatchingMode_sourcesOauthList: String, CaseIterable { - case emailDeny = "email_deny" - case emailLink = "email_link" - case identifier = "identifier" - case usernameDeny = "username_deny" - case usernameLink = "username_link" - } - - /** - - - parameter accessTokenUrl: (query) (optional) - - parameter additionalScopes: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter authorizationUrl: (query) (optional) - - parameter consumerKey: (query) (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter hasJwks: (query) Only return sources with JWKS data (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter profileUrl: (query) (optional) - - parameter providerType: (query) (optional) - - parameter requestTokenUrl: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthList(accessTokenUrl: String? = nil, additionalScopes: String? = nil, authenticationFlow: UUID? = nil, authorizationUrl: String? = nil, consumerKey: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, hasJwks: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesOauthList? = nil, profileUrl: String? = nil, providerType: String? = nil, requestTokenUrl: String? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesOauthList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedOAuthSourceList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthListWithRequestBuilder(accessTokenUrl: accessTokenUrl, additionalScopes: additionalScopes, authenticationFlow: authenticationFlow, authorizationUrl: authorizationUrl, consumerKey: consumerKey, enabled: enabled, enrollmentFlow: enrollmentFlow, hasJwks: hasJwks, name: name, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, profileUrl: profileUrl, providerType: providerType, requestTokenUrl: requestTokenUrl, search: search, slug: slug, userMatchingMode: userMatchingMode).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/oauth/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter accessTokenUrl: (query) (optional) - - parameter additionalScopes: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter authorizationUrl: (query) (optional) - - parameter consumerKey: (query) (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter hasJwks: (query) Only return sources with JWKS data (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter profileUrl: (query) (optional) - - parameter providerType: (query) (optional) - - parameter requestTokenUrl: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - returns: RequestBuilder - */ - open class func sourcesOauthListWithRequestBuilder(accessTokenUrl: String? = nil, additionalScopes: String? = nil, authenticationFlow: UUID? = nil, authorizationUrl: String? = nil, consumerKey: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, hasJwks: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesOauthList? = nil, profileUrl: String? = nil, providerType: String? = nil, requestTokenUrl: String? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesOauthList? = nil) -> RequestBuilder { - let localVariablePath = "/sources/oauth/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "access_token_url": (wrappedValue: accessTokenUrl?.encodeToJSON(), isExplode: true), - "additional_scopes": (wrappedValue: additionalScopes?.encodeToJSON(), isExplode: true), - "authentication_flow": (wrappedValue: authenticationFlow?.encodeToJSON(), isExplode: true), - "authorization_url": (wrappedValue: authorizationUrl?.encodeToJSON(), isExplode: true), - "consumer_key": (wrappedValue: consumerKey?.encodeToJSON(), isExplode: true), - "enabled": (wrappedValue: enabled?.encodeToJSON(), isExplode: true), - "enrollment_flow": (wrappedValue: enrollmentFlow?.encodeToJSON(), isExplode: true), - "has_jwks": (wrappedValue: hasJwks?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_engine_mode": (wrappedValue: policyEngineMode?.encodeToJSON(), isExplode: true), - "profile_url": (wrappedValue: profileUrl?.encodeToJSON(), isExplode: true), - "provider_type": (wrappedValue: providerType?.encodeToJSON(), isExplode: true), - "request_token_url": (wrappedValue: requestTokenUrl?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - "user_matching_mode": (wrappedValue: userMatchingMode?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedOAuthSourceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthPartialUpdate(slug: String, patchedOAuthSourceRequest: PatchedOAuthSourceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuthSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthPartialUpdateWithRequestBuilder(slug: slug, patchedOAuthSourceRequest: patchedOAuthSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/oauth/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedOAuthSourceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesOauthPartialUpdateWithRequestBuilder(slug: String, patchedOAuthSourceRequest: PatchedOAuthSourceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/oauth/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedOAuthSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuthSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/oauth/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesOauthRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/oauth/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthSourceTypesList(name: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [SourceType]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthSourceTypesListWithRequestBuilder(name: name).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/oauth/source_types/ - - Get all creatable source types. If ?name is set, only returns the type for . If isn't found, returns the default type. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - returns: RequestBuilder<[SourceType]> - */ - open class func sourcesOauthSourceTypesListWithRequestBuilder(name: String? = nil) -> RequestBuilder<[SourceType]> { - let localVariablePath = "/sources/oauth/source_types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[SourceType]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter oAuthSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthUpdate(slug: String, oAuthSourceRequest: OAuthSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: OAuthSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthUpdateWithRequestBuilder(slug: slug, oAuthSourceRequest: oAuthSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/oauth/{slug}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter oAuthSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesOauthUpdateWithRequestBuilder(slug: String, oAuthSourceRequest: OAuthSourceRequest) -> RequestBuilder { - var localVariablePath = "/sources/oauth/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: oAuthSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesOauthUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesOauthUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/oauth/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesOauthUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/oauth/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter plexSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexCreate(plexSourceRequest: PlexSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexCreateWithRequestBuilder(plexSourceRequest: plexSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/plex/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter plexSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesPlexCreateWithRequestBuilder(plexSourceRequest: PlexSourceRequest) -> RequestBuilder { - let localVariablePath = "/sources/plex/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/plex/{slug}/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesPlexDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/plex/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter policyEngineMode - */ - public enum PolicyEngineMode_sourcesPlexList: String, CaseIterable { - case all = "all" - case any = "any" - } - - /** - * enum for parameter userMatchingMode - */ - public enum UserMatchingMode_sourcesPlexList: String, CaseIterable { - case emailDeny = "email_deny" - case emailLink = "email_link" - case identifier = "identifier" - case usernameDeny = "username_deny" - case usernameLink = "username_link" - } - - /** - - - parameter allowFriends: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter clientId: (query) (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexList(allowFriends: Bool? = nil, authenticationFlow: UUID? = nil, clientId: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesPlexList? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesPlexList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPlexSourceList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexListWithRequestBuilder(allowFriends: allowFriends, authenticationFlow: authenticationFlow, clientId: clientId, enabled: enabled, enrollmentFlow: enrollmentFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, search: search, slug: slug, userMatchingMode: userMatchingMode).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/plex/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter allowFriends: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter clientId: (query) (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter search: (query) A search term. (optional) - - parameter slug: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - returns: RequestBuilder - */ - open class func sourcesPlexListWithRequestBuilder(allowFriends: Bool? = nil, authenticationFlow: UUID? = nil, clientId: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesPlexList? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesPlexList? = nil) -> RequestBuilder { - let localVariablePath = "/sources/plex/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "allow_friends": (wrappedValue: allowFriends?.encodeToJSON(), isExplode: true), - "authentication_flow": (wrappedValue: authenticationFlow?.encodeToJSON(), isExplode: true), - "client_id": (wrappedValue: clientId?.encodeToJSON(), isExplode: true), - "enabled": (wrappedValue: enabled?.encodeToJSON(), isExplode: true), - "enrollment_flow": (wrappedValue: enrollmentFlow?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_engine_mode": (wrappedValue: policyEngineMode?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - "user_matching_mode": (wrappedValue: userMatchingMode?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedPlexSourceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexPartialUpdate(slug: String, patchedPlexSourceRequest: PatchedPlexSourceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexPartialUpdateWithRequestBuilder(slug: slug, patchedPlexSourceRequest: patchedPlexSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/plex/{slug}/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedPlexSourceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesPlexPartialUpdateWithRequestBuilder(slug: String, patchedPlexSourceRequest: PatchedPlexSourceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/plex/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPlexSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter plexTokenRedeemRequest: (body) - - parameter slug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexRedeemTokenAuthenticatedCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexRedeemTokenAuthenticatedCreateWithRequestBuilder(plexTokenRedeemRequest: plexTokenRedeemRequest, slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/plex/redeem_token_authenticated/ - - Redeem a plex token for an authenticated user, creating a connection - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter plexTokenRedeemRequest: (body) - - parameter slug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesPlexRedeemTokenAuthenticatedCreateWithRequestBuilder(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/plex/redeem_token_authenticated/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexTokenRedeemRequest) - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter plexTokenRedeemRequest: (body) - - parameter slug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexRedeemTokenCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: RedirectChallenge?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexRedeemTokenCreateWithRequestBuilder(plexTokenRedeemRequest: plexTokenRedeemRequest, slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/plex/redeem_token/ - - Redeem a plex token, check it's access to resources against what's allowed for the source, and redirect to an authentication/enrollment flow. - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter plexTokenRedeemRequest: (body) - - parameter slug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesPlexRedeemTokenCreateWithRequestBuilder(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/plex/redeem_token/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexTokenRedeemRequest) - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/plex/{slug}/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesPlexRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/plex/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter plexSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexUpdate(slug: String, plexSourceRequest: PlexSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexUpdateWithRequestBuilder(slug: slug, plexSourceRequest: plexSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/plex/{slug}/ - - Plex source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter plexSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesPlexUpdateWithRequestBuilder(slug: String, plexSourceRequest: PlexSourceRequest) -> RequestBuilder { - var localVariablePath = "/sources/plex/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesPlexUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesPlexUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/plex/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesPlexUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/plex/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter sAMLSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlCreate(sAMLSourceRequest: SAMLSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlCreateWithRequestBuilder(sAMLSourceRequest: sAMLSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/saml/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter sAMLSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesSamlCreateWithRequestBuilder(sAMLSourceRequest: SAMLSourceRequest) -> RequestBuilder { - let localVariablePath = "/sources/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlDestroy(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlDestroyWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/saml/{slug}/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesSamlDestroyWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/saml/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter bindingType - */ - public enum BindingType_sourcesSamlList: String, CaseIterable { - case post = "POST" - case postAuto = "POST_AUTO" - case redirect = "REDIRECT" - } - - /** - * enum for parameter digestAlgorithm - */ - public enum DigestAlgorithm_sourcesSamlList: String, CaseIterable { - case _200009xmldsigHashSha1 = "http://www.w3.org/2000/09/xmldsig#sha1" - case _200104xmldsigMoreHashSha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" - case _200104xmlencHashSha256 = "http://www.w3.org/2001/04/xmlenc#sha256" - case _200104xmlencHashSha512 = "http://www.w3.org/2001/04/xmlenc#sha512" - } - - /** - * enum for parameter nameIdPolicy - */ - public enum NameIdPolicy_sourcesSamlList: String, CaseIterable { - case _11ColonNameidFormatColonEmailAddress = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" - case _20ColonNameidFormatColonWindowsDomainQualifiedName = "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" - case _20ColonNameidFormatColonX509SubjectName = "urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName" - case _20ColonNameidFormatColonPersistent = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - case _20ColonNameidFormatColonTransient = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" - } - - /** - * enum for parameter policyEngineMode - */ - public enum PolicyEngineMode_sourcesSamlList: String, CaseIterable { - case all = "all" - case any = "any" - } - - /** - * enum for parameter signatureAlgorithm - */ - public enum SignatureAlgorithm_sourcesSamlList: String, CaseIterable { - case _200009xmldsigHashDsaSha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" - case _200009xmldsigHashRsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" - case _200104xmldsigMoreHashRsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" - case _200104xmldsigMoreHashRsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" - case _200104xmldsigMoreHashRsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" - } - - /** - * enum for parameter userMatchingMode - */ - public enum UserMatchingMode_sourcesSamlList: String, CaseIterable { - case emailDeny = "email_deny" - case emailLink = "email_link" - case identifier = "identifier" - case usernameDeny = "username_deny" - case usernameLink = "username_link" - } - - /** - - - parameter allowIdpInitiated: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter bindingType: (query) * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation (optional) - - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter issuer: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter nameIdPolicy: (query) NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter preAuthenticationFlow: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) - - parameter signingKp: (query) (optional) - - parameter sloUrl: (query) (optional) - - parameter slug: (query) (optional) - - parameter ssoUrl: (query) (optional) - - parameter temporaryUserDeleteAfter: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - parameter verificationKp: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlList(allowIdpInitiated: Bool? = nil, authenticationFlow: UUID? = nil, bindingType: BindingType_sourcesSamlList? = nil, digestAlgorithm: DigestAlgorithm_sourcesSamlList? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, issuer: String? = nil, managed: String? = nil, name: String? = nil, nameIdPolicy: NameIdPolicy_sourcesSamlList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesSamlList? = nil, preAuthenticationFlow: UUID? = nil, search: String? = nil, signatureAlgorithm: SignatureAlgorithm_sourcesSamlList? = nil, signingKp: UUID? = nil, sloUrl: String? = nil, slug: String? = nil, ssoUrl: String? = nil, temporaryUserDeleteAfter: String? = nil, userMatchingMode: UserMatchingMode_sourcesSamlList? = nil, verificationKp: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedSAMLSourceList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlListWithRequestBuilder(allowIdpInitiated: allowIdpInitiated, authenticationFlow: authenticationFlow, bindingType: bindingType, digestAlgorithm: digestAlgorithm, enabled: enabled, enrollmentFlow: enrollmentFlow, issuer: issuer, managed: managed, name: name, nameIdPolicy: nameIdPolicy, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, preAuthenticationFlow: preAuthenticationFlow, search: search, signatureAlgorithm: signatureAlgorithm, signingKp: signingKp, sloUrl: sloUrl, slug: slug, ssoUrl: ssoUrl, temporaryUserDeleteAfter: temporaryUserDeleteAfter, userMatchingMode: userMatchingMode, verificationKp: verificationKp).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/saml/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter allowIdpInitiated: (query) (optional) - - parameter authenticationFlow: (query) (optional) - - parameter bindingType: (query) * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation (optional) - - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) - - parameter enabled: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter issuer: (query) (optional) - - parameter managed: (query) (optional) - - parameter name: (query) (optional) - - parameter nameIdPolicy: (query) NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) - - parameter preAuthenticationFlow: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) - - parameter signingKp: (query) (optional) - - parameter sloUrl: (query) (optional) - - parameter slug: (query) (optional) - - parameter ssoUrl: (query) (optional) - - parameter temporaryUserDeleteAfter: (query) (optional) - - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - - parameter verificationKp: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesSamlListWithRequestBuilder(allowIdpInitiated: Bool? = nil, authenticationFlow: UUID? = nil, bindingType: BindingType_sourcesSamlList? = nil, digestAlgorithm: DigestAlgorithm_sourcesSamlList? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, issuer: String? = nil, managed: String? = nil, name: String? = nil, nameIdPolicy: NameIdPolicy_sourcesSamlList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesSamlList? = nil, preAuthenticationFlow: UUID? = nil, search: String? = nil, signatureAlgorithm: SignatureAlgorithm_sourcesSamlList? = nil, signingKp: UUID? = nil, sloUrl: String? = nil, slug: String? = nil, ssoUrl: String? = nil, temporaryUserDeleteAfter: String? = nil, userMatchingMode: UserMatchingMode_sourcesSamlList? = nil, verificationKp: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/sources/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "allow_idp_initiated": (wrappedValue: allowIdpInitiated?.encodeToJSON(), isExplode: true), - "authentication_flow": (wrappedValue: authenticationFlow?.encodeToJSON(), isExplode: true), - "binding_type": (wrappedValue: bindingType?.encodeToJSON(), isExplode: true), - "digest_algorithm": (wrappedValue: digestAlgorithm?.encodeToJSON(), isExplode: true), - "enabled": (wrappedValue: enabled?.encodeToJSON(), isExplode: true), - "enrollment_flow": (wrappedValue: enrollmentFlow?.encodeToJSON(), isExplode: true), - "issuer": (wrappedValue: issuer?.encodeToJSON(), isExplode: true), - "managed": (wrappedValue: managed?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "name_id_policy": (wrappedValue: nameIdPolicy?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "policy_engine_mode": (wrappedValue: policyEngineMode?.encodeToJSON(), isExplode: true), - "pre_authentication_flow": (wrappedValue: preAuthenticationFlow?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "signature_algorithm": (wrappedValue: signatureAlgorithm?.encodeToJSON(), isExplode: true), - "signing_kp": (wrappedValue: signingKp?.encodeToJSON(), isExplode: true), - "slo_url": (wrappedValue: sloUrl?.encodeToJSON(), isExplode: true), - "slug": (wrappedValue: slug?.encodeToJSON(), isExplode: true), - "sso_url": (wrappedValue: ssoUrl?.encodeToJSON(), isExplode: true), - "temporary_user_delete_after": (wrappedValue: temporaryUserDeleteAfter?.encodeToJSON(), isExplode: true), - "user_matching_mode": (wrappedValue: userMatchingMode?.encodeToJSON(), isExplode: true), - "verification_kp": (wrappedValue: verificationKp?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlMetadataRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLMetadata?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlMetadataRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/saml/{slug}/metadata/ - - Return metadata as XML string - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesSamlMetadataRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/saml/{slug}/metadata/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter patchedSAMLSourceRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlPartialUpdate(slug: String, patchedSAMLSourceRequest: PatchedSAMLSourceRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlPartialUpdateWithRequestBuilder(slug: slug, patchedSAMLSourceRequest: patchedSAMLSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/saml/{slug}/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter patchedSAMLSourceRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesSamlPartialUpdateWithRequestBuilder(slug: String, patchedSAMLSourceRequest: PatchedSAMLSourceRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/saml/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedSAMLSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlRetrieve(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlRetrieveWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/saml/{slug}/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder - */ - open class func sourcesSamlRetrieveWithRequestBuilder(slug: String) -> RequestBuilder { - var localVariablePath = "/sources/saml/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter sAMLSourceRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlUpdate(slug: String, sAMLSourceRequest: SAMLSourceRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: SAMLSource?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlUpdateWithRequestBuilder(slug: slug, sAMLSourceRequest: sAMLSourceRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/saml/{slug}/ - - SAMLSource Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - parameter sAMLSourceRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesSamlUpdateWithRequestBuilder(slug: String, sAMLSourceRequest: SAMLSourceRequest) -> RequestBuilder { - var localVariablePath = "/sources/saml/{slug}/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: sAMLSourceRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter slug: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesSamlUsedByList(slug: String, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesSamlUsedByListWithRequestBuilder(slug: slug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/saml/{slug}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter slug: (path) - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesSamlUsedByListWithRequestBuilder(slug: String) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/saml/{slug}/used_by/" - let slugPreEscape = "\(APIHelper.mapValueToPathItem(slug))" - let slugPostEscape = slugPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{slug}", with: slugPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this user source connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/user_connections/all/{id}/ - - User-source connection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this user source connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsAllDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserSourceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, search: search, user: user).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/all/ - - User-source connection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter user: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsAllListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "user": (wrappedValue: user?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this user source connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllPartialUpdate(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllPartialUpdateWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/user_connections/all/{id}/ - - User-source connection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this user source connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsAllPartialUpdateWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this user source connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/all/{id}/ - - User-source connection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this user source connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsAllRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this user source connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllUpdate(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllUpdateWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/user_connections/all/{id}/ - - User-source connection Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this user source connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsAllUpdateWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/all/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this user source connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsAllUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsAllUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/all/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this user source connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesUserConnectionsAllUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/user_connections/all/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userOAuthSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthCreate(userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthCreateWithRequestBuilder(userOAuthSourceConnectionRequest: userOAuthSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/user_connections/oauth/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userOAuthSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthCreateWithRequestBuilder(userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/oauth/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userOAuthSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/user_connections/oauth/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/oauth/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserOAuthSourceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/oauth/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/oauth/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "source__slug": (wrappedValue: sourceSlug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter patchedUserOAuthSourceConnectionRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthPartialUpdate(id: Int, patchedUserOAuthSourceConnectionRequest: PatchedUserOAuthSourceConnectionRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthPartialUpdateWithRequestBuilder(id: id, patchedUserOAuthSourceConnectionRequest: patchedUserOAuthSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/user_connections/oauth/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter patchedUserOAuthSourceConnectionRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthPartialUpdateWithRequestBuilder(id: Int, patchedUserOAuthSourceConnectionRequest: PatchedUserOAuthSourceConnectionRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/oauth/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserOAuthSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/oauth/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/oauth/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter userOAuthSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthUpdate(id: Int, userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthUpdateWithRequestBuilder(id: id, userOAuthSourceConnectionRequest: userOAuthSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/user_connections/oauth/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter userOAuthSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsOauthUpdateWithRequestBuilder(id: Int, userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/oauth/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userOAuthSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsOauthUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsOauthUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/oauth/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesUserConnectionsOauthUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/user_connections/oauth/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter plexSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexCreate(plexSourceConnectionRequest: PlexSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexCreateWithRequestBuilder(plexSourceConnectionRequest: plexSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/user_connections/plex/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter plexSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexCreateWithRequestBuilder(plexSourceConnectionRequest: PlexSourceConnectionRequest) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/plex/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/user_connections/plex/{id}/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/plex/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPlexSourceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/plex/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/plex/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "source__slug": (wrappedValue: sourceSlug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter patchedPlexSourceConnectionRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexPartialUpdate(id: Int, patchedPlexSourceConnectionRequest: PatchedPlexSourceConnectionRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexPartialUpdateWithRequestBuilder(id: id, patchedPlexSourceConnectionRequest: patchedPlexSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/user_connections/plex/{id}/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter patchedPlexSourceConnectionRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexPartialUpdateWithRequestBuilder(id: Int, patchedPlexSourceConnectionRequest: PatchedPlexSourceConnectionRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/plex/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPlexSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/plex/{id}/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/plex/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter plexSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexUpdate(id: Int, plexSourceConnectionRequest: PlexSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PlexSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexUpdateWithRequestBuilder(id: id, plexSourceConnectionRequest: plexSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/user_connections/plex/{id}/ - - Plex Source connection Serializer - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter plexSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsPlexUpdateWithRequestBuilder(id: Int, plexSourceConnectionRequest: PlexSourceConnectionRequest) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/plex/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: plexSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsPlexUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsPlexUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/plex/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User Plex Source Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesUserConnectionsPlexUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/user_connections/plex/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userSAMLSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlCreate(userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlCreateWithRequestBuilder(userSAMLSourceConnectionRequest: userSAMLSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /sources/user_connections/saml/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userSAMLSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlCreateWithRequestBuilder(userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userSAMLSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlDestroy(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlDestroyWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /sources/user_connections/saml/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlDestroyWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserSAMLSourceConnectionList?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlListWithRequestBuilder(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/saml/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter sourceSlug: (query) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlListWithRequestBuilder(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> RequestBuilder { - let localVariablePath = "/sources/user_connections/saml/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "source__slug": (wrappedValue: sourceSlug?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter patchedUserSAMLSourceConnectionRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlPartialUpdate(id: Int, patchedUserSAMLSourceConnectionRequest: PatchedUserSAMLSourceConnectionRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlPartialUpdateWithRequestBuilder(id: id, patchedUserSAMLSourceConnectionRequest: patchedUserSAMLSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /sources/user_connections/saml/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter patchedUserSAMLSourceConnectionRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlPartialUpdateWithRequestBuilder(id: Int, patchedUserSAMLSourceConnectionRequest: PatchedUserSAMLSourceConnectionRequest? = nil) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserSAMLSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlRetrieve(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlRetrieveWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/saml/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlRetrieveWithRequestBuilder(id: Int) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter userSAMLSourceConnectionRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlUpdate(id: Int, userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlUpdateWithRequestBuilder(id: id, userSAMLSourceConnectionRequest: userSAMLSourceConnectionRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /sources/user_connections/saml/{id}/ - - Source Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter userSAMLSourceConnectionRequest: (body) - - returns: RequestBuilder - */ - open class func sourcesUserConnectionsSamlUpdateWithRequestBuilder(id: Int, userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest) -> RequestBuilder { - var localVariablePath = "/sources/user_connections/saml/{id}/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userSAMLSourceConnectionRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func sourcesUserConnectionsSamlUsedByList(id: Int, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return sourcesUserConnectionsSamlUsedByListWithRequestBuilder(id: id).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /sources/user_connections/saml/{id}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter id: (path) A unique integer value identifying this User SAML Source Connection. - - returns: RequestBuilder<[UsedBy]> - */ - open class func sourcesUserConnectionsSamlUsedByListWithRequestBuilder(id: Int) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/sources/user_connections/saml/{id}/used_by/" - let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" - let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/APIs/StagesAPI.swift b/authentikClient/Classes/OpenAPIs/APIs/StagesAPI.swift deleted file mode 100644 index 723f682..0000000 --- a/authentikClient/Classes/OpenAPIs/APIs/StagesAPI.swift +++ /dev/null @@ -1,8233 +0,0 @@ -// -// StagesAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class StagesAPI { - - /** - - - parameter stageUuid: (path) A UUID string identifying this stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/all/{stage_uuid}/ - - Stage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this stage. - - returns: RequestBuilder - */ - open class func stagesAllDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/all/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/all/ - - Stage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesAllListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/all/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Stage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/all/{stage_uuid}/ - - Stage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this stage. - - returns: RequestBuilder - */ - open class func stagesAllRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/all/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllTypesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllTypesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/all/types/ - - Get all creatable stage types - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func stagesAllTypesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/stages/all/types/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/all/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAllUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/all/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAllUserSettingsList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UserSetting]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAllUserSettingsListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/all/user_settings/ - - Get all stages the user can configure - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[UserSetting]> - */ - open class func stagesAllUserSettingsListWithRequestBuilder() -> RequestBuilder<[UserSetting]> { - let localVariablePath = "/stages/all/user_settings/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UserSetting]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticatorDuoStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoCreate(authenticatorDuoStageRequest: AuthenticatorDuoStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoCreateWithRequestBuilder(authenticatorDuoStageRequest: authenticatorDuoStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/duo/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorDuoStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoCreateWithRequestBuilder(authenticatorDuoStageRequest: AuthenticatorDuoStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/duo/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorDuoStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/duo/{stage_uuid}/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoEnrollmentStatusCreate(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DuoDeviceEnrollmentStatus?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoEnrollmentStatusCreateWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/duo/{stage_uuid}/enrollment_status/ - - Check enrollment status of user details in current session - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoEnrollmentStatusCreateWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/enrollment_status/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter authenticatorDuoStageManualDeviceImportRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoImportDeviceManualCreate(stageUuid: UUID, authenticatorDuoStageManualDeviceImportRequest: AuthenticatorDuoStageManualDeviceImportRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoImportDeviceManualCreateWithRequestBuilder(stageUuid: stageUuid, authenticatorDuoStageManualDeviceImportRequest: authenticatorDuoStageManualDeviceImportRequest).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/duo/{stage_uuid}/import_device_manual/ - - Import duo devices into authentik - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter authenticatorDuoStageManualDeviceImportRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoImportDeviceManualCreateWithRequestBuilder(stageUuid: UUID, authenticatorDuoStageManualDeviceImportRequest: AuthenticatorDuoStageManualDeviceImportRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/import_device_manual/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorDuoStageManualDeviceImportRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoImportDevicesAutomaticCreate(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorDuoStageDeviceImportResponse?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoImportDevicesAutomaticCreateWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/ - - Import duo devices into authentik - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoImportDevicesAutomaticCreateWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/import_devices_automatic/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiHostname: (query) (optional) - - parameter clientId: (query) (optional) - - parameter configureFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoList(apiHostname: String? = nil, clientId: String? = nil, configureFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatorDuoStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoListWithRequestBuilder(apiHostname: apiHostname, clientId: clientId, configureFlow: configureFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/duo/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter apiHostname: (query) (optional) - - parameter clientId: (query) (optional) - - parameter configureFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoListWithRequestBuilder(apiHostname: String? = nil, clientId: String? = nil, configureFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/duo/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "api_hostname": (wrappedValue: apiHostname?.encodeToJSON(), isExplode: true), - "client_id": (wrappedValue: clientId?.encodeToJSON(), isExplode: true), - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter patchedAuthenticatorDuoStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoPartialUpdate(stageUuid: UUID, patchedAuthenticatorDuoStageRequest: PatchedAuthenticatorDuoStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticatorDuoStageRequest: patchedAuthenticatorDuoStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/duo/{stage_uuid}/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter patchedAuthenticatorDuoStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticatorDuoStageRequest: PatchedAuthenticatorDuoStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticatorDuoStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/duo/{stage_uuid}/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter authenticatorDuoStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoUpdate(stageUuid: UUID, authenticatorDuoStageRequest: AuthenticatorDuoStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoUpdateWithRequestBuilder(stageUuid: stageUuid, authenticatorDuoStageRequest: authenticatorDuoStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/duo/{stage_uuid}/ - - AuthenticatorDuoStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter authenticatorDuoStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorDuoUpdateWithRequestBuilder(stageUuid: UUID, authenticatorDuoStageRequest: AuthenticatorDuoStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorDuoStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorDuoUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorDuoUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/duo/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorDuoUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/duo/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticatorSMSStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsCreate(authenticatorSMSStageRequest: AuthenticatorSMSStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsCreateWithRequestBuilder(authenticatorSMSStageRequest: authenticatorSMSStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/sms/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorSMSStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsCreateWithRequestBuilder(authenticatorSMSStageRequest: AuthenticatorSMSStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/sms/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorSMSStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/sms/{stage_uuid}/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/sms/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter authType - */ - public enum AuthType_stagesAuthenticatorSmsList: String, CaseIterable { - case basic = "basic" - case bearer = "bearer" - } - - /** - * enum for parameter provider - */ - public enum Provider_stagesAuthenticatorSmsList: String, CaseIterable { - case generic = "generic" - case twilio = "twilio" - } - - /** - - - parameter accountSid: (query) (optional) - - parameter auth: (query) (optional) - - parameter authPassword: (query) (optional) - - parameter authType: (query) * `basic` - Basic * `bearer` - Bearer (optional) - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter fromNumber: (query) (optional) - - parameter mapping: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) * `twilio` - Twilio * `generic` - Generic (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter verifyOnly: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsList(accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: AuthType_stagesAuthenticatorSmsList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, fromNumber: String? = nil, mapping: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Provider_stagesAuthenticatorSmsList? = nil, search: String? = nil, stageUuid: UUID? = nil, verifyOnly: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatorSMSStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsListWithRequestBuilder(accountSid: accountSid, auth: auth, authPassword: authPassword, authType: authType, configureFlow: configureFlow, friendlyName: friendlyName, fromNumber: fromNumber, mapping: mapping, name: name, ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, stageUuid: stageUuid, verifyOnly: verifyOnly).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/sms/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter accountSid: (query) (optional) - - parameter auth: (query) (optional) - - parameter authPassword: (query) (optional) - - parameter authType: (query) * `basic` - Basic * `bearer` - Bearer (optional) - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter fromNumber: (query) (optional) - - parameter mapping: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter provider: (query) * `twilio` - Twilio * `generic` - Generic (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter verifyOnly: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsListWithRequestBuilder(accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: AuthType_stagesAuthenticatorSmsList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, fromNumber: String? = nil, mapping: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Provider_stagesAuthenticatorSmsList? = nil, search: String? = nil, stageUuid: UUID? = nil, verifyOnly: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/sms/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "account_sid": (wrappedValue: accountSid?.encodeToJSON(), isExplode: true), - "auth": (wrappedValue: auth?.encodeToJSON(), isExplode: true), - "auth_password": (wrappedValue: authPassword?.encodeToJSON(), isExplode: true), - "auth_type": (wrappedValue: authType?.encodeToJSON(), isExplode: true), - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "friendly_name": (wrappedValue: friendlyName?.encodeToJSON(), isExplode: true), - "from_number": (wrappedValue: fromNumber?.encodeToJSON(), isExplode: true), - "mapping": (wrappedValue: mapping?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "provider": (wrappedValue: provider?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "verify_only": (wrappedValue: verifyOnly?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter patchedAuthenticatorSMSStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsPartialUpdate(stageUuid: UUID, patchedAuthenticatorSMSStageRequest: PatchedAuthenticatorSMSStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticatorSMSStageRequest: patchedAuthenticatorSMSStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/sms/{stage_uuid}/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter patchedAuthenticatorSMSStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticatorSMSStageRequest: PatchedAuthenticatorSMSStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/sms/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticatorSMSStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/sms/{stage_uuid}/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/sms/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter authenticatorSMSStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsUpdate(stageUuid: UUID, authenticatorSMSStageRequest: AuthenticatorSMSStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsUpdateWithRequestBuilder(stageUuid: stageUuid, authenticatorSMSStageRequest: authenticatorSMSStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/sms/{stage_uuid}/ - - AuthenticatorSMSStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter authenticatorSMSStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorSmsUpdateWithRequestBuilder(stageUuid: UUID, authenticatorSMSStageRequest: AuthenticatorSMSStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/sms/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorSMSStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorSmsUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorSmsUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/sms/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorSmsUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/sms/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticatorStaticStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticCreate(authenticatorStaticStageRequest: AuthenticatorStaticStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticCreateWithRequestBuilder(authenticatorStaticStageRequest: authenticatorStaticStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/static/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorStaticStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticCreateWithRequestBuilder(authenticatorStaticStageRequest: AuthenticatorStaticStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/static/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorStaticStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/static/{stage_uuid}/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/static/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter tokenCount: (query) (optional) - - parameter tokenLength: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticList(configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatorStaticStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticListWithRequestBuilder(configureFlow: configureFlow, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, tokenCount: tokenCount, tokenLength: tokenLength).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/static/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter tokenCount: (query) (optional) - - parameter tokenLength: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticListWithRequestBuilder(configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/static/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "friendly_name": (wrappedValue: friendlyName?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "token_count": (wrappedValue: tokenCount?.encodeToJSON(), isExplode: true), - "token_length": (wrappedValue: tokenLength?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter patchedAuthenticatorStaticStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticPartialUpdate(stageUuid: UUID, patchedAuthenticatorStaticStageRequest: PatchedAuthenticatorStaticStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticatorStaticStageRequest: patchedAuthenticatorStaticStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/static/{stage_uuid}/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter patchedAuthenticatorStaticStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticatorStaticStageRequest: PatchedAuthenticatorStaticStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/static/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticatorStaticStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/static/{stage_uuid}/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/static/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter authenticatorStaticStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticUpdate(stageUuid: UUID, authenticatorStaticStageRequest: AuthenticatorStaticStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticUpdateWithRequestBuilder(stageUuid: stageUuid, authenticatorStaticStageRequest: authenticatorStaticStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/static/{stage_uuid}/ - - AuthenticatorStaticStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter authenticatorStaticStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorStaticUpdateWithRequestBuilder(stageUuid: UUID, authenticatorStaticStageRequest: AuthenticatorStaticStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/static/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorStaticStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorStaticUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorStaticUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/static/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorStaticUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/static/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticatorTOTPStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpCreate(authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpCreateWithRequestBuilder(authenticatorTOTPStageRequest: authenticatorTOTPStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/totp/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorTOTPStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpCreateWithRequestBuilder(authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/totp/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorTOTPStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/totp/{stage_uuid}/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/totp/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter digits - */ - public enum Digits_stagesAuthenticatorTotpList: String, CaseIterable { - case _6 = "6" - case _8 = "8" - } - - /** - - - parameter configureFlow: (query) (optional) - - parameter digits: (query) * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpList(configureFlow: UUID? = nil, digits: Digits_stagesAuthenticatorTotpList? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatorTOTPStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpListWithRequestBuilder(configureFlow: configureFlow, digits: digits, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/totp/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter configureFlow: (query) (optional) - - parameter digits: (query) * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpListWithRequestBuilder(configureFlow: UUID? = nil, digits: Digits_stagesAuthenticatorTotpList? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/totp/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "digits": (wrappedValue: digits?.encodeToJSON(), isExplode: true), - "friendly_name": (wrappedValue: friendlyName?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter patchedAuthenticatorTOTPStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpPartialUpdate(stageUuid: UUID, patchedAuthenticatorTOTPStageRequest: PatchedAuthenticatorTOTPStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticatorTOTPStageRequest: patchedAuthenticatorTOTPStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/totp/{stage_uuid}/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter patchedAuthenticatorTOTPStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticatorTOTPStageRequest: PatchedAuthenticatorTOTPStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/totp/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticatorTOTPStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/totp/{stage_uuid}/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/totp/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter authenticatorTOTPStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpUpdate(stageUuid: UUID, authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpUpdateWithRequestBuilder(stageUuid: stageUuid, authenticatorTOTPStageRequest: authenticatorTOTPStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/totp/{stage_uuid}/ - - AuthenticatorTOTPStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter authenticatorTOTPStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorTotpUpdateWithRequestBuilder(stageUuid: UUID, authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/totp/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorTOTPStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorTotpUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorTotpUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/totp/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorTotpUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/totp/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticatorValidateStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateCreate(authenticatorValidateStageRequest: AuthenticatorValidateStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateCreateWithRequestBuilder(authenticatorValidateStageRequest: authenticatorValidateStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/validate/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorValidateStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidateCreateWithRequestBuilder(authenticatorValidateStageRequest: AuthenticatorValidateStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/validate/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorValidateStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/validate/{stage_uuid}/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidateDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/validate/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter notConfiguredAction - */ - public enum NotConfiguredAction_stagesAuthenticatorValidateList: String, CaseIterable { - case configure = "configure" - case deny = "deny" - case skip = "skip" - } - - /** - - - parameter configurationStages: (query) (optional) - - parameter name: (query) (optional) - - parameter notConfiguredAction: (query) * `skip` - Skip * `deny` - Deny * `configure` - Configure (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateList(configurationStages: [UUID]? = nil, name: String? = nil, notConfiguredAction: NotConfiguredAction_stagesAuthenticatorValidateList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticatorValidateStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateListWithRequestBuilder(configurationStages: configurationStages, name: name, notConfiguredAction: notConfiguredAction, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/validate/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter configurationStages: (query) (optional) - - parameter name: (query) (optional) - - parameter notConfiguredAction: (query) * `skip` - Skip * `deny` - Deny * `configure` - Configure (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidateListWithRequestBuilder(configurationStages: [UUID]? = nil, name: String? = nil, notConfiguredAction: NotConfiguredAction_stagesAuthenticatorValidateList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/validate/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "configuration_stages": (wrappedValue: configurationStages?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "not_configured_action": (wrappedValue: notConfiguredAction?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter patchedAuthenticatorValidateStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidatePartialUpdate(stageUuid: UUID, patchedAuthenticatorValidateStageRequest: PatchedAuthenticatorValidateStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidatePartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticatorValidateStageRequest: patchedAuthenticatorValidateStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/validate/{stage_uuid}/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter patchedAuthenticatorValidateStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidatePartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticatorValidateStageRequest: PatchedAuthenticatorValidateStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/validate/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticatorValidateStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/validate/{stage_uuid}/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidateRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/validate/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter authenticatorValidateStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateUpdate(stageUuid: UUID, authenticatorValidateStageRequest: AuthenticatorValidateStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateUpdateWithRequestBuilder(stageUuid: stageUuid, authenticatorValidateStageRequest: authenticatorValidateStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/validate/{stage_uuid}/ - - AuthenticatorValidateStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter authenticatorValidateStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorValidateUpdateWithRequestBuilder(stageUuid: UUID, authenticatorValidateStageRequest: AuthenticatorValidateStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/validate/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticatorValidateStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorValidateUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorValidateUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/validate/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorValidateUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/validate/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter authenticateWebAuthnStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnCreate(authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnCreateWithRequestBuilder(authenticateWebAuthnStageRequest: authenticateWebAuthnStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/authenticator/webauthn/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticateWebAuthnStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnCreateWithRequestBuilder(authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/webauthn/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticateWebAuthnStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/authenticator/webauthn/{stage_uuid}/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/webauthn/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter authenticatorAttachment - */ - public enum AuthenticatorAttachment_stagesAuthenticatorWebauthnList: String, CaseIterable { - case crossPlatform = "cross-platform" - case platform = "platform" - } - - /** - * enum for parameter residentKeyRequirement - */ - public enum ResidentKeyRequirement_stagesAuthenticatorWebauthnList: String, CaseIterable { - case discouraged = "discouraged" - case preferred = "preferred" - case _required = "required" - } - - /** - * enum for parameter userVerification - */ - public enum UserVerification_stagesAuthenticatorWebauthnList: String, CaseIterable { - case discouraged = "discouraged" - case preferred = "preferred" - case _required = "required" - } - - /** - - - parameter authenticatorAttachment: (query) * `platform` - Platform * `cross-platform` - Cross Platform (optional) - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter residentKeyRequirement: (query) * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter userVerification: (query) * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnList(authenticatorAttachment: AuthenticatorAttachment_stagesAuthenticatorWebauthnList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, residentKeyRequirement: ResidentKeyRequirement_stagesAuthenticatorWebauthnList? = nil, search: String? = nil, stageUuid: UUID? = nil, userVerification: UserVerification_stagesAuthenticatorWebauthnList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedAuthenticateWebAuthnStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnListWithRequestBuilder(authenticatorAttachment: authenticatorAttachment, configureFlow: configureFlow, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, residentKeyRequirement: residentKeyRequirement, search: search, stageUuid: stageUuid, userVerification: userVerification).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/webauthn/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter authenticatorAttachment: (query) * `platform` - Platform * `cross-platform` - Cross Platform (optional) - - parameter configureFlow: (query) (optional) - - parameter friendlyName: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter residentKeyRequirement: (query) * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter userVerification: (query) * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnListWithRequestBuilder(authenticatorAttachment: AuthenticatorAttachment_stagesAuthenticatorWebauthnList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, residentKeyRequirement: ResidentKeyRequirement_stagesAuthenticatorWebauthnList? = nil, search: String? = nil, stageUuid: UUID? = nil, userVerification: UserVerification_stagesAuthenticatorWebauthnList? = nil) -> RequestBuilder { - let localVariablePath = "/stages/authenticator/webauthn/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "authenticator_attachment": (wrappedValue: authenticatorAttachment?.encodeToJSON(), isExplode: true), - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "friendly_name": (wrappedValue: friendlyName?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "resident_key_requirement": (wrappedValue: residentKeyRequirement?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "user_verification": (wrappedValue: userVerification?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter patchedAuthenticateWebAuthnStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnPartialUpdate(stageUuid: UUID, patchedAuthenticateWebAuthnStageRequest: PatchedAuthenticateWebAuthnStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedAuthenticateWebAuthnStageRequest: patchedAuthenticateWebAuthnStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/authenticator/webauthn/{stage_uuid}/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter patchedAuthenticateWebAuthnStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedAuthenticateWebAuthnStageRequest: PatchedAuthenticateWebAuthnStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/webauthn/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedAuthenticateWebAuthnStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/webauthn/{stage_uuid}/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/webauthn/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter authenticateWebAuthnStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnUpdate(stageUuid: UUID, authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnUpdateWithRequestBuilder(stageUuid: stageUuid, authenticateWebAuthnStageRequest: authenticateWebAuthnStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/authenticator/webauthn/{stage_uuid}/ - - AuthenticateWebAuthnStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter authenticateWebAuthnStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesAuthenticatorWebauthnUpdateWithRequestBuilder(stageUuid: UUID, authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/authenticator/webauthn/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: authenticateWebAuthnStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesAuthenticatorWebauthnUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesAuthenticatorWebauthnUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/authenticator/webauthn/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesAuthenticatorWebauthnUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/authenticator/webauthn/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter captchaStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaCreate(captchaStageRequest: CaptchaStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CaptchaStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaCreateWithRequestBuilder(captchaStageRequest: captchaStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/captcha/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter captchaStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesCaptchaCreateWithRequestBuilder(captchaStageRequest: CaptchaStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/captcha/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: captchaStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/captcha/{stage_uuid}/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - returns: RequestBuilder - */ - open class func stagesCaptchaDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/captcha/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter publicKey: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, publicKey: String? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedCaptchaStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, publicKey: publicKey, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/captcha/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter publicKey: (query) (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesCaptchaListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, publicKey: String? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/captcha/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "public_key": (wrappedValue: publicKey?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter patchedCaptchaStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaPartialUpdate(stageUuid: UUID, patchedCaptchaStageRequest: PatchedCaptchaStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CaptchaStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedCaptchaStageRequest: patchedCaptchaStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/captcha/{stage_uuid}/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter patchedCaptchaStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesCaptchaPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedCaptchaStageRequest: PatchedCaptchaStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/captcha/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedCaptchaStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CaptchaStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/captcha/{stage_uuid}/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - returns: RequestBuilder - */ - open class func stagesCaptchaRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/captcha/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter captchaStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaUpdate(stageUuid: UUID, captchaStageRequest: CaptchaStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: CaptchaStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaUpdateWithRequestBuilder(stageUuid: stageUuid, captchaStageRequest: captchaStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/captcha/{stage_uuid}/ - - CaptchaStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter captchaStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesCaptchaUpdateWithRequestBuilder(stageUuid: UUID, captchaStageRequest: CaptchaStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/captcha/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: captchaStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesCaptchaUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesCaptchaUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/captcha/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesCaptchaUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/captcha/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter consentStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentCreate(consentStageRequest: ConsentStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ConsentStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentCreateWithRequestBuilder(consentStageRequest: consentStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/consent/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter consentStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesConsentCreateWithRequestBuilder(consentStageRequest: ConsentStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/consent/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: consentStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/consent/{stage_uuid}/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - returns: RequestBuilder - */ - open class func stagesConsentDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/consent/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter mode - */ - public enum Mode_stagesConsentList: String, CaseIterable { - case alwaysRequire = "always_require" - case expiring = "expiring" - case permanent = "permanent" - } - - /** - - - parameter consentExpireIn: (query) (optional) - - parameter mode: (query) * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentList(consentExpireIn: String? = nil, mode: Mode_stagesConsentList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedConsentStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentListWithRequestBuilder(consentExpireIn: consentExpireIn, mode: mode, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/consent/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter consentExpireIn: (query) (optional) - - parameter mode: (query) * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesConsentListWithRequestBuilder(consentExpireIn: String? = nil, mode: Mode_stagesConsentList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/consent/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "consent_expire_in": (wrappedValue: consentExpireIn?.encodeToJSON(), isExplode: true), - "mode": (wrappedValue: mode?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter patchedConsentStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentPartialUpdate(stageUuid: UUID, patchedConsentStageRequest: PatchedConsentStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ConsentStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedConsentStageRequest: patchedConsentStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/consent/{stage_uuid}/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter patchedConsentStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesConsentPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedConsentStageRequest: PatchedConsentStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/consent/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedConsentStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ConsentStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/consent/{stage_uuid}/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - returns: RequestBuilder - */ - open class func stagesConsentRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/consent/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter consentStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentUpdate(stageUuid: UUID, consentStageRequest: ConsentStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: ConsentStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentUpdateWithRequestBuilder(stageUuid: stageUuid, consentStageRequest: consentStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/consent/{stage_uuid}/ - - ConsentStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter consentStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesConsentUpdateWithRequestBuilder(stageUuid: UUID, consentStageRequest: ConsentStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/consent/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: consentStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesConsentUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesConsentUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/consent/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Consent Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesConsentUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/consent/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter denyStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyCreate(denyStageRequest: DenyStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DenyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyCreateWithRequestBuilder(denyStageRequest: denyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/deny/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter denyStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesDenyCreateWithRequestBuilder(denyStageRequest: DenyStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/deny/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: denyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/deny/{stage_uuid}/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - returns: RequestBuilder - */ - open class func stagesDenyDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/deny/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter denyMessage: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyList(denyMessage: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDenyStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyListWithRequestBuilder(denyMessage: denyMessage, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/deny/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter denyMessage: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesDenyListWithRequestBuilder(denyMessage: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/deny/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "deny_message": (wrappedValue: denyMessage?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter patchedDenyStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyPartialUpdate(stageUuid: UUID, patchedDenyStageRequest: PatchedDenyStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DenyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedDenyStageRequest: patchedDenyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/deny/{stage_uuid}/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter patchedDenyStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesDenyPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedDenyStageRequest: PatchedDenyStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/deny/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDenyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DenyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/deny/{stage_uuid}/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - returns: RequestBuilder - */ - open class func stagesDenyRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/deny/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter denyStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyUpdate(stageUuid: UUID, denyStageRequest: DenyStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DenyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyUpdateWithRequestBuilder(stageUuid: stageUuid, denyStageRequest: denyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/deny/{stage_uuid}/ - - DenyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter denyStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesDenyUpdateWithRequestBuilder(stageUuid: UUID, denyStageRequest: DenyStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/deny/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: denyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDenyUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDenyUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/deny/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Deny Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesDenyUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/deny/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter dummyStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyCreate(dummyStageRequest: DummyStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyCreateWithRequestBuilder(dummyStageRequest: dummyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/dummy/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter dummyStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesDummyCreateWithRequestBuilder(dummyStageRequest: DummyStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/dummy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dummyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/dummy/{stage_uuid}/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - returns: RequestBuilder - */ - open class func stagesDummyDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/dummy/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter throwError: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, throwError: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedDummyStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, throwError: throwError).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/dummy/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter throwError: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesDummyListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, throwError: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/stages/dummy/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "throw_error": (wrappedValue: throwError?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter patchedDummyStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyPartialUpdate(stageUuid: UUID, patchedDummyStageRequest: PatchedDummyStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedDummyStageRequest: patchedDummyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/dummy/{stage_uuid}/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter patchedDummyStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesDummyPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedDummyStageRequest: PatchedDummyStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/dummy/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedDummyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/dummy/{stage_uuid}/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - returns: RequestBuilder - */ - open class func stagesDummyRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/dummy/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter dummyStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyUpdate(stageUuid: UUID, dummyStageRequest: DummyStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: DummyStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyUpdateWithRequestBuilder(stageUuid: stageUuid, dummyStageRequest: dummyStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/dummy/{stage_uuid}/ - - DummyStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter dummyStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesDummyUpdateWithRequestBuilder(stageUuid: UUID, dummyStageRequest: DummyStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/dummy/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: dummyStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesDummyUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesDummyUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/dummy/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesDummyUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/dummy/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter emailStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailCreate(emailStageRequest: EmailStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EmailStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailCreateWithRequestBuilder(emailStageRequest: emailStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/email/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter emailStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesEmailCreateWithRequestBuilder(emailStageRequest: EmailStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/email/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: emailStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/email/{stage_uuid}/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - returns: RequestBuilder - */ - open class func stagesEmailDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/email/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter activateUserOnSuccess: (query) (optional) - - parameter fromAddress: (query) (optional) - - parameter host: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter port: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter subject: (query) (optional) - - parameter template: (query) (optional) - - parameter timeout: (query) (optional) - - parameter tokenExpiry: (query) (optional) - - parameter useGlobalSettings: (query) (optional) - - parameter useSsl: (query) (optional) - - parameter useTls: (query) (optional) - - parameter username: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailList(activateUserOnSuccess: Bool? = nil, fromAddress: String? = nil, host: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, port: Int? = nil, search: String? = nil, subject: String? = nil, template: String? = nil, timeout: Int? = nil, tokenExpiry: Int? = nil, useGlobalSettings: Bool? = nil, useSsl: Bool? = nil, useTls: Bool? = nil, username: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedEmailStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailListWithRequestBuilder(activateUserOnSuccess: activateUserOnSuccess, fromAddress: fromAddress, host: host, name: name, ordering: ordering, page: page, pageSize: pageSize, port: port, search: search, subject: subject, template: template, timeout: timeout, tokenExpiry: tokenExpiry, useGlobalSettings: useGlobalSettings, useSsl: useSsl, useTls: useTls, username: username).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/email/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter activateUserOnSuccess: (query) (optional) - - parameter fromAddress: (query) (optional) - - parameter host: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter port: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter subject: (query) (optional) - - parameter template: (query) (optional) - - parameter timeout: (query) (optional) - - parameter tokenExpiry: (query) (optional) - - parameter useGlobalSettings: (query) (optional) - - parameter useSsl: (query) (optional) - - parameter useTls: (query) (optional) - - parameter username: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesEmailListWithRequestBuilder(activateUserOnSuccess: Bool? = nil, fromAddress: String? = nil, host: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, port: Int? = nil, search: String? = nil, subject: String? = nil, template: String? = nil, timeout: Int? = nil, tokenExpiry: Int? = nil, useGlobalSettings: Bool? = nil, useSsl: Bool? = nil, useTls: Bool? = nil, username: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/email/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "activate_user_on_success": (wrappedValue: activateUserOnSuccess?.encodeToJSON(), isExplode: true), - "from_address": (wrappedValue: fromAddress?.encodeToJSON(), isExplode: true), - "host": (wrappedValue: host?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "port": (wrappedValue: port?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "subject": (wrappedValue: subject?.encodeToJSON(), isExplode: true), - "template": (wrappedValue: template?.encodeToJSON(), isExplode: true), - "timeout": (wrappedValue: timeout?.encodeToJSON(), isExplode: true), - "token_expiry": (wrappedValue: tokenExpiry?.encodeToJSON(), isExplode: true), - "use_global_settings": (wrappedValue: useGlobalSettings?.encodeToJSON(), isExplode: true), - "use_ssl": (wrappedValue: useSsl?.encodeToJSON(), isExplode: true), - "use_tls": (wrappedValue: useTls?.encodeToJSON(), isExplode: true), - "username": (wrappedValue: username?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter patchedEmailStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailPartialUpdate(stageUuid: UUID, patchedEmailStageRequest: PatchedEmailStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EmailStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedEmailStageRequest: patchedEmailStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/email/{stage_uuid}/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter patchedEmailStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesEmailPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedEmailStageRequest: PatchedEmailStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/email/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedEmailStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EmailStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/email/{stage_uuid}/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - returns: RequestBuilder - */ - open class func stagesEmailRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/email/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailTemplatesList(apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [TypeCreate]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailTemplatesListWithRequestBuilder().execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/email/templates/ - - Get all available templates, including custom templates - - API Key: - - type: apiKey Authorization - - name: authentik - - returns: RequestBuilder<[TypeCreate]> - */ - open class func stagesEmailTemplatesListWithRequestBuilder() -> RequestBuilder<[TypeCreate]> { - let localVariablePath = "/stages/email/templates/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[TypeCreate]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter emailStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailUpdate(stageUuid: UUID, emailStageRequest: EmailStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: EmailStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailUpdateWithRequestBuilder(stageUuid: stageUuid, emailStageRequest: emailStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/email/{stage_uuid}/ - - EmailStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter emailStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesEmailUpdateWithRequestBuilder(stageUuid: UUID, emailStageRequest: EmailStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/email/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: emailStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesEmailUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesEmailUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/email/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Email Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesEmailUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/email/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter identificationStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationCreate(identificationStageRequest: IdentificationStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: IdentificationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationCreateWithRequestBuilder(identificationStageRequest: identificationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/identification/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter identificationStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesIdentificationCreateWithRequestBuilder(identificationStageRequest: IdentificationStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/identification/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: identificationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/identification/{stage_uuid}/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - returns: RequestBuilder - */ - open class func stagesIdentificationDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/identification/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter caseInsensitiveMatching: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter passwordStage: (query) (optional) - - parameter passwordlessFlow: (query) (optional) - - parameter recoveryFlow: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter showMatchedUser: (query) (optional) - - parameter showSourceLabels: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationList(caseInsensitiveMatching: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordStage: UUID? = nil, passwordlessFlow: UUID? = nil, recoveryFlow: UUID? = nil, search: String? = nil, showMatchedUser: Bool? = nil, showSourceLabels: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedIdentificationStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationListWithRequestBuilder(caseInsensitiveMatching: caseInsensitiveMatching, enrollmentFlow: enrollmentFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, passwordStage: passwordStage, passwordlessFlow: passwordlessFlow, recoveryFlow: recoveryFlow, search: search, showMatchedUser: showMatchedUser, showSourceLabels: showSourceLabels).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/identification/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter caseInsensitiveMatching: (query) (optional) - - parameter enrollmentFlow: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter passwordStage: (query) (optional) - - parameter passwordlessFlow: (query) (optional) - - parameter recoveryFlow: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter showMatchedUser: (query) (optional) - - parameter showSourceLabels: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesIdentificationListWithRequestBuilder(caseInsensitiveMatching: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordStage: UUID? = nil, passwordlessFlow: UUID? = nil, recoveryFlow: UUID? = nil, search: String? = nil, showMatchedUser: Bool? = nil, showSourceLabels: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/stages/identification/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "case_insensitive_matching": (wrappedValue: caseInsensitiveMatching?.encodeToJSON(), isExplode: true), - "enrollment_flow": (wrappedValue: enrollmentFlow?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "password_stage": (wrappedValue: passwordStage?.encodeToJSON(), isExplode: true), - "passwordless_flow": (wrappedValue: passwordlessFlow?.encodeToJSON(), isExplode: true), - "recovery_flow": (wrappedValue: recoveryFlow?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "show_matched_user": (wrappedValue: showMatchedUser?.encodeToJSON(), isExplode: true), - "show_source_labels": (wrappedValue: showSourceLabels?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter patchedIdentificationStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationPartialUpdate(stageUuid: UUID, patchedIdentificationStageRequest: PatchedIdentificationStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: IdentificationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedIdentificationStageRequest: patchedIdentificationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/identification/{stage_uuid}/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter patchedIdentificationStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesIdentificationPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedIdentificationStageRequest: PatchedIdentificationStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/identification/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedIdentificationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: IdentificationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/identification/{stage_uuid}/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - returns: RequestBuilder - */ - open class func stagesIdentificationRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/identification/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter identificationStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationUpdate(stageUuid: UUID, identificationStageRequest: IdentificationStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: IdentificationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationUpdateWithRequestBuilder(stageUuid: stageUuid, identificationStageRequest: identificationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/identification/{stage_uuid}/ - - IdentificationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter identificationStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesIdentificationUpdateWithRequestBuilder(stageUuid: UUID, identificationStageRequest: IdentificationStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/identification/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: identificationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesIdentificationUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesIdentificationUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/identification/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Identification Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesIdentificationUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/identification/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter invitationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsCreate(invitationRequest: InvitationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Invitation?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsCreateWithRequestBuilder(invitationRequest: invitationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/invitation/invitations/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter invitationRequest: (body) - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsCreateWithRequestBuilder(invitationRequest: InvitationRequest) -> RequestBuilder { - let localVariablePath = "/stages/invitation/invitations/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: invitationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsDestroy(inviteUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsDestroyWithRequestBuilder(inviteUuid: inviteUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/invitation/invitations/{invite_uuid}/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsDestroyWithRequestBuilder(inviteUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/invitation/invitations/{invite_uuid}/" - let inviteUuidPreEscape = "\(APIHelper.mapValueToPathItem(inviteUuid))" - let inviteUuidPostEscape = inviteUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{invite_uuid}", with: inviteUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter createdByUsername: (query) (optional) - - parameter expires: (query) (optional) - - parameter flowSlug: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsList(createdByUsername: String? = nil, expires: Date? = nil, flowSlug: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedInvitationList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsListWithRequestBuilder(createdByUsername: createdByUsername, expires: expires, flowSlug: flowSlug, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/invitations/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter createdByUsername: (query) (optional) - - parameter expires: (query) (optional) - - parameter flowSlug: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsListWithRequestBuilder(createdByUsername: String? = nil, expires: Date? = nil, flowSlug: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/invitation/invitations/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "created_by__username": (wrappedValue: createdByUsername?.encodeToJSON(), isExplode: true), - "expires": (wrappedValue: expires?.encodeToJSON(), isExplode: true), - "flow__slug": (wrappedValue: flowSlug?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter patchedInvitationRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsPartialUpdate(inviteUuid: UUID, patchedInvitationRequest: PatchedInvitationRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Invitation?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsPartialUpdateWithRequestBuilder(inviteUuid: inviteUuid, patchedInvitationRequest: patchedInvitationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/invitation/invitations/{invite_uuid}/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter patchedInvitationRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsPartialUpdateWithRequestBuilder(inviteUuid: UUID, patchedInvitationRequest: PatchedInvitationRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/invitation/invitations/{invite_uuid}/" - let inviteUuidPreEscape = "\(APIHelper.mapValueToPathItem(inviteUuid))" - let inviteUuidPostEscape = inviteUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{invite_uuid}", with: inviteUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedInvitationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsRetrieve(inviteUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Invitation?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsRetrieveWithRequestBuilder(inviteUuid: inviteUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/invitations/{invite_uuid}/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsRetrieveWithRequestBuilder(inviteUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/invitation/invitations/{invite_uuid}/" - let inviteUuidPreEscape = "\(APIHelper.mapValueToPathItem(inviteUuid))" - let inviteUuidPostEscape = inviteUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{invite_uuid}", with: inviteUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter invitationRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsUpdate(inviteUuid: UUID, invitationRequest: InvitationRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Invitation?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsUpdateWithRequestBuilder(inviteUuid: inviteUuid, invitationRequest: invitationRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/invitation/invitations/{invite_uuid}/ - - Invitation Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter invitationRequest: (body) - - returns: RequestBuilder - */ - open class func stagesInvitationInvitationsUpdateWithRequestBuilder(inviteUuid: UUID, invitationRequest: InvitationRequest) -> RequestBuilder { - var localVariablePath = "/stages/invitation/invitations/{invite_uuid}/" - let inviteUuidPreEscape = "\(APIHelper.mapValueToPathItem(inviteUuid))" - let inviteUuidPostEscape = inviteUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{invite_uuid}", with: inviteUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: invitationRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationInvitationsUsedByList(inviteUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationInvitationsUsedByListWithRequestBuilder(inviteUuid: inviteUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/invitations/{invite_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter inviteUuid: (path) A UUID string identifying this Invitation. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesInvitationInvitationsUsedByListWithRequestBuilder(inviteUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/invitation/invitations/{invite_uuid}/used_by/" - let inviteUuidPreEscape = "\(APIHelper.mapValueToPathItem(inviteUuid))" - let inviteUuidPostEscape = inviteUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{invite_uuid}", with: inviteUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter invitationStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesCreate(invitationStageRequest: InvitationStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: InvitationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesCreateWithRequestBuilder(invitationStageRequest: invitationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/invitation/stages/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter invitationStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesInvitationStagesCreateWithRequestBuilder(invitationStageRequest: InvitationStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/invitation/stages/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: invitationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/invitation/stages/{stage_uuid}/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - returns: RequestBuilder - */ - open class func stagesInvitationStagesDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/invitation/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter continueFlowWithoutInvitation: (query) (optional) - - parameter name: (query) (optional) - - parameter noFlows: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesList(continueFlowWithoutInvitation: Bool? = nil, name: String? = nil, noFlows: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedInvitationStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesListWithRequestBuilder(continueFlowWithoutInvitation: continueFlowWithoutInvitation, name: name, noFlows: noFlows, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/stages/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter continueFlowWithoutInvitation: (query) (optional) - - parameter name: (query) (optional) - - parameter noFlows: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesInvitationStagesListWithRequestBuilder(continueFlowWithoutInvitation: Bool? = nil, name: String? = nil, noFlows: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/invitation/stages/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "continue_flow_without_invitation": (wrappedValue: continueFlowWithoutInvitation?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "no_flows": (wrappedValue: noFlows?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter patchedInvitationStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesPartialUpdate(stageUuid: UUID, patchedInvitationStageRequest: PatchedInvitationStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: InvitationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedInvitationStageRequest: patchedInvitationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/invitation/stages/{stage_uuid}/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter patchedInvitationStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesInvitationStagesPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedInvitationStageRequest: PatchedInvitationStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/invitation/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedInvitationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: InvitationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/stages/{stage_uuid}/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - returns: RequestBuilder - */ - open class func stagesInvitationStagesRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/invitation/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter invitationStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesUpdate(stageUuid: UUID, invitationStageRequest: InvitationStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: InvitationStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesUpdateWithRequestBuilder(stageUuid: stageUuid, invitationStageRequest: invitationStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/invitation/stages/{stage_uuid}/ - - InvitationStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter invitationStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesInvitationStagesUpdateWithRequestBuilder(stageUuid: UUID, invitationStageRequest: InvitationStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/invitation/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: invitationStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesInvitationStagesUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesInvitationStagesUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/invitation/stages/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesInvitationStagesUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/invitation/stages/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter passwordStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordCreate(passwordStageRequest: PasswordStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordCreateWithRequestBuilder(passwordStageRequest: passwordStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/password/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter passwordStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPasswordCreateWithRequestBuilder(passwordStageRequest: PasswordStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/password/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/password/{stage_uuid}/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - returns: RequestBuilder - */ - open class func stagesPasswordDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/password/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter configureFlow: (query) (optional) - - parameter failedAttemptsBeforeCancel: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordList(configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPasswordStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordListWithRequestBuilder(configureFlow: configureFlow, failedAttemptsBeforeCancel: failedAttemptsBeforeCancel, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/password/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter configureFlow: (query) (optional) - - parameter failedAttemptsBeforeCancel: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - returns: RequestBuilder - */ - open class func stagesPasswordListWithRequestBuilder(configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> RequestBuilder { - let localVariablePath = "/stages/password/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "configure_flow": (wrappedValue: configureFlow?.encodeToJSON(), isExplode: true), - "failed_attempts_before_cancel": (wrappedValue: failedAttemptsBeforeCancel?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter patchedPasswordStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordPartialUpdate(stageUuid: UUID, patchedPasswordStageRequest: PatchedPasswordStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedPasswordStageRequest: patchedPasswordStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/password/{stage_uuid}/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter patchedPasswordStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesPasswordPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedPasswordStageRequest: PatchedPasswordStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/password/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPasswordStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/password/{stage_uuid}/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - returns: RequestBuilder - */ - open class func stagesPasswordRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/password/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter passwordStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordUpdate(stageUuid: UUID, passwordStageRequest: PasswordStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PasswordStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordUpdateWithRequestBuilder(stageUuid: stageUuid, passwordStageRequest: passwordStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/password/{stage_uuid}/ - - PasswordStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter passwordStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPasswordUpdateWithRequestBuilder(stageUuid: UUID, passwordStageRequest: PasswordStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/password/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: passwordStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPasswordUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPasswordUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/password/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Password Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesPasswordUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/password/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsCreate(promptRequest: PromptRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Prompt?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsCreateWithRequestBuilder(promptRequest: promptRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/prompt/prompts/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPromptPromptsCreateWithRequestBuilder(promptRequest: PromptRequest) -> RequestBuilder { - let localVariablePath = "/stages/prompt/prompts/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: promptRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsDestroy(promptUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsDestroyWithRequestBuilder(promptUuid: promptUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/prompt/prompts/{prompt_uuid}/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - returns: RequestBuilder - */ - open class func stagesPromptPromptsDestroyWithRequestBuilder(promptUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/prompt/prompts/{prompt_uuid}/" - let promptUuidPreEscape = "\(APIHelper.mapValueToPathItem(promptUuid))" - let promptUuidPostEscape = promptUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{prompt_uuid}", with: promptUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter type - */ - public enum ModelType_stagesPromptPromptsList: String, CaseIterable { - case akLocale = "ak-locale" - case checkbox = "checkbox" - case date = "date" - case dateTime = "date-time" - case dropdown = "dropdown" - case email = "email" - case file = "file" - case hidden = "hidden" - case number = "number" - case password = "password" - case radioButtonGroup = "radio-button-group" - case separator = "separator" - case _static = "static" - case text = "text" - case textArea = "text_area" - case textAreaReadOnly = "text_area_read_only" - case textReadOnly = "text_read_only" - case username = "username" - } - - /** - - - parameter fieldKey: (query) (optional) - - parameter label: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter placeholder: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter type: (query) * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsList(fieldKey: String? = nil, label: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, placeholder: String? = nil, search: String? = nil, type: ModelType_stagesPromptPromptsList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPromptList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsListWithRequestBuilder(fieldKey: fieldKey, label: label, name: name, ordering: ordering, page: page, pageSize: pageSize, placeholder: placeholder, search: search, type: type).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/prompts/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fieldKey: (query) (optional) - - parameter label: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter placeholder: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter type: (query) * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports (optional) - - returns: RequestBuilder - */ - open class func stagesPromptPromptsListWithRequestBuilder(fieldKey: String? = nil, label: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, placeholder: String? = nil, search: String? = nil, type: ModelType_stagesPromptPromptsList? = nil) -> RequestBuilder { - let localVariablePath = "/stages/prompt/prompts/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "field_key": (wrappedValue: fieldKey?.encodeToJSON(), isExplode: true), - "label": (wrappedValue: label?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "placeholder": (wrappedValue: placeholder?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "type": (wrappedValue: type?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter patchedPromptRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsPartialUpdate(promptUuid: UUID, patchedPromptRequest: PatchedPromptRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Prompt?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsPartialUpdateWithRequestBuilder(promptUuid: promptUuid, patchedPromptRequest: patchedPromptRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/prompt/prompts/{prompt_uuid}/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter patchedPromptRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesPromptPromptsPartialUpdateWithRequestBuilder(promptUuid: UUID, patchedPromptRequest: PatchedPromptRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/prompt/prompts/{prompt_uuid}/" - let promptUuidPreEscape = "\(APIHelper.mapValueToPathItem(promptUuid))" - let promptUuidPostEscape = promptUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{prompt_uuid}", with: promptUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPromptRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsPreviewCreate(promptRequest: PromptRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PromptChallenge?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsPreviewCreateWithRequestBuilder(promptRequest: promptRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/prompt/prompts/preview/ - - Preview a prompt as a challenge, just like a flow would receive - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPromptPromptsPreviewCreateWithRequestBuilder(promptRequest: PromptRequest) -> RequestBuilder { - let localVariablePath = "/stages/prompt/prompts/preview/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: promptRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsRetrieve(promptUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Prompt?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsRetrieveWithRequestBuilder(promptUuid: promptUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/prompts/{prompt_uuid}/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - returns: RequestBuilder - */ - open class func stagesPromptPromptsRetrieveWithRequestBuilder(promptUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/prompt/prompts/{prompt_uuid}/" - let promptUuidPreEscape = "\(APIHelper.mapValueToPathItem(promptUuid))" - let promptUuidPostEscape = promptUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{prompt_uuid}", with: promptUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter promptRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsUpdate(promptUuid: UUID, promptRequest: PromptRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Prompt?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsUpdateWithRequestBuilder(promptUuid: promptUuid, promptRequest: promptRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/prompt/prompts/{prompt_uuid}/ - - Prompt Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter promptRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPromptPromptsUpdateWithRequestBuilder(promptUuid: UUID, promptRequest: PromptRequest) -> RequestBuilder { - var localVariablePath = "/stages/prompt/prompts/{prompt_uuid}/" - let promptUuidPreEscape = "\(APIHelper.mapValueToPathItem(promptUuid))" - let promptUuidPostEscape = promptUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{prompt_uuid}", with: promptUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: promptRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptPromptsUsedByList(promptUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptPromptsUsedByListWithRequestBuilder(promptUuid: promptUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/prompts/{prompt_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptUuid: (path) A UUID string identifying this Prompt. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesPromptPromptsUsedByListWithRequestBuilder(promptUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/prompt/prompts/{prompt_uuid}/used_by/" - let promptUuidPreEscape = "\(APIHelper.mapValueToPathItem(promptUuid))" - let promptUuidPostEscape = promptUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{prompt_uuid}", with: promptUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter promptStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesCreate(promptStageRequest: PromptStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PromptStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesCreateWithRequestBuilder(promptStageRequest: promptStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/prompt/stages/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter promptStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPromptStagesCreateWithRequestBuilder(promptStageRequest: PromptStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/prompt/stages/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: promptStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/prompt/stages/{stage_uuid}/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - returns: RequestBuilder - */ - open class func stagesPromptStagesDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/prompt/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter fields: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter validationPolicies: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesList(fields: [UUID]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, validationPolicies: [UUID]? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedPromptStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesListWithRequestBuilder(fields: fields, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, validationPolicies: validationPolicies).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/stages/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter fields: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter validationPolicies: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesPromptStagesListWithRequestBuilder(fields: [UUID]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, validationPolicies: [UUID]? = nil) -> RequestBuilder { - let localVariablePath = "/stages/prompt/stages/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "fields": (wrappedValue: fields?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "validation_policies": (wrappedValue: validationPolicies?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter patchedPromptStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesPartialUpdate(stageUuid: UUID, patchedPromptStageRequest: PatchedPromptStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PromptStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedPromptStageRequest: patchedPromptStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/prompt/stages/{stage_uuid}/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter patchedPromptStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesPromptStagesPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedPromptStageRequest: PatchedPromptStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/prompt/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedPromptStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PromptStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/stages/{stage_uuid}/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - returns: RequestBuilder - */ - open class func stagesPromptStagesRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/prompt/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter promptStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesUpdate(stageUuid: UUID, promptStageRequest: PromptStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PromptStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesUpdateWithRequestBuilder(stageUuid: stageUuid, promptStageRequest: promptStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/prompt/stages/{stage_uuid}/ - - PromptStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter promptStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesPromptStagesUpdateWithRequestBuilder(stageUuid: UUID, promptStageRequest: PromptStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/prompt/stages/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: promptStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesPromptStagesUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesPromptStagesUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/prompt/stages/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesPromptStagesUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/prompt/stages/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userDeleteStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteCreate(userDeleteStageRequest: UserDeleteStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserDeleteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteCreateWithRequestBuilder(userDeleteStageRequest: userDeleteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/user_delete/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userDeleteStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserDeleteCreateWithRequestBuilder(userDeleteStageRequest: UserDeleteStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/user_delete/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userDeleteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/user_delete/{stage_uuid}/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - returns: RequestBuilder - */ - open class func stagesUserDeleteDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_delete/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserDeleteStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_delete/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesUserDeleteListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/user_delete/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter patchedUserDeleteStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeletePartialUpdate(stageUuid: UUID, patchedUserDeleteStageRequest: PatchedUserDeleteStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserDeleteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeletePartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedUserDeleteStageRequest: patchedUserDeleteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/user_delete/{stage_uuid}/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter patchedUserDeleteStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesUserDeletePartialUpdateWithRequestBuilder(stageUuid: UUID, patchedUserDeleteStageRequest: PatchedUserDeleteStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/user_delete/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserDeleteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserDeleteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_delete/{stage_uuid}/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - returns: RequestBuilder - */ - open class func stagesUserDeleteRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_delete/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter userDeleteStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteUpdate(stageUuid: UUID, userDeleteStageRequest: UserDeleteStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserDeleteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteUpdateWithRequestBuilder(stageUuid: stageUuid, userDeleteStageRequest: userDeleteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/user_delete/{stage_uuid}/ - - UserDeleteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter userDeleteStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserDeleteUpdateWithRequestBuilder(stageUuid: UUID, userDeleteStageRequest: UserDeleteStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/user_delete/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userDeleteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserDeleteUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserDeleteUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_delete/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesUserDeleteUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/user_delete/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userLoginStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginCreate(userLoginStageRequest: UserLoginStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLoginStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginCreateWithRequestBuilder(userLoginStageRequest: userLoginStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/user_login/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userLoginStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserLoginCreateWithRequestBuilder(userLoginStageRequest: UserLoginStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/user_login/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userLoginStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/user_login/{stage_uuid}/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - returns: RequestBuilder - */ - open class func stagesUserLoginDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_login/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter rememberMeOffset: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter sessionDuration: (query) (optional) - - parameter stageUuid: (query) (optional) - - parameter terminateOtherSessions: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, rememberMeOffset: String? = nil, search: String? = nil, sessionDuration: String? = nil, stageUuid: UUID? = nil, terminateOtherSessions: Bool? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserLoginStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, rememberMeOffset: rememberMeOffset, search: search, sessionDuration: sessionDuration, stageUuid: stageUuid, terminateOtherSessions: terminateOtherSessions).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_login/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter rememberMeOffset: (query) (optional) - - parameter search: (query) A search term. (optional) - - parameter sessionDuration: (query) (optional) - - parameter stageUuid: (query) (optional) - - parameter terminateOtherSessions: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesUserLoginListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, rememberMeOffset: String? = nil, search: String? = nil, sessionDuration: String? = nil, stageUuid: UUID? = nil, terminateOtherSessions: Bool? = nil) -> RequestBuilder { - let localVariablePath = "/stages/user_login/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "remember_me_offset": (wrappedValue: rememberMeOffset?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "session_duration": (wrappedValue: sessionDuration?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "terminate_other_sessions": (wrappedValue: terminateOtherSessions?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter patchedUserLoginStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginPartialUpdate(stageUuid: UUID, patchedUserLoginStageRequest: PatchedUserLoginStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLoginStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedUserLoginStageRequest: patchedUserLoginStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/user_login/{stage_uuid}/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter patchedUserLoginStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesUserLoginPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedUserLoginStageRequest: PatchedUserLoginStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/user_login/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserLoginStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLoginStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_login/{stage_uuid}/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - returns: RequestBuilder - */ - open class func stagesUserLoginRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_login/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter userLoginStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginUpdate(stageUuid: UUID, userLoginStageRequest: UserLoginStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLoginStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginUpdateWithRequestBuilder(stageUuid: stageUuid, userLoginStageRequest: userLoginStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/user_login/{stage_uuid}/ - - UserLoginStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter userLoginStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserLoginUpdateWithRequestBuilder(stageUuid: UUID, userLoginStageRequest: UserLoginStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/user_login/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userLoginStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLoginUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLoginUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_login/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Login Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesUserLoginUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/user_login/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userLogoutStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutCreate(userLogoutStageRequest: UserLogoutStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLogoutStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutCreateWithRequestBuilder(userLogoutStageRequest: userLogoutStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/user_logout/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userLogoutStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserLogoutCreateWithRequestBuilder(userLogoutStageRequest: UserLogoutStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/user_logout/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userLogoutStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/user_logout/{stage_uuid}/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - returns: RequestBuilder - */ - open class func stagesUserLogoutDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_logout/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserLogoutStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutListWithRequestBuilder(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_logout/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - returns: RequestBuilder - */ - open class func stagesUserLogoutListWithRequestBuilder(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> RequestBuilder { - let localVariablePath = "/stages/user_logout/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter patchedUserLogoutStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutPartialUpdate(stageUuid: UUID, patchedUserLogoutStageRequest: PatchedUserLogoutStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLogoutStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutPartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedUserLogoutStageRequest: patchedUserLogoutStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/user_logout/{stage_uuid}/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter patchedUserLogoutStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesUserLogoutPartialUpdateWithRequestBuilder(stageUuid: UUID, patchedUserLogoutStageRequest: PatchedUserLogoutStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/user_logout/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserLogoutStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLogoutStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_logout/{stage_uuid}/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - returns: RequestBuilder - */ - open class func stagesUserLogoutRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_logout/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter userLogoutStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutUpdate(stageUuid: UUID, userLogoutStageRequest: UserLogoutStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserLogoutStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutUpdateWithRequestBuilder(stageUuid: stageUuid, userLogoutStageRequest: userLogoutStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/user_logout/{stage_uuid}/ - - UserLogoutStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter userLogoutStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserLogoutUpdateWithRequestBuilder(stageUuid: UUID, userLogoutStageRequest: UserLogoutStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/user_logout/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userLogoutStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserLogoutUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserLogoutUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_logout/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesUserLogoutUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/user_logout/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter userWriteStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteCreate(userWriteStageRequest: UserWriteStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserWriteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteCreateWithRequestBuilder(userWriteStageRequest: userWriteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - POST /stages/user_write/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter userWriteStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserWriteCreateWithRequestBuilder(userWriteStageRequest: UserWriteStageRequest) -> RequestBuilder { - let localVariablePath = "/stages/user_write/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userWriteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteDestroy(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteDestroyWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case .success: - completion((), nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - DELETE /stages/user_write/{stage_uuid}/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - returns: RequestBuilder - */ - open class func stagesUserWriteDestroyWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_write/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - * enum for parameter userCreationMode - */ - public enum UserCreationMode_stagesUserWriteList: String, CaseIterable { - case alwaysCreate = "always_create" - case createWhenRequired = "create_when_required" - case neverCreate = "never_create" - } - - /** - * enum for parameter userType - */ - public enum UserType_stagesUserWriteList: String, CaseIterable { - case external = "external" - case _internal = "internal" - case internalServiceAccount = "internal_service_account" - case serviceAccount = "service_account" - } - - /** - - - parameter createUsersAsInactive: (query) (optional) - - parameter createUsersGroup: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter userCreationMode: (query) * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create (optional) - - parameter userPathTemplate: (query) (optional) - - parameter userType: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteList(createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, userCreationMode: UserCreationMode_stagesUserWriteList? = nil, userPathTemplate: String? = nil, userType: UserType_stagesUserWriteList? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: PaginatedUserWriteStageList?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteListWithRequestBuilder(createUsersAsInactive: createUsersAsInactive, createUsersGroup: createUsersGroup, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, userCreationMode: userCreationMode, userPathTemplate: userPathTemplate, userType: userType).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_write/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter createUsersAsInactive: (query) (optional) - - parameter createUsersGroup: (query) (optional) - - parameter name: (query) (optional) - - parameter ordering: (query) Which field to use when ordering the results. (optional) - - parameter page: (query) A page number within the paginated result set. (optional) - - parameter pageSize: (query) Number of results to return per page. (optional) - - parameter search: (query) A search term. (optional) - - parameter stageUuid: (query) (optional) - - parameter userCreationMode: (query) * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create (optional) - - parameter userPathTemplate: (query) (optional) - - parameter userType: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) - - returns: RequestBuilder - */ - open class func stagesUserWriteListWithRequestBuilder(createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, userCreationMode: UserCreationMode_stagesUserWriteList? = nil, userPathTemplate: String? = nil, userType: UserType_stagesUserWriteList? = nil) -> RequestBuilder { - let localVariablePath = "/stages/user_write/" - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "create_users_as_inactive": (wrappedValue: createUsersAsInactive?.encodeToJSON(), isExplode: true), - "create_users_group": (wrappedValue: createUsersGroup?.encodeToJSON(), isExplode: true), - "name": (wrappedValue: name?.encodeToJSON(), isExplode: true), - "ordering": (wrappedValue: ordering?.encodeToJSON(), isExplode: true), - "page": (wrappedValue: page?.encodeToJSON(), isExplode: true), - "page_size": (wrappedValue: pageSize?.encodeToJSON(), isExplode: true), - "search": (wrappedValue: search?.encodeToJSON(), isExplode: true), - "stage_uuid": (wrappedValue: stageUuid?.encodeToJSON(), isExplode: true), - "user_creation_mode": (wrappedValue: userCreationMode?.encodeToJSON(), isExplode: true), - "user_path_template": (wrappedValue: userPathTemplate?.encodeToJSON(), isExplode: true), - "user_type": (wrappedValue: userType?.encodeToJSON(), isExplode: true), - ]) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter patchedUserWriteStageRequest: (body) (optional) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWritePartialUpdate(stageUuid: UUID, patchedUserWriteStageRequest: PatchedUserWriteStageRequest? = nil, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserWriteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWritePartialUpdateWithRequestBuilder(stageUuid: stageUuid, patchedUserWriteStageRequest: patchedUserWriteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PATCH /stages/user_write/{stage_uuid}/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter patchedUserWriteStageRequest: (body) (optional) - - returns: RequestBuilder - */ - open class func stagesUserWritePartialUpdateWithRequestBuilder(stageUuid: UUID, patchedUserWriteStageRequest: PatchedUserWriteStageRequest? = nil) -> RequestBuilder { - var localVariablePath = "/stages/user_write/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: patchedUserWriteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteRetrieve(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserWriteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteRetrieveWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_write/{stage_uuid}/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - returns: RequestBuilder - */ - open class func stagesUserWriteRetrieveWithRequestBuilder(stageUuid: UUID) -> RequestBuilder { - var localVariablePath = "/stages/user_write/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter userWriteStageRequest: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteUpdate(stageUuid: UUID, userWriteStageRequest: UserWriteStageRequest, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: UserWriteStage?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteUpdateWithRequestBuilder(stageUuid: stageUuid, userWriteStageRequest: userWriteStageRequest).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - PUT /stages/user_write/{stage_uuid}/ - - UserWriteStage Viewset - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter userWriteStageRequest: (body) - - returns: RequestBuilder - */ - open class func stagesUserWriteUpdateWithRequestBuilder(stageUuid: UUID, userWriteStageRequest: UserWriteStageRequest) -> RequestBuilder { - var localVariablePath = "/stages/user_write/{stage_uuid}/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: userWriteStageRequest) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } - - /** - - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func stagesUserWriteUsedByList(stageUuid: UUID, apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, completion: @escaping ((_ data: [UsedBy]?, _ error: Error?) -> Void)) -> RequestTask { - return stagesUserWriteUsedByListWithRequestBuilder(stageUuid: stageUuid).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - - GET /stages/user_write/{stage_uuid}/used_by/ - - Get a list of all objects that use this object - - API Key: - - type: apiKey Authorization - - name: authentik - - parameter stageUuid: (path) A UUID string identifying this User Write Stage. - - returns: RequestBuilder<[UsedBy]> - */ - open class func stagesUserWriteUsedByListWithRequestBuilder(stageUuid: UUID) -> RequestBuilder<[UsedBy]> { - var localVariablePath = "/stages/user_write/{stage_uuid}/used_by/" - let stageUuidPreEscape = "\(APIHelper.mapValueToPathItem(stageUuid))" - let stageUuidPostEscape = stageUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{stage_uuid}", with: stageUuidPostEscape, options: .literal, range: nil) - let localVariableURLString = authentikClientAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder<[UsedBy]>.Type = authentikClientAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) - } -} diff --git a/authentikClient/Classes/OpenAPIs/CodableHelper.swift b/authentikClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 09c82e5..0000000 --- a/authentikClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class CodableHelper { - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() - - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return customDateFormatter ?? defaultDateFormatter } - set { customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return customJSONDecoder ?? defaultJSONDecoder } - set { customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return customJSONEncoder ?? defaultJSONEncoder } - set { customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> Swift.Result where T: Decodable { - return Swift.Result { try jsonDecoder.decode(type, from: data) } - } - - open class func encode(_ value: T) -> Swift.Result where T: Encodable { - return Swift.Result { try jsonEncoder.encode(value) } - } -} diff --git a/authentikClient/Classes/OpenAPIs/Configuration.swift b/authentikClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index 8fb0533..0000000 --- a/authentikClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" -} diff --git a/authentikClient/Classes/OpenAPIs/Extensions.swift b/authentikClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 0b17438..0000000 --- a/authentikClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,193 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { self } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Set: JSONEncodable { - func encodeToJSON() -> Any { - return Array(self).encodeToJSON() - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) - } -} - -extension JSONEncodable where Self: Encodable { - func encodeToJSON() -> Any { - guard let data = try? CodableHelper.jsonEncoder.encode(self) else { - fatalError("Could not encode to json: \(self)") - } - return data.encodeToJSON() - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - -extension HTTPURLResponse { - var isStatusCodeSuccessful: Bool { - return (200 ..< 300).contains(statusCode) - } -} diff --git a/authentikClient/Classes/OpenAPIs/JSONDataEncoding.swift b/authentikClient/Classes/OpenAPIs/JSONDataEncoding.swift deleted file mode 100644 index b79e9f5..0000000 --- a/authentikClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct JSONDataEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { - var urlRequest = urlRequest - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? - if let jsonData = jsonData, !jsonData.isEmpty { - var params: [String: Any] = [:] - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/authentikClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/authentikClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 02f78ff..0000000 --- a/authentikClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - do { - let data = try encodeResult.get() - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error.localizedDescription) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error.localizedDescription) - return nil - } - } - - return params - } - -} diff --git a/authentikClient/Classes/OpenAPIs/Models.swift b/authentikClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 21aad0c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,119 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -/// An enum where the last case value can be used as a default catch-all. -protocol CaseIterableDefaultsLast: Decodable & CaseIterable & RawRepresentable -where RawValue: Decodable, AllCases: BidirectionalCollection {} - -extension CaseIterableDefaultsLast { - /// Initializes an enum such that if a known raw value is found, then it is decoded. - /// Otherwise the last case is used. - /// - Parameter decoder: A decoder. - public init(from decoder: Decoder) throws { - if let value = try Self(rawValue: decoder.singleValueContainer().decode(RawValue.self)) { - self = value - } else if let lastValue = Self.allCases.last { - self = lastValue - } else { - throw DecodingError.valueNotFound( - Self.Type.self, - .init(codingPath: decoder.codingPath, debugDescription: "CaseIterableDefaultsLast") - ) - } - } -} - -/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) -/// or not encoded (`.encodeNothing`). Intended for request payloads. -public enum NullEncodable: Hashable { - case encodeNothing - case encodeNull - case encodeValue(Wrapped) -} - -extension NullEncodable: Codable where Wrapped: Codable { - public init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - if let value = try? container.decode(Wrapped.self) { - self = .encodeValue(value) - } else if container.decodeNil() { - self = .encodeNull - } else { - self = .encodeNothing - } - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - switch self { - case .encodeNothing: return - case .encodeNull: try container.encodeNil() - case .encodeValue(let wrapped): try container.encode(wrapped) - } - } -} - -public enum ErrorResponse: Error { - case error(Int, Data?, URLResponse?, Error) -} - -public enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum DecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case unsuccessfulHTTPStatusCode - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T - - public init(statusCode: Int, header: [String: String], body: T) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for (key, value) in rawHeader { - if let key = key.base as? String, let value = value as? String { - header[key] = value - } - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} - -public final class RequestTask { - private var task: URLSessionTask? - - internal func set(task: URLSessionTask) { - self.task = task - } - - public func cancel() { - task?.cancel() - task = nil - } -} diff --git a/authentikClient/Classes/OpenAPIs/Models/AccessDeniedChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AccessDeniedChallenge.swift deleted file mode 100644 index 3cf06b8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AccessDeniedChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AccessDeniedChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge when a flow's active stage calls `stage_invalid()`. */ -public struct AccessDeniedChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-access-denied" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var errorMessage: String? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-access-denied", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, errorMessage: String? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.errorMessage = errorMessage - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case errorMessage = "error_message" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encodeIfPresent(errorMessage, forKey: .errorMessage) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/App.swift b/authentikClient/Classes/OpenAPIs/Models/App.swift deleted file mode 100644 index 1b06880..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/App.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// App.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serialize Application info */ -public struct App: Codable, JSONEncodable, Hashable { - - public var name: String - public var label: String - - public init(name: String, label: String) { - self.name = name - self.label = label - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case label - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(label, forKey: .label) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AppEnum.swift b/authentikClient/Classes/OpenAPIs/Models/AppEnum.swift deleted file mode 100644 index be6fc46..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AppEnum.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// AppEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise */ -public enum AppEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case admin = "authentik.admin" - case api = "authentik.api" - case crypto = "authentik.crypto" - case events = "authentik.events" - case flows = "authentik.flows" - case outposts = "authentik.outposts" - case policiesPeriodDummy = "authentik.policies.dummy" - case policiesPeriodEventMatcher = "authentik.policies.event_matcher" - case policiesPeriodExpiry = "authentik.policies.expiry" - case policiesPeriodExpression = "authentik.policies.expression" - case policiesPeriodPassword = "authentik.policies.password" - case policiesPeriodReputation = "authentik.policies.reputation" - case policies = "authentik.policies" - case providersPeriodLdap = "authentik.providers.ldap" - case providersPeriodOauth2 = "authentik.providers.oauth2" - case providersPeriodProxy = "authentik.providers.proxy" - case providersPeriodRadius = "authentik.providers.radius" - case providersPeriodSaml = "authentik.providers.saml" - case providersPeriodScim = "authentik.providers.scim" - case rbac = "authentik.rbac" - case recovery = "authentik.recovery" - case sourcesPeriodLdap = "authentik.sources.ldap" - case sourcesPeriodOauth = "authentik.sources.oauth" - case sourcesPeriodPlex = "authentik.sources.plex" - case sourcesPeriodSaml = "authentik.sources.saml" - case stagesPeriodAuthenticator = "authentik.stages.authenticator" - case stagesPeriodAuthenticatorDuo = "authentik.stages.authenticator_duo" - case stagesPeriodAuthenticatorSms = "authentik.stages.authenticator_sms" - case stagesPeriodAuthenticatorStatic = "authentik.stages.authenticator_static" - case stagesPeriodAuthenticatorTotp = "authentik.stages.authenticator_totp" - case stagesPeriodAuthenticatorValidate = "authentik.stages.authenticator_validate" - case stagesPeriodAuthenticatorWebauthn = "authentik.stages.authenticator_webauthn" - case stagesPeriodCaptcha = "authentik.stages.captcha" - case stagesPeriodConsent = "authentik.stages.consent" - case stagesPeriodDeny = "authentik.stages.deny" - case stagesPeriodDummy = "authentik.stages.dummy" - case stagesPeriodEmail = "authentik.stages.email" - case stagesPeriodIdentification = "authentik.stages.identification" - case stagesPeriodInvitation = "authentik.stages.invitation" - case stagesPeriodPassword = "authentik.stages.password" - case stagesPeriodPrompt = "authentik.stages.prompt" - case stagesPeriodUserDelete = "authentik.stages.user_delete" - case stagesPeriodUserLogin = "authentik.stages.user_login" - case stagesPeriodUserLogout = "authentik.stages.user_logout" - case stagesPeriodUserWrite = "authentik.stages.user_write" - case tenants = "authentik.tenants" - case blueprints = "authentik.blueprints" - case core = "authentik.core" - case enterprise = "authentik.enterprise" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/AppleChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AppleChallengeResponseRequest.swift deleted file mode 100644 index 5cd7058..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AppleChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AppleChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Pseudo class for plex response */ -public struct AppleChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-source-oauth-apple" - - public init(component: String? = "ak-source-oauth-apple") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AppleLoginChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AppleLoginChallenge.swift deleted file mode 100644 index 846891a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AppleLoginChallenge.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// AppleLoginChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Special challenge for apple-native authentication flow, which happens on the client. */ -public struct AppleLoginChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-source-oauth-apple" - public var responseErrors: [String: [ErrorDetail]]? - public var clientId: String - public var scope: String - public var redirectUri: String - public var state: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-source-oauth-apple", responseErrors: [String: [ErrorDetail]]? = nil, clientId: String, scope: String, redirectUri: String, state: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.clientId = clientId - self.scope = scope - self.redirectUri = redirectUri - self.state = state - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case clientId = "client_id" - case scope - case redirectUri = "redirect_uri" - case state - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(clientId, forKey: .clientId) - try container.encode(scope, forKey: .scope) - try container.encode(redirectUri, forKey: .redirectUri) - try container.encode(state, forKey: .state) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Application.swift b/authentikClient/Classes/OpenAPIs/Models/Application.swift deleted file mode 100644 index 697f591..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Application.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// Application.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Application Serializer */ -public struct Application: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Application's display Name. */ - public var name: String - /** Internal application name, used in URLs. */ - public var slug: String - public var provider: Int? - public var providerObj: Provider - public var backchannelProviders: [Int]? - public var backchannelProvidersObj: [Provider] - /** Allow formatting of launch URL */ - public var launchUrl: String? - /** Open launch URL in a new browser tab or window. */ - public var openInNewTab: Bool? - public var metaLaunchUrl: String? - /** Get the URL to the App Icon image. If the name is /static or starts with http it is returned as-is */ - public var metaIcon: String? - public var metaDescription: String? - public var metaPublisher: String? - public var policyEngineMode: PolicyEngineMode? - public var group: String? - - public init(pk: UUID, name: String, slug: String, provider: Int? = nil, providerObj: Provider, backchannelProviders: [Int]? = nil, backchannelProvidersObj: [Provider], launchUrl: String?, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaIcon: String?, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { - self.pk = pk - self.name = name - self.slug = slug - self.provider = provider - self.providerObj = providerObj - self.backchannelProviders = backchannelProviders - self.backchannelProvidersObj = backchannelProvidersObj - self.launchUrl = launchUrl - self.openInNewTab = openInNewTab - self.metaLaunchUrl = metaLaunchUrl - self.metaIcon = metaIcon - self.metaDescription = metaDescription - self.metaPublisher = metaPublisher - self.policyEngineMode = policyEngineMode - self.group = group - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case provider - case providerObj = "provider_obj" - case backchannelProviders = "backchannel_providers" - case backchannelProvidersObj = "backchannel_providers_obj" - case launchUrl = "launch_url" - case openInNewTab = "open_in_new_tab" - case metaLaunchUrl = "meta_launch_url" - case metaIcon = "meta_icon" - case metaDescription = "meta_description" - case metaPublisher = "meta_publisher" - case policyEngineMode = "policy_engine_mode" - case group - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(provider, forKey: .provider) - try container.encode(providerObj, forKey: .providerObj) - try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) - try container.encode(backchannelProvidersObj, forKey: .backchannelProvidersObj) - try container.encode(launchUrl, forKey: .launchUrl) - try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) - try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) - try container.encode(metaIcon, forKey: .metaIcon) - try container.encodeIfPresent(metaDescription, forKey: .metaDescription) - try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(group, forKey: .group) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ApplicationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ApplicationRequest.swift deleted file mode 100644 index bc8a5de..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ApplicationRequest.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// ApplicationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Application Serializer */ -public struct ApplicationRequest: Codable, JSONEncodable, Hashable { - - /** Application's display Name. */ - public var name: String - /** Internal application name, used in URLs. */ - public var slug: String - public var provider: Int? - public var backchannelProviders: [Int]? - /** Open launch URL in a new browser tab or window. */ - public var openInNewTab: Bool? - public var metaLaunchUrl: String? - public var metaDescription: String? - public var metaPublisher: String? - public var policyEngineMode: PolicyEngineMode? - public var group: String? - - public init(name: String, slug: String, provider: Int? = nil, backchannelProviders: [Int]? = nil, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { - self.name = name - self.slug = slug - self.provider = provider - self.backchannelProviders = backchannelProviders - self.openInNewTab = openInNewTab - self.metaLaunchUrl = metaLaunchUrl - self.metaDescription = metaDescription - self.metaPublisher = metaPublisher - self.policyEngineMode = policyEngineMode - self.group = group - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case provider - case backchannelProviders = "backchannel_providers" - case openInNewTab = "open_in_new_tab" - case metaLaunchUrl = "meta_launch_url" - case metaDescription = "meta_description" - case metaPublisher = "meta_publisher" - case policyEngineMode = "policy_engine_mode" - case group - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(provider, forKey: .provider) - try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) - try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) - try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) - try container.encodeIfPresent(metaDescription, forKey: .metaDescription) - try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(group, forKey: .group) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthTypeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/AuthTypeEnum.swift deleted file mode 100644 index 2715f8b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthTypeEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// AuthTypeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `basic` - Basic * `bearer` - Bearer */ -public enum AuthTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case basic = "basic" - case bearer = "bearer" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStage.swift deleted file mode 100644 index 5a622da..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStage.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// AuthenticateWebAuthnStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticateWebAuthnStage Serializer */ -public struct AuthenticateWebAuthnStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var userVerification: UserVerificationEnum? - public var authenticatorAttachment: AuthenticatorAttachmentEnum? - public var residentKeyRequirement: ResidentKeyRequirementEnum? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.userVerification = userVerification - self.authenticatorAttachment = authenticatorAttachment - self.residentKeyRequirement = residentKeyRequirement - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case userVerification = "user_verification" - case authenticatorAttachment = "authenticator_attachment" - case residentKeyRequirement = "resident_key_requirement" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(userVerification, forKey: .userVerification) - try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) - try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStageRequest.swift deleted file mode 100644 index d26cc0d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticateWebAuthnStageRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// AuthenticateWebAuthnStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticateWebAuthnStage Serializer */ -public struct AuthenticateWebAuthnStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var userVerification: UserVerificationEnum? - public var authenticatorAttachment: AuthenticatorAttachmentEnum? - public var residentKeyRequirement: ResidentKeyRequirementEnum? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.userVerification = userVerification - self.authenticatorAttachment = authenticatorAttachment - self.residentKeyRequirement = residentKeyRequirement - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case userVerification = "user_verification" - case authenticatorAttachment = "authenticator_attachment" - case residentKeyRequirement = "resident_key_requirement" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(userVerification, forKey: .userVerification) - try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) - try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSession.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSession.swift deleted file mode 100644 index 2fcd34f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSession.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// AuthenticatedSession.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatedSession Serializer */ -public struct AuthenticatedSession: Codable, JSONEncodable, Hashable { - - public var uuid: UUID? - /** Check if session is currently active session */ - public var current: Bool - public var userAgent: AuthenticatedSessionUserAgent - public var geoIp: AuthenticatedSessionGeoIp? - public var user: Int - public var lastIp: String - public var lastUserAgent: String? - public var lastUsed: Date - public var expires: Date? - - public init(uuid: UUID? = nil, current: Bool, userAgent: AuthenticatedSessionUserAgent, geoIp: AuthenticatedSessionGeoIp?, user: Int, lastIp: String, lastUserAgent: String? = nil, lastUsed: Date, expires: Date? = nil) { - self.uuid = uuid - self.current = current - self.userAgent = userAgent - self.geoIp = geoIp - self.user = user - self.lastIp = lastIp - self.lastUserAgent = lastUserAgent - self.lastUsed = lastUsed - self.expires = expires - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case uuid - case current - case userAgent = "user_agent" - case geoIp = "geo_ip" - case user - case lastIp = "last_ip" - case lastUserAgent = "last_user_agent" - case lastUsed = "last_used" - case expires - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(uuid, forKey: .uuid) - try container.encode(current, forKey: .current) - try container.encode(userAgent, forKey: .userAgent) - try container.encode(geoIp, forKey: .geoIp) - try container.encode(user, forKey: .user) - try container.encode(lastIp, forKey: .lastIp) - try container.encodeIfPresent(lastUserAgent, forKey: .lastUserAgent) - try container.encode(lastUsed, forKey: .lastUsed) - try container.encodeIfPresent(expires, forKey: .expires) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionGeoIp.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionGeoIp.swift deleted file mode 100644 index 4f21c3e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionGeoIp.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AuthenticatedSessionGeoIp.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get parsed user agent */ -public struct AuthenticatedSessionGeoIp: Codable, JSONEncodable, Hashable { - - public var continent: String - public var country: String - public var lat: Double - public var long: Double - public var city: String - - public init(continent: String, country: String, lat: Double, long: Double, city: String) { - self.continent = continent - self.country = country - self.lat = lat - self.long = long - self.city = city - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case continent - case country - case lat - case long - case city - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(continent, forKey: .continent) - try container.encode(country, forKey: .country) - try container.encode(lat, forKey: .lat) - try container.encode(long, forKey: .long) - try container.encode(city, forKey: .city) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgent.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgent.swift deleted file mode 100644 index 9575ccb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgent.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// AuthenticatedSessionUserAgent.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get parsed user agent */ -public struct AuthenticatedSessionUserAgent: Codable, JSONEncodable, Hashable { - - public var device: AuthenticatedSessionUserAgentDevice - public var os: AuthenticatedSessionUserAgentOs - public var userAgent: AuthenticatedSessionUserAgentUserAgent - public var string: String - - public init(device: AuthenticatedSessionUserAgentDevice, os: AuthenticatedSessionUserAgentOs, userAgent: AuthenticatedSessionUserAgentUserAgent, string: String) { - self.device = device - self.os = os - self.userAgent = userAgent - self.string = string - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case device - case os - case userAgent = "user_agent" - case string - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(device, forKey: .device) - try container.encode(os, forKey: .os) - try container.encode(userAgent, forKey: .userAgent) - try container.encode(string, forKey: .string) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentDevice.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentDevice.swift deleted file mode 100644 index aafc8ac..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentDevice.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// AuthenticatedSessionUserAgentDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User agent device */ -public struct AuthenticatedSessionUserAgentDevice: Codable, JSONEncodable, Hashable { - - public var brand: String - public var family: String - public var model: String - - public init(brand: String, family: String, model: String) { - self.brand = brand - self.family = family - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case brand - case family - case model - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(brand, forKey: .brand) - try container.encode(family, forKey: .family) - try container.encode(model, forKey: .model) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentOs.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentOs.swift deleted file mode 100644 index c4997b1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentOs.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AuthenticatedSessionUserAgentOs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User agent os */ -public struct AuthenticatedSessionUserAgentOs: Codable, JSONEncodable, Hashable { - - public var family: String - public var major: String - public var minor: String - public var patch: String - public var patchMinor: String - - public init(family: String, major: String, minor: String, patch: String, patchMinor: String) { - self.family = family - self.major = major - self.minor = minor - self.patch = patch - self.patchMinor = patchMinor - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case family - case major - case minor - case patch - case patchMinor = "patch_minor" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(family, forKey: .family) - try container.encode(major, forKey: .major) - try container.encode(minor, forKey: .minor) - try container.encode(patch, forKey: .patch) - try container.encode(patchMinor, forKey: .patchMinor) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentUserAgent.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentUserAgent.swift deleted file mode 100644 index d98c11a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatedSessionUserAgentUserAgent.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// AuthenticatedSessionUserAgentUserAgent.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User agent browser */ -public struct AuthenticatedSessionUserAgentUserAgent: Codable, JSONEncodable, Hashable { - - public var family: String - public var major: String - public var minor: String - public var patch: String - - public init(family: String, major: String, minor: String, patch: String) { - self.family = family - self.major = major - self.minor = minor - self.patch = patch - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case family - case major - case minor - case patch - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(family, forKey: .family) - try container.encode(major, forKey: .major) - try container.encode(minor, forKey: .minor) - try container.encode(patch, forKey: .patch) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticationEnum.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticationEnum.swift deleted file mode 100644 index 8b1daf9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticationEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// AuthenticationEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser */ -public enum AuthenticationEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _none = "none" - case requireAuthenticated = "require_authenticated" - case requireUnauthenticated = "require_unauthenticated" - case requireSuperuser = "require_superuser" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorAttachmentEnum.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorAttachmentEnum.swift deleted file mode 100644 index 846eda3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorAttachmentEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// AuthenticatorAttachmentEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `platform` - Platform * `cross-platform` - Cross Platform */ -public enum AuthenticatorAttachmentEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case platform = "platform" - case crossPlatform = "cross-platform" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallenge.swift deleted file mode 100644 index 9cd40f4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallenge.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// AuthenticatorDuoChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Duo Challenge */ -public struct AuthenticatorDuoChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-duo" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var activationBarcode: String - public var activationCode: String - public var stageUuid: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-duo", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, activationBarcode: String, activationCode: String, stageUuid: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.activationBarcode = activationBarcode - self.activationCode = activationCode - self.stageUuid = stageUuid - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case activationBarcode = "activation_barcode" - case activationCode = "activation_code" - case stageUuid = "stage_uuid" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(activationBarcode, forKey: .activationBarcode) - try container.encode(activationCode, forKey: .activationCode) - try container.encode(stageUuid, forKey: .stageUuid) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallengeResponseRequest.swift deleted file mode 100644 index c7936fc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AuthenticatorDuoChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Pseudo class for duo response */ -public struct AuthenticatorDuoChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-duo" - - public init(component: String? = "ak-stage-authenticator-duo") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStage.swift deleted file mode 100644 index 13b8ebf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStage.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// AuthenticatorDuoStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorDuoStage Serializer */ -public struct AuthenticatorDuoStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var clientId: String - public var apiHostname: String - public var adminIntegrationKey: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String, apiHostname: String, adminIntegrationKey: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.clientId = clientId - self.apiHostname = apiHostname - self.adminIntegrationKey = adminIntegrationKey - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case clientId = "client_id" - case apiHostname = "api_hostname" - case adminIntegrationKey = "admin_integration_key" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(clientId, forKey: .clientId) - try container.encode(apiHostname, forKey: .apiHostname) - try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageDeviceImportResponse.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageDeviceImportResponse.swift deleted file mode 100644 index ab4cec5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageDeviceImportResponse.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AuthenticatorDuoStageDeviceImportResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct AuthenticatorDuoStageDeviceImportResponse: Codable, JSONEncodable, Hashable { - - public var count: Int - public var error: String - - public init(count: Int, error: String) { - self.count = count - self.error = error - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case count - case error - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(count, forKey: .count) - try container.encode(error, forKey: .error) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift deleted file mode 100644 index c9f7820..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AuthenticatorDuoStageManualDeviceImportRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct AuthenticatorDuoStageManualDeviceImportRequest: Codable, JSONEncodable, Hashable { - - public var duoUserId: String - public var username: String - - public init(duoUserId: String, username: String) { - self.duoUserId = duoUserId - self.username = username - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case duoUserId = "duo_user_id" - case username - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(duoUserId, forKey: .duoUserId) - try container.encode(username, forKey: .username) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageRequest.swift deleted file mode 100644 index 7675671..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorDuoStageRequest.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// AuthenticatorDuoStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorDuoStage Serializer */ -public struct AuthenticatorDuoStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var clientId: String - public var clientSecret: String - public var apiHostname: String - public var adminIntegrationKey: String? - public var adminSecretKey: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String, clientSecret: String, apiHostname: String, adminIntegrationKey: String? = nil, adminSecretKey: String? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.clientId = clientId - self.clientSecret = clientSecret - self.apiHostname = apiHostname - self.adminIntegrationKey = adminIntegrationKey - self.adminSecretKey = adminSecretKey - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case clientId = "client_id" - case clientSecret = "client_secret" - case apiHostname = "api_hostname" - case adminIntegrationKey = "admin_integration_key" - case adminSecretKey = "admin_secret_key" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(clientId, forKey: .clientId) - try container.encode(clientSecret, forKey: .clientSecret) - try container.encode(apiHostname, forKey: .apiHostname) - try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) - try container.encodeIfPresent(adminSecretKey, forKey: .adminSecretKey) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallenge.swift deleted file mode 100644 index 561308f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AuthenticatorSMSChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SMS Setup challenge */ -public struct AuthenticatorSMSChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-sms" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var phoneNumberRequired: Bool? = true - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-sms", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, phoneNumberRequired: Bool? = true) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.phoneNumberRequired = phoneNumberRequired - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case phoneNumberRequired = "phone_number_required" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encodeIfPresent(phoneNumberRequired, forKey: .phoneNumberRequired) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallengeResponseRequest.swift deleted file mode 100644 index 32ad16d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSChallengeResponseRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// AuthenticatorSMSChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SMS Challenge response, device is set by get_response_instance */ -public struct AuthenticatorSMSChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-sms" - public var code: Int? - public var phoneNumber: String? - - public init(component: String? = "ak-stage-authenticator-sms", code: Int? = nil, phoneNumber: String? = nil) { - self.component = component - self.code = code - self.phoneNumber = phoneNumber - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case code - case phoneNumber = "phone_number" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(code, forKey: .code) - try container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStage.swift deleted file mode 100644 index 835b41c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStage.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// AuthenticatorSMSStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorSMSStage Serializer */ -public struct AuthenticatorSMSStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var provider: ProviderEnum - public var fromNumber: String - public var accountSid: String - public var auth: String - public var authPassword: String? - public var authType: AuthTypeEnum? - /** When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. */ - public var verifyOnly: Bool? - /** Optionally modify the payload being sent to custom providers. */ - public var mapping: UUID? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum, fromNumber: String, accountSid: String, auth: String, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.provider = provider - self.fromNumber = fromNumber - self.accountSid = accountSid - self.auth = auth - self.authPassword = authPassword - self.authType = authType - self.verifyOnly = verifyOnly - self.mapping = mapping - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case provider - case fromNumber = "from_number" - case accountSid = "account_sid" - case auth - case authPassword = "auth_password" - case authType = "auth_type" - case verifyOnly = "verify_only" - case mapping - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(provider, forKey: .provider) - try container.encode(fromNumber, forKey: .fromNumber) - try container.encode(accountSid, forKey: .accountSid) - try container.encode(auth, forKey: .auth) - try container.encodeIfPresent(authPassword, forKey: .authPassword) - try container.encodeIfPresent(authType, forKey: .authType) - try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) - try container.encodeIfPresent(mapping, forKey: .mapping) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStageRequest.swift deleted file mode 100644 index 00ffa7a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorSMSStageRequest.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// AuthenticatorSMSStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorSMSStage Serializer */ -public struct AuthenticatorSMSStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var provider: ProviderEnum - public var fromNumber: String - public var accountSid: String - public var auth: String - public var authPassword: String? - public var authType: AuthTypeEnum? - /** When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. */ - public var verifyOnly: Bool? - /** Optionally modify the payload being sent to custom providers. */ - public var mapping: UUID? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum, fromNumber: String, accountSid: String, auth: String, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.provider = provider - self.fromNumber = fromNumber - self.accountSid = accountSid - self.auth = auth - self.authPassword = authPassword - self.authType = authType - self.verifyOnly = verifyOnly - self.mapping = mapping - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case provider - case fromNumber = "from_number" - case accountSid = "account_sid" - case auth - case authPassword = "auth_password" - case authType = "auth_type" - case verifyOnly = "verify_only" - case mapping - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(provider, forKey: .provider) - try container.encode(fromNumber, forKey: .fromNumber) - try container.encode(accountSid, forKey: .accountSid) - try container.encode(auth, forKey: .auth) - try container.encodeIfPresent(authPassword, forKey: .authPassword) - try container.encodeIfPresent(authType, forKey: .authType) - try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) - try container.encodeIfPresent(mapping, forKey: .mapping) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallenge.swift deleted file mode 100644 index 5c88c3e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AuthenticatorStaticChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Static authenticator challenge */ -public struct AuthenticatorStaticChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-static" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var codes: [String] - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-static", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, codes: [String]) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.codes = codes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case codes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(codes, forKey: .codes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallengeResponseRequest.swift deleted file mode 100644 index ec5b4d8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AuthenticatorStaticChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Pseudo class for static response */ -public struct AuthenticatorStaticChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-static" - - public init(component: String? = "ak-stage-authenticator-static") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStage.swift deleted file mode 100644 index ce156e7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStage.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// AuthenticatorStaticStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorStaticStage Serializer */ -public struct AuthenticatorStaticStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var tokenCount: Int? - public var tokenLength: Int? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.tokenCount = tokenCount - self.tokenLength = tokenLength - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case tokenCount = "token_count" - case tokenLength = "token_length" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(tokenCount, forKey: .tokenCount) - try container.encodeIfPresent(tokenLength, forKey: .tokenLength) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStageRequest.swift deleted file mode 100644 index 6a09466..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorStaticStageRequest.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// AuthenticatorStaticStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorStaticStage Serializer */ -public struct AuthenticatorStaticStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var tokenCount: Int? - public var tokenLength: Int? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.tokenCount = tokenCount - self.tokenLength = tokenLength - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case tokenCount = "token_count" - case tokenLength = "token_length" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(tokenCount, forKey: .tokenCount) - try container.encodeIfPresent(tokenLength, forKey: .tokenLength) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallenge.swift deleted file mode 100644 index 434847d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AuthenticatorTOTPChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** TOTP Setup challenge */ -public struct AuthenticatorTOTPChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-totp" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var configUrl: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-totp", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, configUrl: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.configUrl = configUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case configUrl = "config_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(configUrl, forKey: .configUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallengeResponseRequest.swift deleted file mode 100644 index 20a9a76..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// AuthenticatorTOTPChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** TOTP Challenge response, device is set by get_response_instance */ -public struct AuthenticatorTOTPChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-totp" - public var code: Int - - public init(component: String? = "ak-stage-authenticator-totp", code: Int) { - self.component = component - self.code = code - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case code - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(code, forKey: .code) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStage.swift deleted file mode 100644 index cbdf465..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStage.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// AuthenticatorTOTPStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorTOTPStage Serializer */ -public struct AuthenticatorTOTPStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var digits: DigitsEnum - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.digits = digits - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case digits - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(digits, forKey: .digits) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStageRequest.swift deleted file mode 100644 index 0bc87d3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorTOTPStageRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// AuthenticatorTOTPStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorTOTPStage Serializer */ -public struct AuthenticatorTOTPStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var digits: DigitsEnum - - public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.digits = digits - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case digits - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encode(digits, forKey: .digits) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStage.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStage.swift deleted file mode 100644 index 95ce768..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStage.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// AuthenticatorValidateStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorValidateStage Serializer */ -public struct AuthenticatorValidateStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var notConfiguredAction: NotConfiguredActionEnum? - /** Device classes which can be used to authenticate */ - public var deviceClasses: [DeviceClassesEnum]? - /** Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. */ - public var configurationStages: [UUID]? - /** If any of the user's device has been used within this threshold, this stage will be skipped */ - public var lastAuthThreshold: String? - /** Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged */ - public var webauthnUserVerification: UserVerificationEnum? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.notConfiguredAction = notConfiguredAction - self.deviceClasses = deviceClasses - self.configurationStages = configurationStages - self.lastAuthThreshold = lastAuthThreshold - self.webauthnUserVerification = webauthnUserVerification - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case notConfiguredAction = "not_configured_action" - case deviceClasses = "device_classes" - case configurationStages = "configuration_stages" - case lastAuthThreshold = "last_auth_threshold" - case webauthnUserVerification = "webauthn_user_verification" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) - try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) - try container.encodeIfPresent(configurationStages, forKey: .configurationStages) - try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) - try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStageRequest.swift deleted file mode 100644 index 8acf495..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidateStageRequest.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// AuthenticatorValidateStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorValidateStage Serializer */ -public struct AuthenticatorValidateStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var notConfiguredAction: NotConfiguredActionEnum? - /** Device classes which can be used to authenticate */ - public var deviceClasses: [DeviceClassesEnum]? - /** Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. */ - public var configurationStages: [UUID]? - /** If any of the user's device has been used within this threshold, this stage will be skipped */ - public var lastAuthThreshold: String? - /** Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged */ - public var webauthnUserVerification: UserVerificationEnum? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { - self.name = name - self.flowSet = flowSet - self.notConfiguredAction = notConfiguredAction - self.deviceClasses = deviceClasses - self.configurationStages = configurationStages - self.lastAuthThreshold = lastAuthThreshold - self.webauthnUserVerification = webauthnUserVerification - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case notConfiguredAction = "not_configured_action" - case deviceClasses = "device_classes" - case configurationStages = "configuration_stages" - case lastAuthThreshold = "last_auth_threshold" - case webauthnUserVerification = "webauthn_user_verification" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) - try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) - try container.encodeIfPresent(configurationStages, forKey: .configurationStages) - try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) - try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallenge.swift deleted file mode 100644 index bd49ac6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallenge.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// AuthenticatorValidationChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Authenticator challenge */ -public struct AuthenticatorValidationChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-validate" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var deviceChallenges: [DeviceChallenge] - public var configurationStages: [SelectableStage] - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-validate", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, deviceChallenges: [DeviceChallenge], configurationStages: [SelectableStage]) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.deviceChallenges = deviceChallenges - self.configurationStages = configurationStages - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case deviceChallenges = "device_challenges" - case configurationStages = "configuration_stages" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(deviceChallenges, forKey: .deviceChallenges) - try container.encode(configurationStages, forKey: .configurationStages) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallengeResponseRequest.swift deleted file mode 100644 index bb2b324..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorValidationChallengeResponseRequest.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// AuthenticatorValidationChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge used for Code-based and WebAuthn authenticators */ -public struct AuthenticatorValidationChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-validate" - public var selectedChallenge: DeviceChallengeRequest? - public var selectedStage: String? - public var code: String? - public var webauthn: [String: AnyCodable]? - public var duo: Int? - - public init(component: String? = "ak-stage-authenticator-validate", selectedChallenge: DeviceChallengeRequest? = nil, selectedStage: String? = nil, code: String? = nil, webauthn: [String: AnyCodable]? = nil, duo: Int? = nil) { - self.component = component - self.selectedChallenge = selectedChallenge - self.selectedStage = selectedStage - self.code = code - self.webauthn = webauthn - self.duo = duo - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case selectedChallenge = "selected_challenge" - case selectedStage = "selected_stage" - case code - case webauthn - case duo - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(selectedChallenge, forKey: .selectedChallenge) - try container.encodeIfPresent(selectedStage, forKey: .selectedStage) - try container.encodeIfPresent(code, forKey: .code) - try container.encodeIfPresent(webauthn, forKey: .webauthn) - try container.encodeIfPresent(duo, forKey: .duo) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallenge.swift deleted file mode 100644 index 977b8c6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AuthenticatorWebAuthnChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** WebAuthn Challenge */ -public struct AuthenticatorWebAuthnChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-authenticator-webauthn" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var registration: [String: AnyCodable] - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-webauthn", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, registration: [String: AnyCodable]) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.registration = registration - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case registration - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(registration, forKey: .registration) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift deleted file mode 100644 index 397aaf4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// AuthenticatorWebAuthnChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** WebAuthn Challenge response */ -public struct AuthenticatorWebAuthnChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-authenticator-webauthn" - public var response: [String: AnyCodable] - - public init(component: String? = "ak-stage-authenticator-webauthn", response: [String: AnyCodable]) { - self.component = component - self.response = response - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case response - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(response, forKey: .response) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AutoSubmitChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/AutoSubmitChallengeResponseRequest.swift deleted file mode 100644 index 67acf20..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AutoSubmitChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AutoSubmitChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Pseudo class for autosubmit response */ -public struct AutoSubmitChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-autosubmit" - - public init(component: String? = "ak-stage-autosubmit") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/AutosubmitChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/AutosubmitChallenge.swift deleted file mode 100644 index f032a09..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/AutosubmitChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// AutosubmitChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Autosubmit challenge used to send and navigate a POST request */ -public struct AutosubmitChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-autosubmit" - public var responseErrors: [String: [ErrorDetail]]? - public var url: String - public var attrs: [String: String] - public var title: String? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-autosubmit", responseErrors: [String: [ErrorDetail]]? = nil, url: String, attrs: [String: String], title: String? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.url = url - self.attrs = attrs - self.title = title - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case url - case attrs - case title - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(url, forKey: .url) - try container.encode(attrs, forKey: .attrs) - try container.encodeIfPresent(title, forKey: .title) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/BackendsEnum.swift b/authentikClient/Classes/OpenAPIs/Models/BackendsEnum.swift deleted file mode 100644 index a4f0bdd..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BackendsEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// BackendsEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `authentik.core.auth.InbuiltBackend` - User database + standard password * `authentik.core.auth.TokenBackend` - User database + app passwords * `authentik.sources.ldap.auth.LDAPBackend` - User database + LDAP password */ -public enum BackendsEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case corePeriodAuthPeriodInbuiltbackend = "authentik.core.auth.InbuiltBackend" - case corePeriodAuthPeriodTokenbackend = "authentik.core.auth.TokenBackend" - case sourcesPeriodLdapPeriodAuthPeriodLdapbackend = "authentik.sources.ldap.auth.LDAPBackend" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/BindingTypeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/BindingTypeEnum.swift deleted file mode 100644 index b6b1633..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BindingTypeEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// BindingTypeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation */ -public enum BindingTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case redirect = "REDIRECT" - case post = "POST" - case postAuto = "POST_AUTO" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/BlueprintFile.swift b/authentikClient/Classes/OpenAPIs/Models/BlueprintFile.swift deleted file mode 100644 index 9ae17fb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BlueprintFile.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// BlueprintFile.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct BlueprintFile: Codable, JSONEncodable, Hashable { - - public var path: String - public var lastM: Date - public var hash: String - public var meta: Metadata - - public init(path: String, lastM: Date, hash: String, meta: Metadata) { - self.path = path - self.lastM = lastM - self.hash = hash - self.meta = meta - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case path - case lastM = "last_m" - case hash - case meta - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(path, forKey: .path) - try container.encode(lastM, forKey: .lastM) - try container.encode(hash, forKey: .hash) - try container.encode(meta, forKey: .meta) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstance.swift b/authentikClient/Classes/OpenAPIs/Models/BlueprintInstance.swift deleted file mode 100644 index ef6e365..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstance.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// BlueprintInstance.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Info about a single blueprint instance file */ -public struct BlueprintInstance: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var path: String? = "" - public var context: [String: AnyCodable]? - public var lastApplied: Date - public var lastAppliedHash: String - public var status: BlueprintInstanceStatusEnum - public var enabled: Bool? - public var managedModels: [String] - public var metadata: [String: AnyCodable] - public var content: String? - - public init(pk: UUID, name: String, path: String? = "", context: [String: AnyCodable]? = nil, lastApplied: Date, lastAppliedHash: String, status: BlueprintInstanceStatusEnum, enabled: Bool? = nil, managedModels: [String], metadata: [String: AnyCodable], content: String? = nil) { - self.pk = pk - self.name = name - self.path = path - self.context = context - self.lastApplied = lastApplied - self.lastAppliedHash = lastAppliedHash - self.status = status - self.enabled = enabled - self.managedModels = managedModels - self.metadata = metadata - self.content = content - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case path - case context - case lastApplied = "last_applied" - case lastAppliedHash = "last_applied_hash" - case status - case enabled - case managedModels = "managed_models" - case metadata - case content - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(context, forKey: .context) - try container.encode(lastApplied, forKey: .lastApplied) - try container.encode(lastAppliedHash, forKey: .lastAppliedHash) - try container.encode(status, forKey: .status) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encode(managedModels, forKey: .managedModels) - try container.encode(metadata, forKey: .metadata) - try container.encodeIfPresent(content, forKey: .content) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceRequest.swift deleted file mode 100644 index 2cb7294..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceRequest.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// BlueprintInstanceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Info about a single blueprint instance file */ -public struct BlueprintInstanceRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var path: String? = "" - public var context: [String: AnyCodable]? - public var enabled: Bool? - public var content: String? - - public init(name: String, path: String? = "", context: [String: AnyCodable]? = nil, enabled: Bool? = nil, content: String? = nil) { - self.name = name - self.path = path - self.context = context - self.enabled = enabled - self.content = content - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case path - case context - case enabled - case content - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(context, forKey: .context) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(content, forKey: .content) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceStatusEnum.swift b/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceStatusEnum.swift deleted file mode 100644 index 8f224e1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/BlueprintInstanceStatusEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// BlueprintInstanceStatusEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `successful` - Successful * `warning` - Warning * `error` - Error * `orphaned` - Orphaned * `unknown` - Unknown */ -public enum BlueprintInstanceStatusEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case successful = "successful" - case warning = "warning" - case error = "error" - case orphaned = "orphaned" - case unknown = "unknown" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Cache.swift b/authentikClient/Classes/OpenAPIs/Models/Cache.swift deleted file mode 100644 index 8625a57..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Cache.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Cache.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Generic cache stats for an object */ -public struct Cache: Codable, JSONEncodable, Hashable { - - public var count: Int - - public init(count: Int) { - self.count = count - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case count - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(count, forKey: .count) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CapabilitiesEnum.swift b/authentikClient/Classes/OpenAPIs/Models/CapabilitiesEnum.swift deleted file mode 100644 index 33f6b79..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CapabilitiesEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// CapabilitiesEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `can_save_media` - Can Save Media * `can_geo_ip` - Can Geo Ip * `can_impersonate` - Can Impersonate * `can_debug` - Can Debug * `is_enterprise` - Is Enterprise */ -public enum CapabilitiesEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case canSaveMedia = "can_save_media" - case canGeoIp = "can_geo_ip" - case canImpersonate = "can_impersonate" - case canDebug = "can_debug" - case isEnterprise = "is_enterprise" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/CaptchaChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/CaptchaChallenge.swift deleted file mode 100644 index 31776a7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CaptchaChallenge.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// CaptchaChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Site public key */ -public struct CaptchaChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-captcha" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var siteKey: String - public var jsUrl: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-captcha", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, siteKey: String, jsUrl: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.siteKey = siteKey - self.jsUrl = jsUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case siteKey = "site_key" - case jsUrl = "js_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encode(siteKey, forKey: .siteKey) - try container.encode(jsUrl, forKey: .jsUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CaptchaChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/CaptchaChallengeResponseRequest.swift deleted file mode 100644 index 9c6a8ff..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CaptchaChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CaptchaChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Validate captcha token */ -public struct CaptchaChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-captcha" - public var token: String - - public init(component: String? = "ak-stage-captcha", token: String) { - self.component = component - self.token = token - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case token - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(token, forKey: .token) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CaptchaStage.swift b/authentikClient/Classes/OpenAPIs/Models/CaptchaStage.swift deleted file mode 100644 index fc157d7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CaptchaStage.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// CaptchaStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CaptchaStage Serializer */ -public struct CaptchaStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Public key, acquired your captcha Provider. */ - public var publicKey: String - public var jsUrl: String? - public var apiUrl: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, publicKey: String, jsUrl: String? = nil, apiUrl: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.publicKey = publicKey - self.jsUrl = jsUrl - self.apiUrl = apiUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case publicKey = "public_key" - case jsUrl = "js_url" - case apiUrl = "api_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(publicKey, forKey: .publicKey) - try container.encodeIfPresent(jsUrl, forKey: .jsUrl) - try container.encodeIfPresent(apiUrl, forKey: .apiUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CaptchaStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/CaptchaStageRequest.swift deleted file mode 100644 index 9ff91d1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CaptchaStageRequest.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// CaptchaStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CaptchaStage Serializer */ -public struct CaptchaStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Public key, acquired your captcha Provider. */ - public var publicKey: String - /** Private key, acquired your captcha Provider. */ - public var privateKey: String - public var jsUrl: String? - public var apiUrl: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, publicKey: String, privateKey: String, jsUrl: String? = nil, apiUrl: String? = nil) { - self.name = name - self.flowSet = flowSet - self.publicKey = publicKey - self.privateKey = privateKey - self.jsUrl = jsUrl - self.apiUrl = apiUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case publicKey = "public_key" - case privateKey = "private_key" - case jsUrl = "js_url" - case apiUrl = "api_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(publicKey, forKey: .publicKey) - try container.encode(privateKey, forKey: .privateKey) - try container.encodeIfPresent(jsUrl, forKey: .jsUrl) - try container.encodeIfPresent(apiUrl, forKey: .apiUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CertificateData.swift b/authentikClient/Classes/OpenAPIs/Models/CertificateData.swift deleted file mode 100644 index 3fdd211..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CertificateData.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// CertificateData.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get CertificateKeyPair's data */ -public struct CertificateData: Codable, JSONEncodable, Hashable { - - public var data: String - - public init(data: String) { - self.data = data - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case data - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(data, forKey: .data) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CertificateGenerationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/CertificateGenerationRequest.swift deleted file mode 100644 index d72df49..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CertificateGenerationRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// CertificateGenerationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Certificate generation parameters */ -public struct CertificateGenerationRequest: Codable, JSONEncodable, Hashable { - - public var commonName: String - public var subjectAltName: String? - public var validityDays: Int - - public init(commonName: String, subjectAltName: String? = nil, validityDays: Int) { - self.commonName = commonName - self.subjectAltName = subjectAltName - self.validityDays = validityDays - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case commonName = "common_name" - case subjectAltName = "subject_alt_name" - case validityDays = "validity_days" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(commonName, forKey: .commonName) - try container.encodeIfPresent(subjectAltName, forKey: .subjectAltName) - try container.encode(validityDays, forKey: .validityDays) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPair.swift b/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPair.swift deleted file mode 100644 index 3aa22c3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPair.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// CertificateKeyPair.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CertificateKeyPair Serializer */ -public struct CertificateKeyPair: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get certificate Hash (SHA256) */ - public var fingerprintSha256: String? - /** Get certificate Hash (SHA1) */ - public var fingerprintSha1: String? - /** Get certificate expiry */ - public var certExpiry: Date? - /** Get certificate subject as full rfc4514 */ - public var certSubject: String? - /** Show if this keypair has a private key configured or not */ - public var privateKeyAvailable: Bool - /** Get the private key's type, if set */ - public var privateKeyType: String? - /** Get URL to download certificate */ - public var certificateDownloadUrl: String - /** Get URL to download private key */ - public var privateKeyDownloadUrl: String - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - - public init(pk: UUID, name: String, fingerprintSha256: String?, fingerprintSha1: String?, certExpiry: Date?, certSubject: String?, privateKeyAvailable: Bool, privateKeyType: String?, certificateDownloadUrl: String, privateKeyDownloadUrl: String, managed: String?) { - self.pk = pk - self.name = name - self.fingerprintSha256 = fingerprintSha256 - self.fingerprintSha1 = fingerprintSha1 - self.certExpiry = certExpiry - self.certSubject = certSubject - self.privateKeyAvailable = privateKeyAvailable - self.privateKeyType = privateKeyType - self.certificateDownloadUrl = certificateDownloadUrl - self.privateKeyDownloadUrl = privateKeyDownloadUrl - self.managed = managed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case fingerprintSha256 = "fingerprint_sha256" - case fingerprintSha1 = "fingerprint_sha1" - case certExpiry = "cert_expiry" - case certSubject = "cert_subject" - case privateKeyAvailable = "private_key_available" - case privateKeyType = "private_key_type" - case certificateDownloadUrl = "certificate_download_url" - case privateKeyDownloadUrl = "private_key_download_url" - case managed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(fingerprintSha256, forKey: .fingerprintSha256) - try container.encode(fingerprintSha1, forKey: .fingerprintSha1) - try container.encode(certExpiry, forKey: .certExpiry) - try container.encode(certSubject, forKey: .certSubject) - try container.encode(privateKeyAvailable, forKey: .privateKeyAvailable) - try container.encode(privateKeyType, forKey: .privateKeyType) - try container.encode(certificateDownloadUrl, forKey: .certificateDownloadUrl) - try container.encode(privateKeyDownloadUrl, forKey: .privateKeyDownloadUrl) - try container.encode(managed, forKey: .managed) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPairRequest.swift b/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPairRequest.swift deleted file mode 100644 index a7a7369..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CertificateKeyPairRequest.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// CertificateKeyPairRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CertificateKeyPair Serializer */ -public struct CertificateKeyPairRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** PEM-encoded Certificate data */ - public var certificateData: String - /** Optional Private Key. If this is set, you can use this keypair for encryption. */ - public var keyData: String? - - public init(name: String, certificateData: String, keyData: String? = nil) { - self.name = name - self.certificateData = certificateData - self.keyData = keyData - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case certificateData = "certificate_data" - case keyData = "key_data" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(certificateData, forKey: .certificateData) - try container.encodeIfPresent(keyData, forKey: .keyData) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ChallengeChoices.swift b/authentikClient/Classes/OpenAPIs/Models/ChallengeChoices.swift deleted file mode 100644 index 024c185..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ChallengeChoices.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ChallengeChoices.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `native` - NATIVE * `shell` - SHELL * `redirect` - REDIRECT */ -public enum ChallengeChoices: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case native = "native" - case shell = "shell" - case redirect = "redirect" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ClientTypeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ClientTypeEnum.swift deleted file mode 100644 index 5805560..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ClientTypeEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ClientTypeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `confidential` - Confidential * `public` - Public */ -public enum ClientTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case confidential = "confidential" - case _public = "public" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Config.swift b/authentikClient/Classes/OpenAPIs/Models/Config.swift deleted file mode 100644 index ebd4b9f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Config.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Config.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serialize authentik Config into DRF Object */ -public struct Config: Codable, JSONEncodable, Hashable { - - public var errorReporting: ErrorReportingConfig - public var capabilities: [CapabilitiesEnum] - public var cacheTimeout: Int - public var cacheTimeoutFlows: Int - public var cacheTimeoutPolicies: Int - public var cacheTimeoutReputation: Int - - public init(errorReporting: ErrorReportingConfig, capabilities: [CapabilitiesEnum], cacheTimeout: Int, cacheTimeoutFlows: Int, cacheTimeoutPolicies: Int, cacheTimeoutReputation: Int) { - self.errorReporting = errorReporting - self.capabilities = capabilities - self.cacheTimeout = cacheTimeout - self.cacheTimeoutFlows = cacheTimeoutFlows - self.cacheTimeoutPolicies = cacheTimeoutPolicies - self.cacheTimeoutReputation = cacheTimeoutReputation - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case errorReporting = "error_reporting" - case capabilities - case cacheTimeout = "cache_timeout" - case cacheTimeoutFlows = "cache_timeout_flows" - case cacheTimeoutPolicies = "cache_timeout_policies" - case cacheTimeoutReputation = "cache_timeout_reputation" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(errorReporting, forKey: .errorReporting) - try container.encode(capabilities, forKey: .capabilities) - try container.encode(cacheTimeout, forKey: .cacheTimeout) - try container.encode(cacheTimeoutFlows, forKey: .cacheTimeoutFlows) - try container.encode(cacheTimeoutPolicies, forKey: .cacheTimeoutPolicies) - try container.encode(cacheTimeoutReputation, forKey: .cacheTimeoutReputation) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentChallenge.swift deleted file mode 100644 index 2bedb48..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentChallenge.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// ConsentChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge info for consent screens */ -public struct ConsentChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-consent" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var headerText: String? - public var permissions: [ConsentPermission] - public var additionalPermissions: [ConsentPermission] - public var token: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-consent", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, headerText: String? = nil, permissions: [ConsentPermission], additionalPermissions: [ConsentPermission], token: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.headerText = headerText - self.permissions = permissions - self.additionalPermissions = additionalPermissions - self.token = token - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case headerText = "header_text" - case permissions - case additionalPermissions = "additional_permissions" - case token - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encodeIfPresent(headerText, forKey: .headerText) - try container.encode(permissions, forKey: .permissions) - try container.encode(additionalPermissions, forKey: .additionalPermissions) - try container.encode(token, forKey: .token) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentChallengeResponseRequest.swift deleted file mode 100644 index 3f47193..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// ConsentChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Consent challenge response, any valid response request is valid */ -public struct ConsentChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-consent" - public var token: String - - public init(component: String? = "ak-stage-consent", token: String) { - self.component = component - self.token = token - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case token - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(token, forKey: .token) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentPermission.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentPermission.swift deleted file mode 100644 index f4c6999..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentPermission.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// ConsentPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Permission used for consent */ -public struct ConsentPermission: Codable, JSONEncodable, Hashable { - - public var name: String - public var id: String - - public init(name: String, id: String) { - self.name = name - self.id = id - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case id - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(id, forKey: .id) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentStage.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentStage.swift deleted file mode 100644 index c5bbf43..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentStage.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// ConsentStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ConsentStage Serializer */ -public struct ConsentStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var mode: ConsentStageModeEnum? - /** Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). */ - public var consentExpireIn: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.mode = mode - self.consentExpireIn = consentExpireIn - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case mode - case consentExpireIn = "consent_expire_in" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentStageModeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentStageModeEnum.swift deleted file mode 100644 index fe490bb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentStageModeEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ConsentStageModeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring */ -public enum ConsentStageModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case alwaysRequire = "always_require" - case permanent = "permanent" - case expiring = "expiring" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ConsentStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ConsentStageRequest.swift deleted file mode 100644 index bacca10..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ConsentStageRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ConsentStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ConsentStage Serializer */ -public struct ConsentStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var mode: ConsentStageModeEnum? - /** Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). */ - public var consentExpireIn: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { - self.name = name - self.flowSet = flowSet - self.mode = mode - self.consentExpireIn = consentExpireIn - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case mode - case consentExpireIn = "consent_expire_in" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ContextualFlowInfo.swift b/authentikClient/Classes/OpenAPIs/Models/ContextualFlowInfo.swift deleted file mode 100644 index 81284ed..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ContextualFlowInfo.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// ContextualFlowInfo.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Contextual flow information for a challenge */ -public struct ContextualFlowInfo: Codable, JSONEncodable, Hashable { - - public var title: String? - public var background: String? - public var cancelUrl: String - public var layout: LayoutEnum - - public init(title: String? = nil, background: String? = nil, cancelUrl: String, layout: LayoutEnum) { - self.title = title - self.background = background - self.cancelUrl = cancelUrl - self.layout = layout - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case title - case background - case cancelUrl = "cancel_url" - case layout - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(title, forKey: .title) - try container.encodeIfPresent(background, forKey: .background) - try container.encode(cancelUrl, forKey: .cancelUrl) - try container.encode(layout, forKey: .layout) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Coordinate.swift b/authentikClient/Classes/OpenAPIs/Models/Coordinate.swift deleted file mode 100644 index 2ad64c1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Coordinate.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Coordinate.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Coordinates for diagrams */ -public struct Coordinate: Codable, JSONEncodable, Hashable { - - public var xCord: Int - public var yCord: Int - - public init(xCord: Int, yCord: Int) { - self.xCord = xCord - self.yCord = yCord - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case xCord = "x_cord" - case yCord = "y_cord" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(xCord, forKey: .xCord) - try container.encode(yCord, forKey: .yCord) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/CurrentTenant.swift b/authentikClient/Classes/OpenAPIs/Models/CurrentTenant.swift deleted file mode 100644 index 2c64ba7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/CurrentTenant.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// CurrentTenant.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Partial tenant information for styling */ -public struct CurrentTenant: Codable, JSONEncodable, Hashable { - - public var matchedDomain: String - public var brandingTitle: String - public var brandingLogo: String - public var brandingFavicon: String - public var uiFooterLinks: [FooterLink] - public var uiTheme: UiThemeEnum - public var flowAuthentication: String? - public var flowInvalidation: String? - public var flowRecovery: String? - public var flowUnenrollment: String? - public var flowUserSettings: String? - public var flowDeviceCode: String? - public var defaultLocale: String - - public init(matchedDomain: String, brandingTitle: String, brandingLogo: String, brandingFavicon: String, uiFooterLinks: [FooterLink], uiTheme: UiThemeEnum, flowAuthentication: String? = nil, flowInvalidation: String? = nil, flowRecovery: String? = nil, flowUnenrollment: String? = nil, flowUserSettings: String? = nil, flowDeviceCode: String? = nil, defaultLocale: String) { - self.matchedDomain = matchedDomain - self.brandingTitle = brandingTitle - self.brandingLogo = brandingLogo - self.brandingFavicon = brandingFavicon - self.uiFooterLinks = uiFooterLinks - self.uiTheme = uiTheme - self.flowAuthentication = flowAuthentication - self.flowInvalidation = flowInvalidation - self.flowRecovery = flowRecovery - self.flowUnenrollment = flowUnenrollment - self.flowUserSettings = flowUserSettings - self.flowDeviceCode = flowDeviceCode - self.defaultLocale = defaultLocale - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case matchedDomain = "matched_domain" - case brandingTitle = "branding_title" - case brandingLogo = "branding_logo" - case brandingFavicon = "branding_favicon" - case uiFooterLinks = "ui_footer_links" - case uiTheme = "ui_theme" - case flowAuthentication = "flow_authentication" - case flowInvalidation = "flow_invalidation" - case flowRecovery = "flow_recovery" - case flowUnenrollment = "flow_unenrollment" - case flowUserSettings = "flow_user_settings" - case flowDeviceCode = "flow_device_code" - case defaultLocale = "default_locale" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(matchedDomain, forKey: .matchedDomain) - try container.encode(brandingTitle, forKey: .brandingTitle) - try container.encode(brandingLogo, forKey: .brandingLogo) - try container.encode(brandingFavicon, forKey: .brandingFavicon) - try container.encode(uiFooterLinks, forKey: .uiFooterLinks) - try container.encode(uiTheme, forKey: .uiTheme) - try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) - try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) - try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) - try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) - try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) - try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) - try container.encode(defaultLocale, forKey: .defaultLocale) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DeniedActionEnum.swift b/authentikClient/Classes/OpenAPIs/Models/DeniedActionEnum.swift deleted file mode 100644 index f8a0603..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DeniedActionEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// DeniedActionEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ -public enum DeniedActionEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case messageContinue = "message_continue" - case message = "message" - case _continue = "continue" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/DenyStage.swift b/authentikClient/Classes/OpenAPIs/Models/DenyStage.swift deleted file mode 100644 index 3814665..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DenyStage.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// DenyStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DenyStage Serializer */ -public struct DenyStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var denyMessage: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, denyMessage: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.denyMessage = denyMessage - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case denyMessage = "deny_message" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(denyMessage, forKey: .denyMessage) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DenyStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DenyStageRequest.swift deleted file mode 100644 index d6680fc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DenyStageRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// DenyStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DenyStage Serializer */ -public struct DenyStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var denyMessage: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, denyMessage: String? = nil) { - self.name = name - self.flowSet = flowSet - self.denyMessage = denyMessage - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case denyMessage = "deny_message" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(denyMessage, forKey: .denyMessage) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Device.swift b/authentikClient/Classes/OpenAPIs/Models/Device.swift deleted file mode 100644 index ce32729..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Device.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Device.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Duo authenticator devices */ -public struct Device: Codable, JSONEncodable, Hashable { - - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var pk: Int - public var name: String - /** Get type of device */ - public var type: String - public var confirmed: Bool - - public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: Int, name: String, type: String, confirmed: Bool) { - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.pk = pk - self.name = name - self.type = type - self.confirmed = confirmed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case pk - case name - case type - case confirmed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(type, forKey: .type) - try container.encode(confirmed, forKey: .confirmed) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DeviceChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/DeviceChallenge.swift deleted file mode 100644 index a4e5516..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DeviceChallenge.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// DeviceChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Single device challenge */ -public struct DeviceChallenge: Codable, JSONEncodable, Hashable { - - public var deviceClass: String - public var deviceUid: String - public var challenge: [String: AnyCodable] - - public init(deviceClass: String, deviceUid: String, challenge: [String: AnyCodable]) { - self.deviceClass = deviceClass - self.deviceUid = deviceUid - self.challenge = challenge - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case deviceClass = "device_class" - case deviceUid = "device_uid" - case challenge - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(deviceClass, forKey: .deviceClass) - try container.encode(deviceUid, forKey: .deviceUid) - try container.encode(challenge, forKey: .challenge) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DeviceChallengeRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DeviceChallengeRequest.swift deleted file mode 100644 index 6b5d793..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DeviceChallengeRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// DeviceChallengeRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Single device challenge */ -public struct DeviceChallengeRequest: Codable, JSONEncodable, Hashable { - - public var deviceClass: String - public var deviceUid: String - public var challenge: [String: AnyCodable] - - public init(deviceClass: String, deviceUid: String, challenge: [String: AnyCodable]) { - self.deviceClass = deviceClass - self.deviceUid = deviceUid - self.challenge = challenge - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case deviceClass = "device_class" - case deviceUid = "device_uid" - case challenge - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(deviceClass, forKey: .deviceClass) - try container.encode(deviceUid, forKey: .deviceUid) - try container.encode(challenge, forKey: .challenge) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DeviceClassesEnum.swift b/authentikClient/Classes/OpenAPIs/Models/DeviceClassesEnum.swift deleted file mode 100644 index 22a3502..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DeviceClassesEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// DeviceClassesEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `static` - Static * `totp` - TOTP * `webauthn` - WebAuthn * `duo` - Duo * `sms` - SMS */ -public enum DeviceClassesEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _static = "static" - case totp = "totp" - case webauthn = "webauthn" - case duo = "duo" - case sms = "sms" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/DigestAlgorithmEnum.swift b/authentikClient/Classes/OpenAPIs/Models/DigestAlgorithmEnum.swift deleted file mode 100644 index dedf55f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DigestAlgorithmEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// DigestAlgorithmEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 */ -public enum DigestAlgorithmEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _200009xmldsigHashSha1 = "http://www.w3.org/2000/09/xmldsig#sha1" - case _200104xmlencHashSha256 = "http://www.w3.org/2001/04/xmlenc#sha256" - case _200104xmldsigMoreHashSha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" - case _200104xmlencHashSha512 = "http://www.w3.org/2001/04/xmlenc#sha512" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/DigitsEnum.swift b/authentikClient/Classes/OpenAPIs/Models/DigitsEnum.swift deleted file mode 100644 index fafa386..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DigitsEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DigitsEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator */ -public enum DigitsEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _6 = "6" - case _8 = "8" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnection.swift deleted file mode 100644 index 85aab6a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnection.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// DockerServiceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DockerServiceConnection Serializer */ -public struct DockerServiceConnection: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. */ - public var url: String - /** CA which the endpoint's Certificate is verified against. Can be left empty for no validation. */ - public var tlsVerification: UUID? - /** Certificate/Key used for authentication. Can be left empty for no authentication. */ - public var tlsAuthentication: UUID? - - public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, url: String, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { - self.pk = pk - self.name = name - self.local = local - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.url = url - self.tlsVerification = tlsVerification - self.tlsAuthentication = tlsAuthentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case local - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case url - case tlsVerification = "tls_verification" - case tlsAuthentication = "tls_authentication" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(url, forKey: .url) - try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) - try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnectionRequest.swift deleted file mode 100644 index 5f36511..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DockerServiceConnectionRequest.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// DockerServiceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DockerServiceConnection Serializer */ -public struct DockerServiceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - /** Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. */ - public var url: String - /** CA which the endpoint's Certificate is verified against. Can be left empty for no validation. */ - public var tlsVerification: UUID? - /** Certificate/Key used for authentication. Can be left empty for no authentication. */ - public var tlsAuthentication: UUID? - - public init(name: String, local: Bool? = nil, url: String, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { - self.name = name - self.local = local - self.url = url - self.tlsVerification = tlsVerification - self.tlsAuthentication = tlsAuthentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case local - case url - case tlsVerification = "tls_verification" - case tlsAuthentication = "tls_authentication" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encode(url, forKey: .url) - try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) - try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/DummyChallenge.swift deleted file mode 100644 index 3e96854..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyChallenge.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// DummyChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Dummy challenge */ -public struct DummyChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-dummy" - public var responseErrors: [String: [ErrorDetail]]? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-dummy", responseErrors: [String: [ErrorDetail]]? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DummyChallengeResponseRequest.swift deleted file mode 100644 index f38e631..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// DummyChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Dummy challenge response */ -public struct DummyChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-dummy" - - public init(component: String? = "ak-stage-dummy") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/DummyPolicy.swift deleted file mode 100644 index 1e8666b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyPolicy.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// DummyPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Dummy Policy Serializer */ -public struct DummyPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - public var result: Bool? - public var waitMin: Int? - public var waitMax: Int? - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.result = result - self.waitMin = waitMin - self.waitMax = waitMax - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case result - case waitMin = "wait_min" - case waitMax = "wait_max" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encodeIfPresent(result, forKey: .result) - try container.encodeIfPresent(waitMin, forKey: .waitMin) - try container.encodeIfPresent(waitMax, forKey: .waitMax) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DummyPolicyRequest.swift deleted file mode 100644 index e79cdab..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyPolicyRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// DummyPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Dummy Policy Serializer */ -public struct DummyPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var result: Bool? - public var waitMin: Int? - public var waitMax: Int? - - public init(name: String, executionLogging: Bool? = nil, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.result = result - self.waitMin = waitMin - self.waitMax = waitMax - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case result - case waitMin = "wait_min" - case waitMax = "wait_max" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(result, forKey: .result) - try container.encodeIfPresent(waitMin, forKey: .waitMin) - try container.encodeIfPresent(waitMax, forKey: .waitMax) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyStage.swift b/authentikClient/Classes/OpenAPIs/Models/DummyStage.swift deleted file mode 100644 index 8ef2bae..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyStage.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// DummyStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DummyStage Serializer */ -public struct DummyStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var throwError: Bool? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, throwError: Bool? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.throwError = throwError - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case throwError = "throw_error" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(throwError, forKey: .throwError) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DummyStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DummyStageRequest.swift deleted file mode 100644 index 46fff01..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DummyStageRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// DummyStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DummyStage Serializer */ -public struct DummyStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var throwError: Bool? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, throwError: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.throwError = throwError - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case throwError = "throw_error" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(throwError, forKey: .throwError) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DuoDevice.swift b/authentikClient/Classes/OpenAPIs/Models/DuoDevice.swift deleted file mode 100644 index 0363446..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DuoDevice.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// DuoDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Duo authenticator devices */ -public struct DuoDevice: Codable, JSONEncodable, Hashable { - - public var pk: Int - /** The human-readable name of this device. */ - public var name: String - - public init(pk: Int, name: String) { - self.pk = pk - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DuoDeviceEnrollmentStatus.swift b/authentikClient/Classes/OpenAPIs/Models/DuoDeviceEnrollmentStatus.swift deleted file mode 100644 index 89bad8f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DuoDeviceEnrollmentStatus.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DuoDeviceEnrollmentStatus.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DuoDeviceEnrollmentStatus: Codable, JSONEncodable, Hashable { - - public var duoResponse: DuoResponseEnum - - public init(duoResponse: DuoResponseEnum) { - self.duoResponse = duoResponse - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case duoResponse = "duo_response" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(duoResponse, forKey: .duoResponse) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DuoDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/DuoDeviceRequest.swift deleted file mode 100644 index 95eddd5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DuoDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// DuoDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Duo authenticator devices */ -public struct DuoDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/DuoResponseEnum.swift b/authentikClient/Classes/OpenAPIs/Models/DuoResponseEnum.swift deleted file mode 100644 index f9e2ff9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/DuoResponseEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// DuoResponseEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `success` - Success * `waiting` - Waiting * `invalid` - Invalid */ -public enum DuoResponseEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case success = "success" - case waiting = "waiting" - case invalid = "invalid" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/EmailChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/EmailChallenge.swift deleted file mode 100644 index ba86d31..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EmailChallenge.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// EmailChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Email challenge */ -public struct EmailChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-email" - public var responseErrors: [String: [ErrorDetail]]? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-email", responseErrors: [String: [ErrorDetail]]? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EmailChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/EmailChallengeResponseRequest.swift deleted file mode 100644 index da95850..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EmailChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EmailChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Email challenge resposen. No fields. This challenge is always declared invalid to give the user a chance to retry */ -public struct EmailChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-email" - - public init(component: String? = "ak-stage-email") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EmailStage.swift b/authentikClient/Classes/OpenAPIs/Models/EmailStage.swift deleted file mode 100644 index c26e112..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EmailStage.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// EmailStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** EmailStage Serializer */ -public struct EmailStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** When enabled, global Email connection settings will be used and connection settings below will be ignored. */ - public var useGlobalSettings: Bool? - public var host: String? - public var port: Int? - public var username: String? - public var useTls: Bool? - public var useSsl: Bool? - public var timeout: Int? - public var fromAddress: String? - /** Time in minutes the token sent is valid. */ - public var tokenExpiry: Int? - public var subject: String? - public var template: String? - /** Activate users upon completion of stage. */ - public var activateUserOnSuccess: Bool? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.useGlobalSettings = useGlobalSettings - self.host = host - self.port = port - self.username = username - self.useTls = useTls - self.useSsl = useSsl - self.timeout = timeout - self.fromAddress = fromAddress - self.tokenExpiry = tokenExpiry - self.subject = subject - self.template = template - self.activateUserOnSuccess = activateUserOnSuccess - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case useGlobalSettings = "use_global_settings" - case host - case port - case username - case useTls = "use_tls" - case useSsl = "use_ssl" - case timeout - case fromAddress = "from_address" - case tokenExpiry = "token_expiry" - case subject - case template - case activateUserOnSuccess = "activate_user_on_success" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) - try container.encodeIfPresent(host, forKey: .host) - try container.encodeIfPresent(port, forKey: .port) - try container.encodeIfPresent(username, forKey: .username) - try container.encodeIfPresent(useTls, forKey: .useTls) - try container.encodeIfPresent(useSsl, forKey: .useSsl) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(fromAddress, forKey: .fromAddress) - try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) - try container.encodeIfPresent(subject, forKey: .subject) - try container.encodeIfPresent(template, forKey: .template) - try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EmailStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/EmailStageRequest.swift deleted file mode 100644 index 99b84d5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EmailStageRequest.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// EmailStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** EmailStage Serializer */ -public struct EmailStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** When enabled, global Email connection settings will be used and connection settings below will be ignored. */ - public var useGlobalSettings: Bool? - public var host: String? - public var port: Int? - public var username: String? - public var password: String? - public var useTls: Bool? - public var useSsl: Bool? - public var timeout: Int? - public var fromAddress: String? - /** Time in minutes the token sent is valid. */ - public var tokenExpiry: Int? - public var subject: String? - public var template: String? - /** Activate users upon completion of stage. */ - public var activateUserOnSuccess: Bool? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, password: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.useGlobalSettings = useGlobalSettings - self.host = host - self.port = port - self.username = username - self.password = password - self.useTls = useTls - self.useSsl = useSsl - self.timeout = timeout - self.fromAddress = fromAddress - self.tokenExpiry = tokenExpiry - self.subject = subject - self.template = template - self.activateUserOnSuccess = activateUserOnSuccess - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case useGlobalSettings = "use_global_settings" - case host - case port - case username - case password - case useTls = "use_tls" - case useSsl = "use_ssl" - case timeout - case fromAddress = "from_address" - case tokenExpiry = "token_expiry" - case subject - case template - case activateUserOnSuccess = "activate_user_on_success" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) - try container.encodeIfPresent(host, forKey: .host) - try container.encodeIfPresent(port, forKey: .port) - try container.encodeIfPresent(username, forKey: .username) - try container.encodeIfPresent(password, forKey: .password) - try container.encodeIfPresent(useTls, forKey: .useTls) - try container.encodeIfPresent(useSsl, forKey: .useSsl) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(fromAddress, forKey: .fromAddress) - try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) - try container.encodeIfPresent(subject, forKey: .subject) - try container.encodeIfPresent(template, forKey: .template) - try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ErrorDetail.swift b/authentikClient/Classes/OpenAPIs/Models/ErrorDetail.swift deleted file mode 100644 index 224538f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ErrorDetail.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// ErrorDetail.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for rest_framework's error messages */ -public struct ErrorDetail: Codable, JSONEncodable, Hashable { - - public var string: String - public var code: String - - public init(string: String, code: String) { - self.string = string - self.code = code - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case string - case code - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(string, forKey: .string) - try container.encode(code, forKey: .code) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ErrorReportingConfig.swift b/authentikClient/Classes/OpenAPIs/Models/ErrorReportingConfig.swift deleted file mode 100644 index 6ad722d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ErrorReportingConfig.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// ErrorReportingConfig.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Config for error reporting */ -public struct ErrorReportingConfig: Codable, JSONEncodable, Hashable { - - public var enabled: Bool - public var sentryDsn: String - public var environment: String - public var sendPii: Bool - public var tracesSampleRate: Double - - public init(enabled: Bool, sentryDsn: String, environment: String, sendPii: Bool, tracesSampleRate: Double) { - self.enabled = enabled - self.sentryDsn = sentryDsn - self.environment = environment - self.sendPii = sendPii - self.tracesSampleRate = tracesSampleRate - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case enabled - case sentryDsn = "sentry_dsn" - case environment - case sendPii = "send_pii" - case tracesSampleRate = "traces_sample_rate" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(enabled, forKey: .enabled) - try container.encode(sentryDsn, forKey: .sentryDsn) - try container.encode(environment, forKey: .environment) - try container.encode(sendPii, forKey: .sendPii) - try container.encode(tracesSampleRate, forKey: .tracesSampleRate) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Event.swift b/authentikClient/Classes/OpenAPIs/Models/Event.swift deleted file mode 100644 index 54454e8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Event.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// Event.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Serializer */ -public struct Event: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var user: [String: AnyCodable]? - public var action: EventActions - public var app: String - public var context: [String: AnyCodable]? - public var clientIp: String? - public var created: Date - public var expires: Date? - public var tenant: [String: AnyCodable]? - - public init(pk: UUID, user: [String: AnyCodable]? = nil, action: EventActions, app: String, context: [String: AnyCodable]? = nil, clientIp: String? = nil, created: Date, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { - self.pk = pk - self.user = user - self.action = action - self.app = app - self.context = context - self.clientIp = clientIp - self.created = created - self.expires = expires - self.tenant = tenant - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case user - case action - case app - case context - case clientIp = "client_ip" - case created - case expires - case tenant - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(user, forKey: .user) - try container.encode(action, forKey: .action) - try container.encode(app, forKey: .app) - try container.encodeIfPresent(context, forKey: .context) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encode(created, forKey: .created) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(tenant, forKey: .tenant) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicy.swift deleted file mode 100644 index 6001257..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicy.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// EventMatcherPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Matcher Policy Serializer */ -public struct EventMatcherPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - /** Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix */ - public var action: EventActions? - /** Matches Event's Client IP (strict matching, for network matching use an Expression Policy) */ - public var clientIp: String? - /** Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise */ - public var app: AppEnum? - /** Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License */ - public var model: ModelEnum? - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.action = action - self.clientIp = clientIp - self.app = app - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case action - case clientIp = "client_ip" - case app - case model - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encodeIfPresent(action, forKey: .action) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encodeIfPresent(app, forKey: .app) - try container.encodeIfPresent(model, forKey: .model) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicyRequest.swift deleted file mode 100644 index b3ff3c1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EventMatcherPolicyRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// EventMatcherPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Matcher Policy Serializer */ -public struct EventMatcherPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix */ - public var action: EventActions? - /** Matches Event's Client IP (strict matching, for network matching use an Expression Policy) */ - public var clientIp: String? - /** Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise */ - public var app: AppEnum? - /** Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License */ - public var model: ModelEnum? - - public init(name: String, executionLogging: Bool? = nil, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { - self.name = name - self.executionLogging = executionLogging - self.action = action - self.clientIp = clientIp - self.app = app - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case action - case clientIp = "client_ip" - case app - case model - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(action, forKey: .action) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encodeIfPresent(app, forKey: .app) - try container.encodeIfPresent(model, forKey: .model) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EventRequest.swift b/authentikClient/Classes/OpenAPIs/Models/EventRequest.swift deleted file mode 100644 index 9ec640c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EventRequest.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// EventRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Serializer */ -public struct EventRequest: Codable, JSONEncodable, Hashable { - - public var user: [String: AnyCodable]? - public var action: EventActions - public var app: String - public var context: [String: AnyCodable]? - public var clientIp: String? - public var expires: Date? - public var tenant: [String: AnyCodable]? - - public init(user: [String: AnyCodable]? = nil, action: EventActions, app: String, context: [String: AnyCodable]? = nil, clientIp: String? = nil, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { - self.user = user - self.action = action - self.app = app - self.context = context - self.clientIp = clientIp - self.expires = expires - self.tenant = tenant - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case action - case app - case context - case clientIp = "client_ip" - case expires - case tenant - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(user, forKey: .user) - try container.encode(action, forKey: .action) - try container.encode(app, forKey: .app) - try container.encodeIfPresent(context, forKey: .context) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(tenant, forKey: .tenant) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/EventTopPerUser.swift b/authentikClient/Classes/OpenAPIs/Models/EventTopPerUser.swift deleted file mode 100644 index e27b4ac..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/EventTopPerUser.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// EventTopPerUser.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Response object of Event's top_per_user */ -public struct EventTopPerUser: Codable, JSONEncodable, Hashable { - - public var application: [String: AnyCodable] - public var countedEvents: Int - public var uniqueUsers: Int - - public init(application: [String: AnyCodable], countedEvents: Int, uniqueUsers: Int) { - self.application = application - self.countedEvents = countedEvents - self.uniqueUsers = uniqueUsers - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case application - case countedEvents = "counted_events" - case uniqueUsers = "unique_users" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(application, forKey: .application) - try container.encode(countedEvents, forKey: .countedEvents) - try container.encode(uniqueUsers, forKey: .uniqueUsers) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ExpiringBaseGrantModel.swift b/authentikClient/Classes/OpenAPIs/Models/ExpiringBaseGrantModel.swift deleted file mode 100644 index 820b82f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ExpiringBaseGrantModel.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// ExpiringBaseGrantModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for BaseGrantModel and ExpiringBaseGrant */ -public struct ExpiringBaseGrantModel: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var provider: OAuth2Provider - public var user: User - /** Check if token is expired yet. */ - public var isExpired: Bool - public var expires: Date? - public var scope: [String] - - public init(pk: Int, provider: OAuth2Provider, user: User, isExpired: Bool, expires: Date? = nil, scope: [String]) { - self.pk = pk - self.provider = provider - self.user = user - self.isExpired = isExpired - self.expires = expires - self.scope = scope - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case provider - case user - case isExpired = "is_expired" - case expires - case scope - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(provider, forKey: .provider) - try container.encode(user, forKey: .user) - try container.encode(isExpired, forKey: .isExpired) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encode(scope, forKey: .scope) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicy.swift deleted file mode 100644 index aae0bb9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicy.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// ExpressionPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Membership Policy Serializer */ -public struct ExpressionPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - public var expression: String - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, expression: String) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encode(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicyRequest.swift deleted file mode 100644 index 7621b0d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ExpressionPolicyRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// ExpressionPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Membership Policy Serializer */ -public struct ExpressionPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var expression: String - - public init(name: String, executionLogging: Bool? = nil, expression: String) { - self.name = name - self.executionLogging = executionLogging - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ExtraRoleObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/ExtraRoleObjectPermission.swift deleted file mode 100644 index f2d7ffd..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ExtraRoleObjectPermission.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// ExtraRoleObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User permission with additional object-related data */ -public struct ExtraRoleObjectPermission: Codable, JSONEncodable, Hashable { - - public var id: Int - public var codename: String - public var model: String - public var appLabel: String - public var objectPk: String - public var name: String - /** Get app label from permission's model */ - public var appLabelVerbose: String - /** Get model label from permission's model */ - public var modelVerbose: String - /** Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object */ - public var objectDescription: String? - - public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String, appLabelVerbose: String, modelVerbose: String, objectDescription: String?) { - self.id = id - self.codename = codename - self.model = model - self.appLabel = appLabel - self.objectPk = objectPk - self.name = name - self.appLabelVerbose = appLabelVerbose - self.modelVerbose = modelVerbose - self.objectDescription = objectDescription - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case id - case codename - case model - case appLabel = "app_label" - case objectPk = "object_pk" - case name - case appLabelVerbose = "app_label_verbose" - case modelVerbose = "model_verbose" - case objectDescription = "object_description" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(codename, forKey: .codename) - try container.encode(model, forKey: .model) - try container.encode(appLabel, forKey: .appLabel) - try container.encode(objectPk, forKey: .objectPk) - try container.encode(name, forKey: .name) - try container.encode(appLabelVerbose, forKey: .appLabelVerbose) - try container.encode(modelVerbose, forKey: .modelVerbose) - try container.encode(objectDescription, forKey: .objectDescription) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ExtraUserObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/ExtraUserObjectPermission.swift deleted file mode 100644 index a780b32..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ExtraUserObjectPermission.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// ExtraUserObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User permission with additional object-related data */ -public struct ExtraUserObjectPermission: Codable, JSONEncodable, Hashable { - - public var id: Int - public var codename: String - public var model: String - public var appLabel: String - public var objectPk: String - public var name: String - /** Get app label from permission's model */ - public var appLabelVerbose: String - /** Get model label from permission's model */ - public var modelVerbose: String - /** Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object */ - public var objectDescription: String? - - public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String, appLabelVerbose: String, modelVerbose: String, objectDescription: String?) { - self.id = id - self.codename = codename - self.model = model - self.appLabel = appLabel - self.objectPk = objectPk - self.name = name - self.appLabelVerbose = appLabelVerbose - self.modelVerbose = modelVerbose - self.objectDescription = objectDescription - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case id - case codename - case model - case appLabel = "app_label" - case objectPk = "object_pk" - case name - case appLabelVerbose = "app_label_verbose" - case modelVerbose = "model_verbose" - case objectDescription = "object_description" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(codename, forKey: .codename) - try container.encode(model, forKey: .model) - try container.encode(appLabel, forKey: .appLabel) - try container.encode(objectPk, forKey: .objectPk) - try container.encode(name, forKey: .name) - try container.encode(appLabelVerbose, forKey: .appLabelVerbose) - try container.encode(modelVerbose, forKey: .modelVerbose) - try container.encode(objectDescription, forKey: .objectDescription) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FilePathRequest.swift b/authentikClient/Classes/OpenAPIs/Models/FilePathRequest.swift deleted file mode 100644 index da278c4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FilePathRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// FilePathRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer to upload file */ -public struct FilePathRequest: Codable, JSONEncodable, Hashable { - - public var url: String - - public init(url: String) { - self.url = url - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case url - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(url, forKey: .url) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Flow.swift b/authentikClient/Classes/OpenAPIs/Models/Flow.swift deleted file mode 100644 index 1a9209a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Flow.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// Flow.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Flow Serializer */ -public struct Flow: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var policybindingmodelPtrId: UUID - public var name: String - /** Visible in the URL. */ - public var slug: String - /** Shown as the Title in Flow pages. */ - public var title: String - /** Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ - public var designation: FlowDesignationEnum - /** Get the URL to the background image. If the name is /static or starts with http it is returned as-is */ - public var background: String - public var stages: [UUID] - public var policies: [UUID] - /** Get count of cached flows */ - public var cacheCount: Int - public var policyEngineMode: PolicyEngineMode? - /** Enable compatibility mode, increases compatibility with password managers on mobile devices. */ - public var compatibilityMode: Bool? - /** Get export URL for flow */ - public var exportUrl: String - public var layout: LayoutEnum? - /** Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ - public var deniedAction: DeniedActionEnum? - /** Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser */ - public var authentication: AuthenticationEnum? - - public init(pk: UUID, policybindingmodelPtrId: UUID, name: String, slug: String, title: String, designation: FlowDesignationEnum, background: String, stages: [UUID], policies: [UUID], cacheCount: Int, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, exportUrl: String, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { - self.pk = pk - self.policybindingmodelPtrId = policybindingmodelPtrId - self.name = name - self.slug = slug - self.title = title - self.designation = designation - self.background = background - self.stages = stages - self.policies = policies - self.cacheCount = cacheCount - self.policyEngineMode = policyEngineMode - self.compatibilityMode = compatibilityMode - self.exportUrl = exportUrl - self.layout = layout - self.deniedAction = deniedAction - self.authentication = authentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case policybindingmodelPtrId = "policybindingmodel_ptr_id" - case name - case slug - case title - case designation - case background - case stages - case policies - case cacheCount = "cache_count" - case policyEngineMode = "policy_engine_mode" - case compatibilityMode = "compatibility_mode" - case exportUrl = "export_url" - case layout - case deniedAction = "denied_action" - case authentication - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encode(title, forKey: .title) - try container.encode(designation, forKey: .designation) - try container.encode(background, forKey: .background) - try container.encode(stages, forKey: .stages) - try container.encode(policies, forKey: .policies) - try container.encode(cacheCount, forKey: .cacheCount) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) - try container.encode(exportUrl, forKey: .exportUrl) - try container.encodeIfPresent(layout, forKey: .layout) - try container.encodeIfPresent(deniedAction, forKey: .deniedAction) - try container.encodeIfPresent(authentication, forKey: .authentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowDesignationEnum.swift b/authentikClient/Classes/OpenAPIs/Models/FlowDesignationEnum.swift deleted file mode 100644 index e418b40..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowDesignationEnum.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// FlowDesignationEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ -public enum FlowDesignationEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case authentication = "authentication" - case authorization = "authorization" - case invalidation = "invalidation" - case enrollment = "enrollment" - case unenrollment = "unenrollment" - case recovery = "recovery" - case stageConfiguration = "stage_configuration" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowDiagram.swift b/authentikClient/Classes/OpenAPIs/Models/FlowDiagram.swift deleted file mode 100644 index 36a0304..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowDiagram.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// FlowDiagram.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** response of the flow's diagram action */ -public struct FlowDiagram: Codable, JSONEncodable, Hashable { - - public var diagram: String - - public init(diagram: String) { - self.diagram = diagram - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case diagram - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(diagram, forKey: .diagram) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowErrorChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/FlowErrorChallenge.swift deleted file mode 100644 index 2134804..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowErrorChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// FlowErrorChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge class when an unhandled error occurs during a stage. Normal users are shown an error message, superusers are shown a full stacktrace. */ -public struct FlowErrorChallenge: Codable, JSONEncodable, Hashable { - - public var type: String? = "native" - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-flow-error" - public var responseErrors: [String: [ErrorDetail]]? - public var requestId: String - public var error: String? - public var traceback: String? - - public init(type: String? = "native", flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-flow-error", responseErrors: [String: [ErrorDetail]]? = nil, requestId: String, error: String? = nil, traceback: String? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.requestId = requestId - self.error = error - self.traceback = traceback - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case requestId = "request_id" - case error - case traceback - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(requestId, forKey: .requestId) - try container.encodeIfPresent(error, forKey: .error) - try container.encodeIfPresent(traceback, forKey: .traceback) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowImportResult.swift b/authentikClient/Classes/OpenAPIs/Models/FlowImportResult.swift deleted file mode 100644 index 57026f5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowImportResult.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// FlowImportResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Logs of an attempted flow import */ -public struct FlowImportResult: Codable, JSONEncodable, Hashable { - - public var logs: [[String: AnyCodable]] - public var success: Bool - - public init(logs: [[String: AnyCodable]], success: Bool) { - self.logs = logs - self.success = success - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case logs - case success - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(logs, forKey: .logs) - try container.encode(success, forKey: .success) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowInspection.swift b/authentikClient/Classes/OpenAPIs/Models/FlowInspection.swift deleted file mode 100644 index bd33ee4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowInspection.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// FlowInspection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for inspect endpoint */ -public struct FlowInspection: Codable, JSONEncodable, Hashable { - - public var plans: [FlowInspectorPlan] - public var currentPlan: FlowInspectorPlan? - public var isCompleted: Bool - - public init(plans: [FlowInspectorPlan], currentPlan: FlowInspectorPlan? = nil, isCompleted: Bool) { - self.plans = plans - self.currentPlan = currentPlan - self.isCompleted = isCompleted - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case plans - case currentPlan = "current_plan" - case isCompleted = "is_completed" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(plans, forKey: .plans) - try container.encodeIfPresent(currentPlan, forKey: .currentPlan) - try container.encode(isCompleted, forKey: .isCompleted) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowInspectorPlan.swift b/authentikClient/Classes/OpenAPIs/Models/FlowInspectorPlan.swift deleted file mode 100644 index ab5c0dc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowInspectorPlan.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// FlowInspectorPlan.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for an active FlowPlan */ -public struct FlowInspectorPlan: Codable, JSONEncodable, Hashable { - - public var currentStage: FlowStageBinding - public var nextPlannedStage: FlowStageBinding - /** Get the plan's context, sanitized */ - public var planContext: [String: AnyCodable] - /** Get a unique session ID */ - public var sessionId: String - - public init(currentStage: FlowStageBinding, nextPlannedStage: FlowStageBinding, planContext: [String: AnyCodable], sessionId: String) { - self.currentStage = currentStage - self.nextPlannedStage = nextPlannedStage - self.planContext = planContext - self.sessionId = sessionId - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case currentStage = "current_stage" - case nextPlannedStage = "next_planned_stage" - case planContext = "plan_context" - case sessionId = "session_id" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(currentStage, forKey: .currentStage) - try container.encode(nextPlannedStage, forKey: .nextPlannedStage) - try container.encode(planContext, forKey: .planContext) - try container.encode(sessionId, forKey: .sessionId) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowRequest.swift b/authentikClient/Classes/OpenAPIs/Models/FlowRequest.swift deleted file mode 100644 index efa8d09..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowRequest.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// FlowRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Flow Serializer */ -public struct FlowRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Visible in the URL. */ - public var slug: String - /** Shown as the Title in Flow pages. */ - public var title: String - /** Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ - public var designation: FlowDesignationEnum - public var policyEngineMode: PolicyEngineMode? - /** Enable compatibility mode, increases compatibility with password managers on mobile devices. */ - public var compatibilityMode: Bool? - public var layout: LayoutEnum? - /** Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ - public var deniedAction: DeniedActionEnum? - /** Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser */ - public var authentication: AuthenticationEnum? - - public init(name: String, slug: String, title: String, designation: FlowDesignationEnum, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { - self.name = name - self.slug = slug - self.title = title - self.designation = designation - self.policyEngineMode = policyEngineMode - self.compatibilityMode = compatibilityMode - self.layout = layout - self.deniedAction = deniedAction - self.authentication = authentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case title - case designation - case policyEngineMode = "policy_engine_mode" - case compatibilityMode = "compatibility_mode" - case layout - case deniedAction = "denied_action" - case authentication - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encode(title, forKey: .title) - try container.encode(designation, forKey: .designation) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) - try container.encodeIfPresent(layout, forKey: .layout) - try container.encodeIfPresent(deniedAction, forKey: .deniedAction) - try container.encodeIfPresent(authentication, forKey: .authentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowSet.swift b/authentikClient/Classes/OpenAPIs/Models/FlowSet.swift deleted file mode 100644 index 36d0d21..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowSet.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// FlowSet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stripped down flow serializer */ -public struct FlowSet: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var policybindingmodelPtrId: UUID - public var name: String - /** Visible in the URL. */ - public var slug: String - /** Shown as the Title in Flow pages. */ - public var title: String - /** Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ - public var designation: FlowDesignationEnum - /** Get the URL to the background image. If the name is /static or starts with http it is returned as-is */ - public var background: String - public var policyEngineMode: PolicyEngineMode? - /** Enable compatibility mode, increases compatibility with password managers on mobile devices. */ - public var compatibilityMode: Bool? - /** Get export URL for flow */ - public var exportUrl: String - public var layout: LayoutEnum? - /** Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ - public var deniedAction: DeniedActionEnum? - - public init(pk: UUID, policybindingmodelPtrId: UUID, name: String, slug: String, title: String, designation: FlowDesignationEnum, background: String, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, exportUrl: String, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil) { - self.pk = pk - self.policybindingmodelPtrId = policybindingmodelPtrId - self.name = name - self.slug = slug - self.title = title - self.designation = designation - self.background = background - self.policyEngineMode = policyEngineMode - self.compatibilityMode = compatibilityMode - self.exportUrl = exportUrl - self.layout = layout - self.deniedAction = deniedAction - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case policybindingmodelPtrId = "policybindingmodel_ptr_id" - case name - case slug - case title - case designation - case background - case policyEngineMode = "policy_engine_mode" - case compatibilityMode = "compatibility_mode" - case exportUrl = "export_url" - case layout - case deniedAction = "denied_action" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encode(title, forKey: .title) - try container.encode(designation, forKey: .designation) - try container.encode(background, forKey: .background) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) - try container.encode(exportUrl, forKey: .exportUrl) - try container.encodeIfPresent(layout, forKey: .layout) - try container.encodeIfPresent(deniedAction, forKey: .deniedAction) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowSetRequest.swift b/authentikClient/Classes/OpenAPIs/Models/FlowSetRequest.swift deleted file mode 100644 index b98f9b0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowSetRequest.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// FlowSetRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stripped down flow serializer */ -public struct FlowSetRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Visible in the URL. */ - public var slug: String - /** Shown as the Title in Flow pages. */ - public var title: String - /** Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ - public var designation: FlowDesignationEnum - public var policyEngineMode: PolicyEngineMode? - /** Enable compatibility mode, increases compatibility with password managers on mobile devices. */ - public var compatibilityMode: Bool? - public var layout: LayoutEnum? - /** Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ - public var deniedAction: DeniedActionEnum? - - public init(name: String, slug: String, title: String, designation: FlowDesignationEnum, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil) { - self.name = name - self.slug = slug - self.title = title - self.designation = designation - self.policyEngineMode = policyEngineMode - self.compatibilityMode = compatibilityMode - self.layout = layout - self.deniedAction = deniedAction - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case title - case designation - case policyEngineMode = "policy_engine_mode" - case compatibilityMode = "compatibility_mode" - case layout - case deniedAction = "denied_action" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encode(title, forKey: .title) - try container.encode(designation, forKey: .designation) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) - try container.encodeIfPresent(layout, forKey: .layout) - try container.encodeIfPresent(deniedAction, forKey: .deniedAction) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowStageBinding.swift b/authentikClient/Classes/OpenAPIs/Models/FlowStageBinding.swift deleted file mode 100644 index b1c2585..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowStageBinding.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// FlowStageBinding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** FlowStageBinding Serializer */ -public struct FlowStageBinding: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var policybindingmodelPtrId: UUID - public var target: UUID - public var stage: UUID - public var stageObj: Stage - /** Evaluate policies during the Flow planning process. */ - public var evaluateOnPlan: Bool? - /** Evaluate policies when the Stage is present to the user. */ - public var reEvaluatePolicies: Bool? - public var order: Int - public var policyEngineMode: PolicyEngineMode? - /** Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context */ - public var invalidResponseAction: InvalidResponseActionEnum? - - public init(pk: UUID, policybindingmodelPtrId: UUID, target: UUID, stage: UUID, stageObj: Stage, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { - self.pk = pk - self.policybindingmodelPtrId = policybindingmodelPtrId - self.target = target - self.stage = stage - self.stageObj = stageObj - self.evaluateOnPlan = evaluateOnPlan - self.reEvaluatePolicies = reEvaluatePolicies - self.order = order - self.policyEngineMode = policyEngineMode - self.invalidResponseAction = invalidResponseAction - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case policybindingmodelPtrId = "policybindingmodel_ptr_id" - case target - case stage - case stageObj = "stage_obj" - case evaluateOnPlan = "evaluate_on_plan" - case reEvaluatePolicies = "re_evaluate_policies" - case order - case policyEngineMode = "policy_engine_mode" - case invalidResponseAction = "invalid_response_action" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) - try container.encode(target, forKey: .target) - try container.encode(stage, forKey: .stage) - try container.encode(stageObj, forKey: .stageObj) - try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) - try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) - try container.encode(order, forKey: .order) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowStageBindingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/FlowStageBindingRequest.swift deleted file mode 100644 index 936b8aa..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FlowStageBindingRequest.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// FlowStageBindingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** FlowStageBinding Serializer */ -public struct FlowStageBindingRequest: Codable, JSONEncodable, Hashable { - - public var target: UUID - public var stage: UUID - /** Evaluate policies during the Flow planning process. */ - public var evaluateOnPlan: Bool? - /** Evaluate policies when the Stage is present to the user. */ - public var reEvaluatePolicies: Bool? - public var order: Int - public var policyEngineMode: PolicyEngineMode? - /** Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context */ - public var invalidResponseAction: InvalidResponseActionEnum? - - public init(target: UUID, stage: UUID, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { - self.target = target - self.stage = stage - self.evaluateOnPlan = evaluateOnPlan - self.reEvaluatePolicies = reEvaluatePolicies - self.order = order - self.policyEngineMode = policyEngineMode - self.invalidResponseAction = invalidResponseAction - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case target - case stage - case evaluateOnPlan = "evaluate_on_plan" - case reEvaluatePolicies = "re_evaluate_policies" - case order - case policyEngineMode = "policy_engine_mode" - case invalidResponseAction = "invalid_response_action" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(target, forKey: .target) - try container.encode(stage, forKey: .stage) - try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) - try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) - try container.encode(order, forKey: .order) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/FooterLink.swift b/authentikClient/Classes/OpenAPIs/Models/FooterLink.swift deleted file mode 100644 index 5a3a26c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/FooterLink.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// FooterLink.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Links returned in Config API */ -public struct FooterLink: Codable, JSONEncodable, Hashable { - - public var href: String - public var name: String - - public init(href: String, name: String) { - self.href = href - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case href - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(href, forKey: .href) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/GenericError.swift b/authentikClient/Classes/OpenAPIs/Models/GenericError.swift deleted file mode 100644 index 9ccc1ca..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/GenericError.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// GenericError.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Generic API Error */ -public struct GenericError: Codable, JSONEncodable, Hashable { - - public var detail: String - public var code: String? - - public init(detail: String, code: String? = nil) { - self.detail = detail - self.code = code - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case detail - case code - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(detail, forKey: .detail) - try container.encodeIfPresent(code, forKey: .code) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Group.swift b/authentikClient/Classes/OpenAPIs/Models/Group.swift deleted file mode 100644 index e74ff1e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Group.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Group.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Serializer */ -public struct Group: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var numPk: Int - public var name: String - /** Users added to this group will be superusers. */ - public var isSuperuser: Bool? - public var parent: UUID? - public var parentName: String? - public var users: [Int]? - public var usersObj: [GroupMember] - public var attributes: [String: AnyCodable]? - public var roles: [UUID]? - public var rolesObj: [Role] - - public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String?, users: [Int]? = nil, usersObj: [GroupMember], attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil, rolesObj: [Role]) { - self.pk = pk - self.numPk = numPk - self.name = name - self.isSuperuser = isSuperuser - self.parent = parent - self.parentName = parentName - self.users = users - self.usersObj = usersObj - self.attributes = attributes - self.roles = roles - self.rolesObj = rolesObj - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case numPk = "num_pk" - case name - case isSuperuser = "is_superuser" - case parent - case parentName = "parent_name" - case users - case usersObj = "users_obj" - case attributes - case roles - case rolesObj = "roles_obj" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(numPk, forKey: .numPk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(parent, forKey: .parent) - try container.encode(parentName, forKey: .parentName) - try container.encodeIfPresent(users, forKey: .users) - try container.encode(usersObj, forKey: .usersObj) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encodeIfPresent(roles, forKey: .roles) - try container.encode(rolesObj, forKey: .rolesObj) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/GroupMember.swift b/authentikClient/Classes/OpenAPIs/Models/GroupMember.swift deleted file mode 100644 index 2127240..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/GroupMember.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// GroupMember.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stripped down user serializer to show relevant users for groups */ -public struct GroupMember: Codable, JSONEncodable, Hashable { - - public var pk: Int - /** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var email: String? - public var attributes: [String: AnyCodable]? - public var uid: String - - public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, uid: String) { - self.pk = pk - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.email = email - self.attributes = attributes - self.uid = uid - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case email - case attributes - case uid - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encodeIfPresent(email, forKey: .email) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encode(uid, forKey: .uid) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/GroupMemberRequest.swift b/authentikClient/Classes/OpenAPIs/Models/GroupMemberRequest.swift deleted file mode 100644 index 83590d1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/GroupMemberRequest.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// GroupMemberRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stripped down user serializer to show relevant users for groups */ -public struct GroupMemberRequest: Codable, JSONEncodable, Hashable { - - /** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var email: String? - public var attributes: [String: AnyCodable]? - - public init(username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil) { - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.email = email - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case email - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encodeIfPresent(email, forKey: .email) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/GroupRequest.swift b/authentikClient/Classes/OpenAPIs/Models/GroupRequest.swift deleted file mode 100644 index 29c6ab5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/GroupRequest.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// GroupRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Serializer */ -public struct GroupRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Users added to this group will be superusers. */ - public var isSuperuser: Bool? - public var parent: UUID? - public var users: [Int]? - public var attributes: [String: AnyCodable]? - public var roles: [UUID]? - - public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil) { - self.name = name - self.isSuperuser = isSuperuser - self.parent = parent - self.users = users - self.attributes = attributes - self.roles = roles - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case isSuperuser = "is_superuser" - case parent - case users - case attributes - case roles - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(parent, forKey: .parent) - try container.encodeIfPresent(users, forKey: .users) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encodeIfPresent(roles, forKey: .roles) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IdentificationChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/IdentificationChallenge.swift deleted file mode 100644 index 14facc3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IdentificationChallenge.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// IdentificationChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Identification challenges with all UI elements */ -public struct IdentificationChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-identification" - public var responseErrors: [String: [ErrorDetail]]? - public var userFields: [String]? - public var passwordFields: Bool - public var applicationPre: String? - public var enrollUrl: String? - public var recoveryUrl: String? - public var passwordlessUrl: String? - public var primaryAction: String - public var sources: [LoginSource]? - public var showSourceLabels: Bool - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-identification", responseErrors: [String: [ErrorDetail]]? = nil, userFields: [String]?, passwordFields: Bool, applicationPre: String? = nil, enrollUrl: String? = nil, recoveryUrl: String? = nil, passwordlessUrl: String? = nil, primaryAction: String, sources: [LoginSource]? = nil, showSourceLabels: Bool) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.userFields = userFields - self.passwordFields = passwordFields - self.applicationPre = applicationPre - self.enrollUrl = enrollUrl - self.recoveryUrl = recoveryUrl - self.passwordlessUrl = passwordlessUrl - self.primaryAction = primaryAction - self.sources = sources - self.showSourceLabels = showSourceLabels - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case userFields = "user_fields" - case passwordFields = "password_fields" - case applicationPre = "application_pre" - case enrollUrl = "enroll_url" - case recoveryUrl = "recovery_url" - case passwordlessUrl = "passwordless_url" - case primaryAction = "primary_action" - case sources - case showSourceLabels = "show_source_labels" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(userFields, forKey: .userFields) - try container.encode(passwordFields, forKey: .passwordFields) - try container.encodeIfPresent(applicationPre, forKey: .applicationPre) - try container.encodeIfPresent(enrollUrl, forKey: .enrollUrl) - try container.encodeIfPresent(recoveryUrl, forKey: .recoveryUrl) - try container.encodeIfPresent(passwordlessUrl, forKey: .passwordlessUrl) - try container.encode(primaryAction, forKey: .primaryAction) - try container.encodeIfPresent(sources, forKey: .sources) - try container.encode(showSourceLabels, forKey: .showSourceLabels) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IdentificationChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/IdentificationChallengeResponseRequest.swift deleted file mode 100644 index 9fd5d21..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IdentificationChallengeResponseRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// IdentificationChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Identification challenge */ -public struct IdentificationChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-identification" - public var uidField: String - public var password: String? - - public init(component: String? = "ak-stage-identification", uidField: String, password: String? = nil) { - self.component = component - self.uidField = uidField - self.password = password - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case uidField = "uid_field" - case password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(uidField, forKey: .uidField) - try container.encodeIfPresent(password, forKey: .password) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IdentificationStage.swift b/authentikClient/Classes/OpenAPIs/Models/IdentificationStage.swift deleted file mode 100644 index 2833911..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IdentificationStage.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// IdentificationStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** IdentificationStage Serializer */ -public struct IdentificationStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Fields of the user object to match against. (Hold shift to select multiple options) */ - public var userFields: [UserFieldsEnum]? - /** When set, shows a password field, instead of showing the password field as seaprate step. */ - public var passwordStage: UUID? - /** When enabled, user fields are matched regardless of their casing. */ - public var caseInsensitiveMatching: Bool? - /** When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown */ - public var showMatchedUser: Bool? - /** Optional enrollment flow, which is linked at the bottom of the page. */ - public var enrollmentFlow: UUID? - /** Optional recovery flow, which is linked at the bottom of the page. */ - public var recoveryFlow: UUID? - /** Optional passwordless flow, which is linked at the bottom of the page. */ - public var passwordlessFlow: UUID? - /** Specify which sources should be shown. */ - public var sources: [UUID]? - public var showSourceLabels: Bool? - /** When enabled, the stage will succeed and continue even when incorrect user info is entered. */ - public var pretendUserExists: Bool? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.userFields = userFields - self.passwordStage = passwordStage - self.caseInsensitiveMatching = caseInsensitiveMatching - self.showMatchedUser = showMatchedUser - self.enrollmentFlow = enrollmentFlow - self.recoveryFlow = recoveryFlow - self.passwordlessFlow = passwordlessFlow - self.sources = sources - self.showSourceLabels = showSourceLabels - self.pretendUserExists = pretendUserExists - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case userFields = "user_fields" - case passwordStage = "password_stage" - case caseInsensitiveMatching = "case_insensitive_matching" - case showMatchedUser = "show_matched_user" - case enrollmentFlow = "enrollment_flow" - case recoveryFlow = "recovery_flow" - case passwordlessFlow = "passwordless_flow" - case sources - case showSourceLabels = "show_source_labels" - case pretendUserExists = "pretend_user_exists" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userFields, forKey: .userFields) - try container.encodeIfPresent(passwordStage, forKey: .passwordStage) - try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) - try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) - try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) - try container.encodeIfPresent(sources, forKey: .sources) - try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) - try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IdentificationStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/IdentificationStageRequest.swift deleted file mode 100644 index c69630c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IdentificationStageRequest.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// IdentificationStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** IdentificationStage Serializer */ -public struct IdentificationStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Fields of the user object to match against. (Hold shift to select multiple options) */ - public var userFields: [UserFieldsEnum]? - /** When set, shows a password field, instead of showing the password field as seaprate step. */ - public var passwordStage: UUID? - /** When enabled, user fields are matched regardless of their casing. */ - public var caseInsensitiveMatching: Bool? - /** When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown */ - public var showMatchedUser: Bool? - /** Optional enrollment flow, which is linked at the bottom of the page. */ - public var enrollmentFlow: UUID? - /** Optional recovery flow, which is linked at the bottom of the page. */ - public var recoveryFlow: UUID? - /** Optional passwordless flow, which is linked at the bottom of the page. */ - public var passwordlessFlow: UUID? - /** Specify which sources should be shown. */ - public var sources: [UUID]? - public var showSourceLabels: Bool? - /** When enabled, the stage will succeed and continue even when incorrect user info is entered. */ - public var pretendUserExists: Bool? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.userFields = userFields - self.passwordStage = passwordStage - self.caseInsensitiveMatching = caseInsensitiveMatching - self.showMatchedUser = showMatchedUser - self.enrollmentFlow = enrollmentFlow - self.recoveryFlow = recoveryFlow - self.passwordlessFlow = passwordlessFlow - self.sources = sources - self.showSourceLabels = showSourceLabels - self.pretendUserExists = pretendUserExists - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case userFields = "user_fields" - case passwordStage = "password_stage" - case caseInsensitiveMatching = "case_insensitive_matching" - case showMatchedUser = "show_matched_user" - case enrollmentFlow = "enrollment_flow" - case recoveryFlow = "recovery_flow" - case passwordlessFlow = "passwordless_flow" - case sources - case showSourceLabels = "show_source_labels" - case pretendUserExists = "pretend_user_exists" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userFields, forKey: .userFields) - try container.encodeIfPresent(passwordStage, forKey: .passwordStage) - try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) - try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) - try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) - try container.encodeIfPresent(sources, forKey: .sources) - try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) - try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/InstallID.swift b/authentikClient/Classes/OpenAPIs/Models/InstallID.swift deleted file mode 100644 index eb167f6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/InstallID.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// InstallID.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct InstallID: Codable, JSONEncodable, Hashable { - - public var installId: String - - public init(installId: String) { - self.installId = installId - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case installId = "install_id" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(installId, forKey: .installId) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IntentEnum.swift b/authentikClient/Classes/OpenAPIs/Models/IntentEnum.swift deleted file mode 100644 index c17a36a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IntentEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// IntentEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password */ -public enum IntentEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case verification = "verification" - case api = "api" - case recovery = "recovery" - case appPassword = "app_password" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/InvalidResponseActionEnum.swift b/authentikClient/Classes/OpenAPIs/Models/InvalidResponseActionEnum.swift deleted file mode 100644 index e32d58f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/InvalidResponseActionEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// InvalidResponseActionEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context */ -public enum InvalidResponseActionEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case retry = "retry" - case restart = "restart" - case restartWithContext = "restart_with_context" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Invitation.swift b/authentikClient/Classes/OpenAPIs/Models/Invitation.swift deleted file mode 100644 index d477115..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Invitation.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Invitation.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Invitation Serializer */ -public struct Invitation: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var expires: Date? - public var fixedData: [String: AnyCodable]? - public var createdBy: GroupMember - /** When enabled, the invitation will be deleted after usage. */ - public var singleUse: Bool? - /** When set, only the configured flow can use this invitation. */ - public var flow: UUID? - public var flowObj: Flow - - public init(pk: UUID, name: String, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, createdBy: GroupMember, singleUse: Bool? = nil, flow: UUID? = nil, flowObj: Flow) { - self.pk = pk - self.name = name - self.expires = expires - self.fixedData = fixedData - self.createdBy = createdBy - self.singleUse = singleUse - self.flow = flow - self.flowObj = flowObj - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case expires - case fixedData = "fixed_data" - case createdBy = "created_by" - case singleUse = "single_use" - case flow - case flowObj = "flow_obj" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(fixedData, forKey: .fixedData) - try container.encode(createdBy, forKey: .createdBy) - try container.encodeIfPresent(singleUse, forKey: .singleUse) - try container.encodeIfPresent(flow, forKey: .flow) - try container.encode(flowObj, forKey: .flowObj) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/InvitationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/InvitationRequest.swift deleted file mode 100644 index ec4606c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/InvitationRequest.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// InvitationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Invitation Serializer */ -public struct InvitationRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var expires: Date? - public var fixedData: [String: AnyCodable]? - /** When enabled, the invitation will be deleted after usage. */ - public var singleUse: Bool? - /** When set, only the configured flow can use this invitation. */ - public var flow: UUID? - - public init(name: String, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, singleUse: Bool? = nil, flow: UUID? = nil) { - self.name = name - self.expires = expires - self.fixedData = fixedData - self.singleUse = singleUse - self.flow = flow - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case expires - case fixedData = "fixed_data" - case singleUse = "single_use" - case flow - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(fixedData, forKey: .fixedData) - try container.encodeIfPresent(singleUse, forKey: .singleUse) - try container.encodeIfPresent(flow, forKey: .flow) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/InvitationStage.swift b/authentikClient/Classes/OpenAPIs/Models/InvitationStage.swift deleted file mode 100644 index bc3e115..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/InvitationStage.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// InvitationStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** InvitationStage Serializer */ -public struct InvitationStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. */ - public var continueFlowWithoutInvitation: Bool? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, continueFlowWithoutInvitation: Bool? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.continueFlowWithoutInvitation = continueFlowWithoutInvitation - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case continueFlowWithoutInvitation = "continue_flow_without_invitation" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/InvitationStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/InvitationStageRequest.swift deleted file mode 100644 index bd06475..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/InvitationStageRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// InvitationStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** InvitationStage Serializer */ -public struct InvitationStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. */ - public var continueFlowWithoutInvitation: Bool? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, continueFlowWithoutInvitation: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.continueFlowWithoutInvitation = continueFlowWithoutInvitation - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case continueFlowWithoutInvitation = "continue_flow_without_invitation" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/IssuerModeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/IssuerModeEnum.swift deleted file mode 100644 index 9feec53..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/IssuerModeEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// IssuerModeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. */ -public enum IssuerModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case global = "global" - case perProvider = "per_provider" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnection.swift deleted file mode 100644 index 60c3cc0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnection.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// KubernetesServiceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** KubernetesServiceConnection Serializer */ -public struct KubernetesServiceConnection: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Paste your kubeconfig here. authentik will automatically use the currently selected context. */ - public var kubeconfig: [String: AnyCodable]? - /** Verify SSL Certificates of the Kubernetes API endpoint */ - public var verifySsl: Bool? - - public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { - self.pk = pk - self.name = name - self.local = local - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.kubeconfig = kubeconfig - self.verifySsl = verifySsl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case local - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case kubeconfig - case verifySsl = "verify_ssl" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) - try container.encodeIfPresent(verifySsl, forKey: .verifySsl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnectionRequest.swift deleted file mode 100644 index fd792ce..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/KubernetesServiceConnectionRequest.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// KubernetesServiceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** KubernetesServiceConnection Serializer */ -public struct KubernetesServiceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - /** Paste your kubeconfig here. authentik will automatically use the currently selected context. */ - public var kubeconfig: [String: AnyCodable]? - /** Verify SSL Certificates of the Kubernetes API endpoint */ - public var verifySsl: Bool? - - public init(name: String, local: Bool? = nil, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { - self.name = name - self.local = local - self.kubeconfig = kubeconfig - self.verifySsl = verifySsl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case local - case kubeconfig - case verifySsl = "verify_ssl" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) - try container.encodeIfPresent(verifySsl, forKey: .verifySsl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPAPIAccessMode.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPAPIAccessMode.swift deleted file mode 100644 index 2c578a1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPAPIAccessMode.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// LDAPAPIAccessMode.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `direct` - Direct * `cached` - Cached */ -public enum LDAPAPIAccessMode: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case direct = "direct" - case cached = "cached" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPDebug.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPDebug.swift deleted file mode 100644 index 2b547ab..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPDebug.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// LDAPDebug.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct LDAPDebug: Codable, JSONEncodable, Hashable { - - public var user: [[String: AnyCodable]] - public var group: [[String: AnyCodable]] - public var membership: [[String: AnyCodable]] - - public init(user: [[String: AnyCodable]], group: [[String: AnyCodable]], membership: [[String: AnyCodable]]) { - self.user = user - self.group = group - self.membership = membership - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case group - case membership - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(user, forKey: .user) - try container.encode(group, forKey: .group) - try container.encode(membership, forKey: .membership) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPOutpostConfig.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPOutpostConfig.swift deleted file mode 100644 index 1cf2942..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPOutpostConfig.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// LDAPOutpostConfig.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAPProvider Serializer */ -public struct LDAPOutpostConfig: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** DN under which objects are accessible. */ - public var baseDn: String? - public var bindFlowSlug: String - /** Prioritise backchannel slug over direct application slug */ - public var applicationSlug: String - /** Users in this group can do search queries. If not set, every user can execute search queries. */ - public var searchGroup: UUID? - public var certificate: UUID? - public var tlsServerName: String? - /** The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber */ - public var uidStartNumber: Int? - /** The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber */ - public var gidStartNumber: Int? - public var searchMode: LDAPAPIAccessMode? - public var bindMode: LDAPAPIAccessMode? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(pk: Int, name: String, baseDn: String? = nil, bindFlowSlug: String, applicationSlug: String, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { - self.pk = pk - self.name = name - self.baseDn = baseDn - self.bindFlowSlug = bindFlowSlug - self.applicationSlug = applicationSlug - self.searchGroup = searchGroup - self.certificate = certificate - self.tlsServerName = tlsServerName - self.uidStartNumber = uidStartNumber - self.gidStartNumber = gidStartNumber - self.searchMode = searchMode - self.bindMode = bindMode - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case baseDn = "base_dn" - case bindFlowSlug = "bind_flow_slug" - case applicationSlug = "application_slug" - case searchGroup = "search_group" - case certificate - case tlsServerName = "tls_server_name" - case uidStartNumber = "uid_start_number" - case gidStartNumber = "gid_start_number" - case searchMode = "search_mode" - case bindMode = "bind_mode" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(baseDn, forKey: .baseDn) - try container.encode(bindFlowSlug, forKey: .bindFlowSlug) - try container.encode(applicationSlug, forKey: .applicationSlug) - try container.encodeIfPresent(searchGroup, forKey: .searchGroup) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) - try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) - try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) - try container.encodeIfPresent(searchMode, forKey: .searchMode) - try container.encodeIfPresent(bindMode, forKey: .bindMode) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMapping.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMapping.swift deleted file mode 100644 index 0d4303d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMapping.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// LDAPPropertyMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP PropertyMapping Serializer */ -public struct LDAPPropertyMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Get object's component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var objectField: String - - public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, objectField: String) { - self.pk = pk - self.managed = managed - self.name = name - self.expression = expression - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.objectField = objectField - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case name - case expression - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case objectField = "object_field" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(objectField, forKey: .objectField) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMappingRequest.swift deleted file mode 100644 index b67029c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPPropertyMappingRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// LDAPPropertyMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP PropertyMapping Serializer */ -public struct LDAPPropertyMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - public var objectField: String - - public init(managed: String? = nil, name: String, expression: String, objectField: String) { - self.managed = managed - self.name = name - self.expression = expression - self.objectField = objectField - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case objectField = "object_field" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(objectField, forKey: .objectField) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPProvider.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPProvider.swift deleted file mode 100644 index ac9518a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPProvider.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// LDAPProvider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAPProvider Serializer */ -public struct LDAPProvider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** DN under which objects are accessible. */ - public var baseDn: String? - /** Users in this group can do search queries. If not set, every user can execute search queries. */ - public var searchGroup: UUID? - public var certificate: UUID? - public var tlsServerName: String? - /** The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber */ - public var uidStartNumber: Int? - /** The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber */ - public var gidStartNumber: Int? - public var outpostSet: [String] - public var searchMode: LDAPAPIAccessMode? - public var bindMode: LDAPAPIAccessMode? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, outpostSet: [String], searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.baseDn = baseDn - self.searchGroup = searchGroup - self.certificate = certificate - self.tlsServerName = tlsServerName - self.uidStartNumber = uidStartNumber - self.gidStartNumber = gidStartNumber - self.outpostSet = outpostSet - self.searchMode = searchMode - self.bindMode = bindMode - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case baseDn = "base_dn" - case searchGroup = "search_group" - case certificate - case tlsServerName = "tls_server_name" - case uidStartNumber = "uid_start_number" - case gidStartNumber = "gid_start_number" - case outpostSet = "outpost_set" - case searchMode = "search_mode" - case bindMode = "bind_mode" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(baseDn, forKey: .baseDn) - try container.encodeIfPresent(searchGroup, forKey: .searchGroup) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) - try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) - try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) - try container.encode(outpostSet, forKey: .outpostSet) - try container.encodeIfPresent(searchMode, forKey: .searchMode) - try container.encodeIfPresent(bindMode, forKey: .bindMode) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPProviderRequest.swift deleted file mode 100644 index 8b4e4e1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPProviderRequest.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// LDAPProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAPProvider Serializer */ -public struct LDAPProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** DN under which objects are accessible. */ - public var baseDn: String? - /** Users in this group can do search queries. If not set, every user can execute search queries. */ - public var searchGroup: UUID? - public var certificate: UUID? - public var tlsServerName: String? - /** The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber */ - public var uidStartNumber: Int? - /** The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber */ - public var gidStartNumber: Int? - public var searchMode: LDAPAPIAccessMode? - public var bindMode: LDAPAPIAccessMode? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.baseDn = baseDn - self.searchGroup = searchGroup - self.certificate = certificate - self.tlsServerName = tlsServerName - self.uidStartNumber = uidStartNumber - self.gidStartNumber = gidStartNumber - self.searchMode = searchMode - self.bindMode = bindMode - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case baseDn = "base_dn" - case searchGroup = "search_group" - case certificate - case tlsServerName = "tls_server_name" - case uidStartNumber = "uid_start_number" - case gidStartNumber = "gid_start_number" - case searchMode = "search_mode" - case bindMode = "bind_mode" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(baseDn, forKey: .baseDn) - try container.encodeIfPresent(searchGroup, forKey: .searchGroup) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) - try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) - try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) - try container.encodeIfPresent(searchMode, forKey: .searchMode) - try container.encodeIfPresent(bindMode, forKey: .bindMode) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPSource.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPSource.swift deleted file mode 100644 index 9b8c532..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPSource.swift +++ /dev/null @@ -1,191 +0,0 @@ -// -// LDAPSource.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP Source Serializer */ -public struct LDAPSource: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var userPathTemplate: String? - /** Get the URL to the Icon. If the name is /static or starts with http it is returned as-is */ - public var icon: String? - public var serverUri: String - /** Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. */ - public var peerCertificate: UUID? - /** Client certificate to authenticate against the LDAP Server's Certificate. */ - public var clientCertificate: UUID? - public var bindCn: String? - public var startTls: Bool? - public var sni: Bool? - public var baseDn: String - /** Prepended to Base DN for User-queries. */ - public var additionalUserDn: String? - /** Prepended to Base DN for Group-queries. */ - public var additionalGroupDn: String? - /** Consider Objects matching this filter to be Users. */ - public var userObjectFilter: String? - /** Consider Objects matching this filter to be Groups. */ - public var groupObjectFilter: String? - /** Field which contains members of a group. */ - public var groupMembershipField: String? - /** Field which contains a unique Identifier. */ - public var objectUniquenessField: String? - public var syncUsers: Bool? - /** When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. */ - public var syncUsersPassword: Bool? - public var syncGroups: Bool? - public var syncParentGroup: UUID? - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - /** Get cached source connectivity */ - public var connectivity: [String: [String: String]]? - - public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, serverUri: String, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, connectivity: [String: [String: String]]?) { - self.pk = pk - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.managed = managed - self.userPathTemplate = userPathTemplate - self.icon = icon - self.serverUri = serverUri - self.peerCertificate = peerCertificate - self.clientCertificate = clientCertificate - self.bindCn = bindCn - self.startTls = startTls - self.sni = sni - self.baseDn = baseDn - self.additionalUserDn = additionalUserDn - self.additionalGroupDn = additionalGroupDn - self.userObjectFilter = userObjectFilter - self.groupObjectFilter = groupObjectFilter - self.groupMembershipField = groupMembershipField - self.objectUniquenessField = objectUniquenessField - self.syncUsers = syncUsers - self.syncUsersPassword = syncUsersPassword - self.syncGroups = syncGroups - self.syncParentGroup = syncParentGroup - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - self.connectivity = connectivity - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case managed - case userPathTemplate = "user_path_template" - case icon - case serverUri = "server_uri" - case peerCertificate = "peer_certificate" - case clientCertificate = "client_certificate" - case bindCn = "bind_cn" - case startTls = "start_tls" - case sni - case baseDn = "base_dn" - case additionalUserDn = "additional_user_dn" - case additionalGroupDn = "additional_group_dn" - case userObjectFilter = "user_object_filter" - case groupObjectFilter = "group_object_filter" - case groupMembershipField = "group_membership_field" - case objectUniquenessField = "object_uniqueness_field" - case syncUsers = "sync_users" - case syncUsersPassword = "sync_users_password" - case syncGroups = "sync_groups" - case syncParentGroup = "sync_parent_group" - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - case connectivity - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encode(managed, forKey: .managed) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(icon, forKey: .icon) - try container.encode(serverUri, forKey: .serverUri) - try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) - try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) - try container.encodeIfPresent(bindCn, forKey: .bindCn) - try container.encodeIfPresent(startTls, forKey: .startTls) - try container.encodeIfPresent(sni, forKey: .sni) - try container.encode(baseDn, forKey: .baseDn) - try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) - try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) - try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) - try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) - try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) - try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) - try container.encodeIfPresent(syncUsers, forKey: .syncUsers) - try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) - try container.encodeIfPresent(syncGroups, forKey: .syncGroups) - try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - try container.encode(connectivity, forKey: .connectivity) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPSourceRequest.swift deleted file mode 100644 index 5d0b358..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPSourceRequest.swift +++ /dev/null @@ -1,156 +0,0 @@ -// -// LDAPSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP Source Serializer */ -public struct LDAPSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - public var serverUri: String - /** Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. */ - public var peerCertificate: UUID? - /** Client certificate to authenticate against the LDAP Server's Certificate. */ - public var clientCertificate: UUID? - public var bindCn: String? - public var bindPassword: String? - public var startTls: Bool? - public var sni: Bool? - public var baseDn: String - /** Prepended to Base DN for User-queries. */ - public var additionalUserDn: String? - /** Prepended to Base DN for Group-queries. */ - public var additionalGroupDn: String? - /** Consider Objects matching this filter to be Users. */ - public var userObjectFilter: String? - /** Consider Objects matching this filter to be Groups. */ - public var groupObjectFilter: String? - /** Field which contains members of a group. */ - public var groupMembershipField: String? - /** Field which contains a unique Identifier. */ - public var objectUniquenessField: String? - public var syncUsers: Bool? - /** When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. */ - public var syncUsersPassword: Bool? - public var syncGroups: Bool? - public var syncParentGroup: UUID? - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - - public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, serverUri: String, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, bindPassword: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.serverUri = serverUri - self.peerCertificate = peerCertificate - self.clientCertificate = clientCertificate - self.bindCn = bindCn - self.bindPassword = bindPassword - self.startTls = startTls - self.sni = sni - self.baseDn = baseDn - self.additionalUserDn = additionalUserDn - self.additionalGroupDn = additionalGroupDn - self.userObjectFilter = userObjectFilter - self.groupObjectFilter = groupObjectFilter - self.groupMembershipField = groupMembershipField - self.objectUniquenessField = objectUniquenessField - self.syncUsers = syncUsers - self.syncUsersPassword = syncUsersPassword - self.syncGroups = syncGroups - self.syncParentGroup = syncParentGroup - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case serverUri = "server_uri" - case peerCertificate = "peer_certificate" - case clientCertificate = "client_certificate" - case bindCn = "bind_cn" - case bindPassword = "bind_password" - case startTls = "start_tls" - case sni - case baseDn = "base_dn" - case additionalUserDn = "additional_user_dn" - case additionalGroupDn = "additional_group_dn" - case userObjectFilter = "user_object_filter" - case groupObjectFilter = "group_object_filter" - case groupMembershipField = "group_membership_field" - case objectUniquenessField = "object_uniqueness_field" - case syncUsers = "sync_users" - case syncUsersPassword = "sync_users_password" - case syncGroups = "sync_groups" - case syncParentGroup = "sync_parent_group" - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(serverUri, forKey: .serverUri) - try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) - try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) - try container.encodeIfPresent(bindCn, forKey: .bindCn) - try container.encodeIfPresent(bindPassword, forKey: .bindPassword) - try container.encodeIfPresent(startTls, forKey: .startTls) - try container.encodeIfPresent(sni, forKey: .sni) - try container.encode(baseDn, forKey: .baseDn) - try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) - try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) - try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) - try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) - try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) - try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) - try container.encodeIfPresent(syncUsers, forKey: .syncUsers) - try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) - try container.encodeIfPresent(syncGroups, forKey: .syncGroups) - try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LDAPSyncStatus.swift b/authentikClient/Classes/OpenAPIs/Models/LDAPSyncStatus.swift deleted file mode 100644 index ab95c81..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LDAPSyncStatus.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// LDAPSyncStatus.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP Source sync status */ -public struct LDAPSyncStatus: Codable, JSONEncodable, Hashable { - - public var isRunning: Bool - public var tasks: [Task] - - public init(isRunning: Bool, tasks: [Task]) { - self.isRunning = isRunning - self.tasks = tasks - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case isRunning = "is_running" - case tasks - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(isRunning, forKey: .isRunning) - try container.encode(tasks, forKey: .tasks) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LayoutEnum.swift b/authentikClient/Classes/OpenAPIs/Models/LayoutEnum.swift deleted file mode 100644 index 968fbd9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LayoutEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// LayoutEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `stacked` - STACKED * `content_left` - CONTENT_LEFT * `content_right` - CONTENT_RIGHT * `sidebar_left` - SIDEBAR_LEFT * `sidebar_right` - SIDEBAR_RIGHT */ -public enum LayoutEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case stacked = "stacked" - case contentLeft = "content_left" - case contentRight = "content_right" - case sidebarLeft = "sidebar_left" - case sidebarRight = "sidebar_right" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/License.swift b/authentikClient/Classes/OpenAPIs/Models/License.swift deleted file mode 100644 index 83727e3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/License.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// License.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** License Serializer */ -public struct License: Codable, JSONEncodable, Hashable { - - public var licenseUuid: UUID - public var name: String - public var key: String - public var expiry: Date - public var internalUsers: Int - public var externalUsers: Int - - public init(licenseUuid: UUID, name: String, key: String, expiry: Date, internalUsers: Int, externalUsers: Int) { - self.licenseUuid = licenseUuid - self.name = name - self.key = key - self.expiry = expiry - self.internalUsers = internalUsers - self.externalUsers = externalUsers - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case licenseUuid = "license_uuid" - case name - case key - case expiry - case internalUsers = "internal_users" - case externalUsers = "external_users" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(licenseUuid, forKey: .licenseUuid) - try container.encode(name, forKey: .name) - try container.encode(key, forKey: .key) - try container.encode(expiry, forKey: .expiry) - try container.encode(internalUsers, forKey: .internalUsers) - try container.encode(externalUsers, forKey: .externalUsers) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LicenseForecast.swift b/authentikClient/Classes/OpenAPIs/Models/LicenseForecast.swift deleted file mode 100644 index 3a6599d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LicenseForecast.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// LicenseForecast.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for license forecast */ -public struct LicenseForecast: Codable, JSONEncodable, Hashable { - - public var internalUsers: Int - public var externalUsers: Int - public var forecastedInternalUsers: Int - public var forecastedExternalUsers: Int - - public init(internalUsers: Int, externalUsers: Int, forecastedInternalUsers: Int, forecastedExternalUsers: Int) { - self.internalUsers = internalUsers - self.externalUsers = externalUsers - self.forecastedInternalUsers = forecastedInternalUsers - self.forecastedExternalUsers = forecastedExternalUsers - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case internalUsers = "internal_users" - case externalUsers = "external_users" - case forecastedInternalUsers = "forecasted_internal_users" - case forecastedExternalUsers = "forecasted_external_users" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(internalUsers, forKey: .internalUsers) - try container.encode(externalUsers, forKey: .externalUsers) - try container.encode(forecastedInternalUsers, forKey: .forecastedInternalUsers) - try container.encode(forecastedExternalUsers, forKey: .forecastedExternalUsers) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LicenseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/LicenseRequest.swift deleted file mode 100644 index d437c2f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LicenseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// LicenseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** License Serializer */ -public struct LicenseRequest: Codable, JSONEncodable, Hashable { - - public var key: String - - public init(key: String) { - self.key = key - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case key - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(key, forKey: .key) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LicenseSummary.swift b/authentikClient/Classes/OpenAPIs/Models/LicenseSummary.swift deleted file mode 100644 index c74058f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LicenseSummary.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// LicenseSummary.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for license status */ -public struct LicenseSummary: Codable, JSONEncodable, Hashable { - - public var internalUsers: Int - public var externalUsers: Int - public var valid: Bool - public var showAdminWarning: Bool - public var showUserWarning: Bool - public var readOnly: Bool - public var latestValid: Date - public var hasLicense: Bool - - public init(internalUsers: Int, externalUsers: Int, valid: Bool, showAdminWarning: Bool, showUserWarning: Bool, readOnly: Bool, latestValid: Date, hasLicense: Bool) { - self.internalUsers = internalUsers - self.externalUsers = externalUsers - self.valid = valid - self.showAdminWarning = showAdminWarning - self.showUserWarning = showUserWarning - self.readOnly = readOnly - self.latestValid = latestValid - self.hasLicense = hasLicense - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case internalUsers = "internal_users" - case externalUsers = "external_users" - case valid - case showAdminWarning = "show_admin_warning" - case showUserWarning = "show_user_warning" - case readOnly = "read_only" - case latestValid = "latest_valid" - case hasLicense = "has_license" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(internalUsers, forKey: .internalUsers) - try container.encode(externalUsers, forKey: .externalUsers) - try container.encode(valid, forKey: .valid) - try container.encode(showAdminWarning, forKey: .showAdminWarning) - try container.encode(showUserWarning, forKey: .showUserWarning) - try container.encode(readOnly, forKey: .readOnly) - try container.encode(latestValid, forKey: .latestValid) - try container.encode(hasLicense, forKey: .hasLicense) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Link.swift b/authentikClient/Classes/OpenAPIs/Models/Link.swift deleted file mode 100644 index 415d329..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Link.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Link.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Returns a single link */ -public struct Link: Codable, JSONEncodable, Hashable { - - public var link: String - - public init(link: String) { - self.link = link - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case link - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(link, forKey: .link) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LoginMetrics.swift b/authentikClient/Classes/OpenAPIs/Models/LoginMetrics.swift deleted file mode 100644 index 7b470f8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LoginMetrics.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// LoginMetrics.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Login Metrics per 1h */ -public struct LoginMetrics: Codable, JSONEncodable, Hashable { - - public var logins: [Coordinate] - public var loginsFailed: [Coordinate] - public var authorizations: [Coordinate] - - public init(logins: [Coordinate], loginsFailed: [Coordinate], authorizations: [Coordinate]) { - self.logins = logins - self.loginsFailed = loginsFailed - self.authorizations = authorizations - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case logins - case loginsFailed = "logins_failed" - case authorizations - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(logins, forKey: .logins) - try container.encode(loginsFailed, forKey: .loginsFailed) - try container.encode(authorizations, forKey: .authorizations) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/LoginSource.swift b/authentikClient/Classes/OpenAPIs/Models/LoginSource.swift deleted file mode 100644 index 6e19c0e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/LoginSource.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// LoginSource.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Login buttons of sources */ -public struct LoginSource: Codable, JSONEncodable, Hashable { - - public var name: String - public var iconUrl: String? - public var challenge: LoginChallengeTypes - - public init(name: String, iconUrl: String? = nil, challenge: LoginChallengeTypes) { - self.name = name - self.iconUrl = iconUrl - self.challenge = challenge - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case iconUrl = "icon_url" - case challenge - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(iconUrl, forKey: .iconUrl) - try container.encode(challenge, forKey: .challenge) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Metadata.swift b/authentikClient/Classes/OpenAPIs/Models/Metadata.swift deleted file mode 100644 index 9e6a332..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Metadata.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Metadata.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for blueprint metadata */ -public struct Metadata: Codable, JSONEncodable, Hashable { - - public var name: String - public var labels: [String: AnyCodable] - - public init(name: String, labels: [String: AnyCodable]) { - self.name = name - self.labels = labels - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case labels - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(labels, forKey: .labels) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ModelEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ModelEnum.swift deleted file mode 100644 index 34d5378..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ModelEnum.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// ModelEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License */ -public enum ModelEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case cryptoPeriodCertificatekeypair = "authentik_crypto.certificatekeypair" - case eventsPeriodEvent = "authentik_events.event" - case eventsPeriodNotificationtransport = "authentik_events.notificationtransport" - case eventsPeriodNotification = "authentik_events.notification" - case eventsPeriodNotificationrule = "authentik_events.notificationrule" - case eventsPeriodNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" - case flowsPeriodFlow = "authentik_flows.flow" - case flowsPeriodFlowstagebinding = "authentik_flows.flowstagebinding" - case outpostsPeriodDockerserviceconnection = "authentik_outposts.dockerserviceconnection" - case outpostsPeriodKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" - case outpostsPeriodOutpost = "authentik_outposts.outpost" - case policiesDummyPeriodDummypolicy = "authentik_policies_dummy.dummypolicy" - case policiesEventMatcherPeriodEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" - case policiesExpiryPeriodPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" - case policiesExpressionPeriodExpressionpolicy = "authentik_policies_expression.expressionpolicy" - case policiesPasswordPeriodPasswordpolicy = "authentik_policies_password.passwordpolicy" - case policiesReputationPeriodReputationpolicy = "authentik_policies_reputation.reputationpolicy" - case policiesReputationPeriodReputation = "authentik_policies_reputation.reputation" - case policiesPeriodPolicybinding = "authentik_policies.policybinding" - case providersLdapPeriodLdapprovider = "authentik_providers_ldap.ldapprovider" - case providersOauth2PeriodScopemapping = "authentik_providers_oauth2.scopemapping" - case providersOauth2PeriodOauth2provider = "authentik_providers_oauth2.oauth2provider" - case providersOauth2PeriodAuthorizationcode = "authentik_providers_oauth2.authorizationcode" - case providersOauth2PeriodAccesstoken = "authentik_providers_oauth2.accesstoken" - case providersOauth2PeriodRefreshtoken = "authentik_providers_oauth2.refreshtoken" - case providersProxyPeriodProxyprovider = "authentik_providers_proxy.proxyprovider" - case providersRadiusPeriodRadiusprovider = "authentik_providers_radius.radiusprovider" - case providersSamlPeriodSamlprovider = "authentik_providers_saml.samlprovider" - case providersSamlPeriodSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" - case providersScimPeriodScimprovider = "authentik_providers_scim.scimprovider" - case providersScimPeriodScimmapping = "authentik_providers_scim.scimmapping" - case rbacPeriodRole = "authentik_rbac.role" - case sourcesLdapPeriodLdapsource = "authentik_sources_ldap.ldapsource" - case sourcesLdapPeriodLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" - case sourcesOauthPeriodOauthsource = "authentik_sources_oauth.oauthsource" - case sourcesOauthPeriodUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" - case sourcesPlexPeriodPlexsource = "authentik_sources_plex.plexsource" - case sourcesPlexPeriodPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" - case sourcesSamlPeriodSamlsource = "authentik_sources_saml.samlsource" - case sourcesSamlPeriodUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" - case stagesAuthenticatorDuoPeriodAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" - case stagesAuthenticatorDuoPeriodDuodevice = "authentik_stages_authenticator_duo.duodevice" - case stagesAuthenticatorSmsPeriodAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" - case stagesAuthenticatorSmsPeriodSmsdevice = "authentik_stages_authenticator_sms.smsdevice" - case stagesAuthenticatorStaticPeriodAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" - case stagesAuthenticatorStaticPeriodStaticdevice = "authentik_stages_authenticator_static.staticdevice" - case stagesAuthenticatorTotpPeriodAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" - case stagesAuthenticatorTotpPeriodTotpdevice = "authentik_stages_authenticator_totp.totpdevice" - case stagesAuthenticatorValidatePeriodAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" - case stagesAuthenticatorWebauthnPeriodAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" - case stagesAuthenticatorWebauthnPeriodWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" - case stagesCaptchaPeriodCaptchastage = "authentik_stages_captcha.captchastage" - case stagesConsentPeriodConsentstage = "authentik_stages_consent.consentstage" - case stagesConsentPeriodUserconsent = "authentik_stages_consent.userconsent" - case stagesDenyPeriodDenystage = "authentik_stages_deny.denystage" - case stagesDummyPeriodDummystage = "authentik_stages_dummy.dummystage" - case stagesEmailPeriodEmailstage = "authentik_stages_email.emailstage" - case stagesIdentificationPeriodIdentificationstage = "authentik_stages_identification.identificationstage" - case stagesInvitationPeriodInvitationstage = "authentik_stages_invitation.invitationstage" - case stagesInvitationPeriodInvitation = "authentik_stages_invitation.invitation" - case stagesPasswordPeriodPasswordstage = "authentik_stages_password.passwordstage" - case stagesPromptPeriodPrompt = "authentik_stages_prompt.prompt" - case stagesPromptPeriodPromptstage = "authentik_stages_prompt.promptstage" - case stagesUserDeletePeriodUserdeletestage = "authentik_stages_user_delete.userdeletestage" - case stagesUserLoginPeriodUserloginstage = "authentik_stages_user_login.userloginstage" - case stagesUserLogoutPeriodUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" - case stagesUserWritePeriodUserwritestage = "authentik_stages_user_write.userwritestage" - case tenantsPeriodTenant = "authentik_tenants.tenant" - case blueprintsPeriodBlueprintinstance = "authentik_blueprints.blueprintinstance" - case corePeriodGroup = "authentik_core.group" - case corePeriodUser = "authentik_core.user" - case corePeriodApplication = "authentik_core.application" - case corePeriodToken = "authentik_core.token" - case enterprisePeriodLicense = "authentik_enterprise.license" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/NameIdPolicyEnum.swift b/authentikClient/Classes/OpenAPIs/Models/NameIdPolicyEnum.swift deleted file mode 100644 index 141639b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NameIdPolicyEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// NameIdPolicyEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient */ -public enum NameIdPolicyEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _11ColonNameidFormatColonEmailAddress = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" - case _20ColonNameidFormatColonPersistent = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - case _20ColonNameidFormatColonX509SubjectName = "urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName" - case _20ColonNameidFormatColonWindowsDomainQualifiedName = "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" - case _20ColonNameidFormatColonTransient = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/NotConfiguredActionEnum.swift b/authentikClient/Classes/OpenAPIs/Models/NotConfiguredActionEnum.swift deleted file mode 100644 index 9f3eec3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotConfiguredActionEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// NotConfiguredActionEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `skip` - Skip * `deny` - Deny * `configure` - Configure */ -public enum NotConfiguredActionEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case skip = "skip" - case deny = "deny" - case configure = "configure" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Notification.swift b/authentikClient/Classes/OpenAPIs/Models/Notification.swift deleted file mode 100644 index bfcd33d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Notification.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Notification.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Notification Serializer */ -public struct Notification: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var severity: SeverityEnum - public var body: String - public var created: Date - public var event: Event? - public var seen: Bool? - - public init(pk: UUID, severity: SeverityEnum, body: String, created: Date, event: Event? = nil, seen: Bool? = nil) { - self.pk = pk - self.severity = severity - self.body = body - self.created = created - self.event = event - self.seen = seen - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case severity - case body - case created - case event - case seen - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(severity, forKey: .severity) - try container.encode(body, forKey: .body) - try container.encode(created, forKey: .created) - try container.encodeIfPresent(event, forKey: .event) - try container.encodeIfPresent(seen, forKey: .seen) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationRequest.swift deleted file mode 100644 index 20bf9b7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// NotificationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Notification Serializer */ -public struct NotificationRequest: Codable, JSONEncodable, Hashable { - - public var event: EventRequest? - public var seen: Bool? - - public init(event: EventRequest? = nil, seen: Bool? = nil) { - self.event = event - self.seen = seen - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case event - case seen - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(event, forKey: .event) - try container.encodeIfPresent(seen, forKey: .seen) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationRule.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationRule.swift deleted file mode 100644 index 4201a03..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationRule.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// NotificationRule.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationRule Serializer */ -public struct NotificationRule: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. */ - public var transports: [UUID]? - /** Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert */ - public var severity: SeverityEnum? - /** Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. */ - public var group: UUID? - public var groupObj: Group - - public init(pk: UUID, name: String, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil, groupObj: Group) { - self.pk = pk - self.name = name - self.transports = transports - self.severity = severity - self.group = group - self.groupObj = groupObj - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case transports - case severity - case group - case groupObj = "group_obj" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(transports, forKey: .transports) - try container.encodeIfPresent(severity, forKey: .severity) - try container.encodeIfPresent(group, forKey: .group) - try container.encode(groupObj, forKey: .groupObj) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationRuleRequest.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationRuleRequest.swift deleted file mode 100644 index acb1e2a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationRuleRequest.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// NotificationRuleRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationRule Serializer */ -public struct NotificationRuleRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. */ - public var transports: [UUID]? - /** Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert */ - public var severity: SeverityEnum? - /** Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. */ - public var group: UUID? - - public init(name: String, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil) { - self.name = name - self.transports = transports - self.severity = severity - self.group = group - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case transports - case severity - case group - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(transports, forKey: .transports) - try container.encodeIfPresent(severity, forKey: .severity) - try container.encodeIfPresent(group, forKey: .group) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationTransport.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationTransport.swift deleted file mode 100644 index 9b8ba31..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationTransport.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// NotificationTransport.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationTransport Serializer */ -public struct NotificationTransport: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var mode: NotificationTransportModeEnum? - /** Return selected mode with a UI Label */ - public var modeVerbose: String - public var webhookUrl: String? - public var webhookMapping: UUID? - /** Only send notification once, for example when sending a webhook into a chat channel. */ - public var sendOnce: Bool? - - public init(pk: UUID, name: String, mode: NotificationTransportModeEnum? = nil, modeVerbose: String, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { - self.pk = pk - self.name = name - self.mode = mode - self.modeVerbose = modeVerbose - self.webhookUrl = webhookUrl - self.webhookMapping = webhookMapping - self.sendOnce = sendOnce - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case mode - case modeVerbose = "mode_verbose" - case webhookUrl = "webhook_url" - case webhookMapping = "webhook_mapping" - case sendOnce = "send_once" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encode(modeVerbose, forKey: .modeVerbose) - try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) - try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) - try container.encodeIfPresent(sendOnce, forKey: .sendOnce) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportModeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationTransportModeEnum.swift deleted file mode 100644 index 2eed426..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportModeEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// NotificationTransportModeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email */ -public enum NotificationTransportModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case local = "local" - case webhook = "webhook" - case webhookSlack = "webhook_slack" - case email = "email" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportRequest.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationTransportRequest.swift deleted file mode 100644 index 82ef153..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// NotificationTransportRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationTransport Serializer */ -public struct NotificationTransportRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var mode: NotificationTransportModeEnum? - public var webhookUrl: String? - public var webhookMapping: UUID? - /** Only send notification once, for example when sending a webhook into a chat channel. */ - public var sendOnce: Bool? - - public init(name: String, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { - self.name = name - self.mode = mode - self.webhookUrl = webhookUrl - self.webhookMapping = webhookMapping - self.sendOnce = sendOnce - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case mode - case webhookUrl = "webhook_url" - case webhookMapping = "webhook_mapping" - case sendOnce = "send_once" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) - try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) - try container.encodeIfPresent(sendOnce, forKey: .sendOnce) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportTest.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationTransportTest.swift deleted file mode 100644 index 680ccce..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationTransportTest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// NotificationTransportTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Notification test serializer */ -public struct NotificationTransportTest: Codable, JSONEncodable, Hashable { - - public var messages: [String] - - public init(messages: [String]) { - self.messages = messages - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case messages - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(messages, forKey: .messages) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMapping.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMapping.swift deleted file mode 100644 index e56662f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMapping.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// NotificationWebhookMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationWebhookMapping Serializer */ -public struct NotificationWebhookMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var expression: String - - public init(pk: UUID, name: String, expression: String) { - self.pk = pk - self.name = name - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMappingRequest.swift deleted file mode 100644 index 4ae8930..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/NotificationWebhookMappingRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// NotificationWebhookMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationWebhookMapping Serializer */ -public struct NotificationWebhookMappingRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var expression: String - - public init(name: String, expression: String) { - self.name = name - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuth2Provider.swift b/authentikClient/Classes/OpenAPIs/Models/OAuth2Provider.swift deleted file mode 100644 index 6eafb2c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuth2Provider.swift +++ /dev/null @@ -1,148 +0,0 @@ -// -// OAuth2Provider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth2Provider Serializer */ -public struct OAuth2Provider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public */ - public var clientType: ClientTypeEnum? - public var clientId: String? - public var clientSecret: String? - /** Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessCodeValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - /** Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. */ - public var includeClaimsInIdToken: Bool? - /** Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. */ - public var signingKey: UUID? - /** Enter each URI on a new line. */ - public var redirectUris: String? - /** Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. */ - public var subMode: SubModeEnum? - /** Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. */ - public var issuerMode: IssuerModeEnum? - public var jwksSources: [UUID]? - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.clientType = clientType - self.clientId = clientId - self.clientSecret = clientSecret - self.accessCodeValidity = accessCodeValidity - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - self.includeClaimsInIdToken = includeClaimsInIdToken - self.signingKey = signingKey - self.redirectUris = redirectUris - self.subMode = subMode - self.issuerMode = issuerMode - self.jwksSources = jwksSources - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case clientType = "client_type" - case clientId = "client_id" - case clientSecret = "client_secret" - case accessCodeValidity = "access_code_validity" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - case includeClaimsInIdToken = "include_claims_in_id_token" - case signingKey = "signing_key" - case redirectUris = "redirect_uris" - case subMode = "sub_mode" - case issuerMode = "issuer_mode" - case jwksSources = "jwks_sources" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(clientType, forKey: .clientType) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(clientSecret, forKey: .clientSecret) - try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) - try container.encodeIfPresent(signingKey, forKey: .signingKey) - try container.encodeIfPresent(redirectUris, forKey: .redirectUris) - try container.encodeIfPresent(subMode, forKey: .subMode) - try container.encodeIfPresent(issuerMode, forKey: .issuerMode) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderRequest.swift deleted file mode 100644 index a235c5b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderRequest.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// OAuth2ProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth2Provider Serializer */ -public struct OAuth2ProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public */ - public var clientType: ClientTypeEnum? - public var clientId: String? - public var clientSecret: String? - /** Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessCodeValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - /** Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. */ - public var includeClaimsInIdToken: Bool? - /** Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. */ - public var signingKey: UUID? - /** Enter each URI on a new line. */ - public var redirectUris: String? - /** Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. */ - public var subMode: SubModeEnum? - /** Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. */ - public var issuerMode: IssuerModeEnum? - public var jwksSources: [UUID]? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.clientType = clientType - self.clientId = clientId - self.clientSecret = clientSecret - self.accessCodeValidity = accessCodeValidity - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - self.includeClaimsInIdToken = includeClaimsInIdToken - self.signingKey = signingKey - self.redirectUris = redirectUris - self.subMode = subMode - self.issuerMode = issuerMode - self.jwksSources = jwksSources - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case clientType = "client_type" - case clientId = "client_id" - case clientSecret = "client_secret" - case accessCodeValidity = "access_code_validity" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - case includeClaimsInIdToken = "include_claims_in_id_token" - case signingKey = "signing_key" - case redirectUris = "redirect_uris" - case subMode = "sub_mode" - case issuerMode = "issuer_mode" - case jwksSources = "jwks_sources" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(clientType, forKey: .clientType) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(clientSecret, forKey: .clientSecret) - try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) - try container.encodeIfPresent(signingKey, forKey: .signingKey) - try container.encodeIfPresent(redirectUris, forKey: .redirectUris) - try container.encodeIfPresent(subMode, forKey: .subMode) - try container.encodeIfPresent(issuerMode, forKey: .issuerMode) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderSetupURLs.swift b/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderSetupURLs.swift deleted file mode 100644 index 6511a07..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuth2ProviderSetupURLs.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// OAuth2ProviderSetupURLs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth2 Provider Metadata serializer */ -public struct OAuth2ProviderSetupURLs: Codable, JSONEncodable, Hashable { - - public var issuer: String - public var authorize: String - public var token: String - public var userInfo: String - public var providerInfo: String - public var logout: String - public var jwks: String - - public init(issuer: String, authorize: String, token: String, userInfo: String, providerInfo: String, logout: String, jwks: String) { - self.issuer = issuer - self.authorize = authorize - self.token = token - self.userInfo = userInfo - self.providerInfo = providerInfo - self.logout = logout - self.jwks = jwks - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case issuer - case authorize - case token - case userInfo = "user_info" - case providerInfo = "provider_info" - case logout - case jwks - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(issuer, forKey: .issuer) - try container.encode(authorize, forKey: .authorize) - try container.encode(token, forKey: .token) - try container.encode(userInfo, forKey: .userInfo) - try container.encode(providerInfo, forKey: .providerInfo) - try container.encode(logout, forKey: .logout) - try container.encode(jwks, forKey: .jwks) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallenge.swift deleted file mode 100644 index 267c3c5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallenge.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// OAuthDeviceCodeChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Device code challenge */ -public struct OAuthDeviceCodeChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-provider-oauth2-device-code" - public var responseErrors: [String: [ErrorDetail]]? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-provider-oauth2-device-code", responseErrors: [String: [ErrorDetail]]? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallengeResponseRequest.swift deleted file mode 100644 index 7fc8582..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// OAuthDeviceCodeChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Response that includes the user-entered device code */ -public struct OAuthDeviceCodeChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-provider-oauth2-device-code" - public var code: Int - - public init(component: String? = "ak-provider-oauth2-device-code", code: Int) { - self.component = component - self.code = code - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case code - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(code, forKey: .code) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallenge.swift deleted file mode 100644 index 673218e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallenge.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// OAuthDeviceCodeFinishChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Final challenge after user enters their code */ -public struct OAuthDeviceCodeFinishChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-provider-oauth2-device-code-finish" - public var responseErrors: [String: [ErrorDetail]]? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-provider-oauth2-device-code-finish", responseErrors: [String: [ErrorDetail]]? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift deleted file mode 100644 index 8c8b4f1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// OAuthDeviceCodeFinishChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Response that device has been authenticated and tab can be closed */ -public struct OAuthDeviceCodeFinishChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-provider-oauth2-device-code-finish" - - public init(component: String? = "ak-provider-oauth2-device-code-finish") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthSource.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthSource.swift deleted file mode 100644 index 7f5acf8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthSource.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// OAuthSource.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct OAuthSource: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var userPathTemplate: String? - /** Get the URL to the Icon. If the name is /static or starts with http it is returned as-is */ - public var icon: String? - public var providerType: ProviderTypeEnum - /** URL used to request the initial token. This URL is only required for OAuth 1. */ - public var requestTokenUrl: String? - /** URL the user is redirect to to conest the flow. */ - public var authorizationUrl: String? - /** URL used by authentik to retrieve tokens. */ - public var accessTokenUrl: String? - /** URL used by authentik to get user information. */ - public var profileUrl: String? - public var consumerKey: String - /** Get OAuth Callback URL */ - public var callbackUrl: String - public var additionalScopes: String? - public var type: SourceType - public var oidcWellKnownUrl: String? - public var oidcJwksUrl: String? - public var oidcJwks: [String: AnyCodable]? - - public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, providerType: ProviderTypeEnum, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String, callbackUrl: String, additionalScopes: String? = nil, type: SourceType, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { - self.pk = pk - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.managed = managed - self.userPathTemplate = userPathTemplate - self.icon = icon - self.providerType = providerType - self.requestTokenUrl = requestTokenUrl - self.authorizationUrl = authorizationUrl - self.accessTokenUrl = accessTokenUrl - self.profileUrl = profileUrl - self.consumerKey = consumerKey - self.callbackUrl = callbackUrl - self.additionalScopes = additionalScopes - self.type = type - self.oidcWellKnownUrl = oidcWellKnownUrl - self.oidcJwksUrl = oidcJwksUrl - self.oidcJwks = oidcJwks - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case managed - case userPathTemplate = "user_path_template" - case icon - case providerType = "provider_type" - case requestTokenUrl = "request_token_url" - case authorizationUrl = "authorization_url" - case accessTokenUrl = "access_token_url" - case profileUrl = "profile_url" - case consumerKey = "consumer_key" - case callbackUrl = "callback_url" - case additionalScopes = "additional_scopes" - case type - case oidcWellKnownUrl = "oidc_well_known_url" - case oidcJwksUrl = "oidc_jwks_url" - case oidcJwks = "oidc_jwks" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encode(managed, forKey: .managed) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(icon, forKey: .icon) - try container.encode(providerType, forKey: .providerType) - try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) - try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) - try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) - try container.encodeIfPresent(profileUrl, forKey: .profileUrl) - try container.encode(consumerKey, forKey: .consumerKey) - try container.encode(callbackUrl, forKey: .callbackUrl) - try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) - try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) - try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OAuthSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/OAuthSourceRequest.swift deleted file mode 100644 index 840c2bb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OAuthSourceRequest.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// OAuthSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct OAuthSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - public var providerType: ProviderTypeEnum - /** URL used to request the initial token. This URL is only required for OAuth 1. */ - public var requestTokenUrl: String? - /** URL the user is redirect to to conest the flow. */ - public var authorizationUrl: String? - /** URL used by authentik to retrieve tokens. */ - public var accessTokenUrl: String? - /** URL used by authentik to get user information. */ - public var profileUrl: String? - public var consumerKey: String - public var consumerSecret: String - public var additionalScopes: String? - public var oidcWellKnownUrl: String? - public var oidcJwksUrl: String? - public var oidcJwks: [String: AnyCodable]? - - public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, providerType: ProviderTypeEnum, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String, consumerSecret: String, additionalScopes: String? = nil, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.providerType = providerType - self.requestTokenUrl = requestTokenUrl - self.authorizationUrl = authorizationUrl - self.accessTokenUrl = accessTokenUrl - self.profileUrl = profileUrl - self.consumerKey = consumerKey - self.consumerSecret = consumerSecret - self.additionalScopes = additionalScopes - self.oidcWellKnownUrl = oidcWellKnownUrl - self.oidcJwksUrl = oidcJwksUrl - self.oidcJwks = oidcJwks - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case providerType = "provider_type" - case requestTokenUrl = "request_token_url" - case authorizationUrl = "authorization_url" - case accessTokenUrl = "access_token_url" - case profileUrl = "profile_url" - case consumerKey = "consumer_key" - case consumerSecret = "consumer_secret" - case additionalScopes = "additional_scopes" - case oidcWellKnownUrl = "oidc_well_known_url" - case oidcJwksUrl = "oidc_jwks_url" - case oidcJwks = "oidc_jwks" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(providerType, forKey: .providerType) - try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) - try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) - try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) - try container.encodeIfPresent(profileUrl, forKey: .profileUrl) - try container.encode(consumerKey, forKey: .consumerKey) - try container.encode(consumerSecret, forKey: .consumerSecret) - try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) - try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) - try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) - try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OpenIDConnectConfiguration.swift b/authentikClient/Classes/OpenAPIs/Models/OpenIDConnectConfiguration.swift deleted file mode 100644 index a5f3796..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OpenIDConnectConfiguration.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// OpenIDConnectConfiguration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** rest_framework Serializer for OIDC Configuration */ -public struct OpenIDConnectConfiguration: Codable, JSONEncodable, Hashable { - - public var issuer: String - public var authorizationEndpoint: String - public var tokenEndpoint: String - public var userinfoEndpoint: String - public var endSessionEndpoint: String - public var introspectionEndpoint: String - public var jwksUri: String - public var responseTypesSupported: [String] - public var idTokenSigningAlgValuesSupported: [String] - public var subjectTypesSupported: [String] - public var tokenEndpointAuthMethodsSupported: [String] - - public init(issuer: String, authorizationEndpoint: String, tokenEndpoint: String, userinfoEndpoint: String, endSessionEndpoint: String, introspectionEndpoint: String, jwksUri: String, responseTypesSupported: [String], idTokenSigningAlgValuesSupported: [String], subjectTypesSupported: [String], tokenEndpointAuthMethodsSupported: [String]) { - self.issuer = issuer - self.authorizationEndpoint = authorizationEndpoint - self.tokenEndpoint = tokenEndpoint - self.userinfoEndpoint = userinfoEndpoint - self.endSessionEndpoint = endSessionEndpoint - self.introspectionEndpoint = introspectionEndpoint - self.jwksUri = jwksUri - self.responseTypesSupported = responseTypesSupported - self.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported - self.subjectTypesSupported = subjectTypesSupported - self.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case issuer - case authorizationEndpoint = "authorization_endpoint" - case tokenEndpoint = "token_endpoint" - case userinfoEndpoint = "userinfo_endpoint" - case endSessionEndpoint = "end_session_endpoint" - case introspectionEndpoint = "introspection_endpoint" - case jwksUri = "jwks_uri" - case responseTypesSupported = "response_types_supported" - case idTokenSigningAlgValuesSupported = "id_token_signing_alg_values_supported" - case subjectTypesSupported = "subject_types_supported" - case tokenEndpointAuthMethodsSupported = "token_endpoint_auth_methods_supported" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(issuer, forKey: .issuer) - try container.encode(authorizationEndpoint, forKey: .authorizationEndpoint) - try container.encode(tokenEndpoint, forKey: .tokenEndpoint) - try container.encode(userinfoEndpoint, forKey: .userinfoEndpoint) - try container.encode(endSessionEndpoint, forKey: .endSessionEndpoint) - try container.encode(introspectionEndpoint, forKey: .introspectionEndpoint) - try container.encode(jwksUri, forKey: .jwksUri) - try container.encode(responseTypesSupported, forKey: .responseTypesSupported) - try container.encode(idTokenSigningAlgValuesSupported, forKey: .idTokenSigningAlgValuesSupported) - try container.encode(subjectTypesSupported, forKey: .subjectTypesSupported) - try container.encode(tokenEndpointAuthMethodsSupported, forKey: .tokenEndpointAuthMethodsSupported) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Outpost.swift b/authentikClient/Classes/OpenAPIs/Models/Outpost.swift deleted file mode 100644 index eb97000..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Outpost.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Outpost.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Outpost Serializer */ -public struct Outpost: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var type: OutpostTypeEnum - public var providers: [Int] - public var providersObj: [Provider] - /** Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. */ - public var serviceConnection: UUID? - public var serviceConnectionObj: ServiceConnection - /** Get Token identifier */ - public var tokenIdentifier: String - public var config: [String: AnyCodable] - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - - public init(pk: UUID, name: String, type: OutpostTypeEnum, providers: [Int], providersObj: [Provider], serviceConnection: UUID? = nil, serviceConnectionObj: ServiceConnection, tokenIdentifier: String, config: [String: AnyCodable], managed: String? = nil) { - self.pk = pk - self.name = name - self.type = type - self.providers = providers - self.providersObj = providersObj - self.serviceConnection = serviceConnection - self.serviceConnectionObj = serviceConnectionObj - self.tokenIdentifier = tokenIdentifier - self.config = config - self.managed = managed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case type - case providers - case providersObj = "providers_obj" - case serviceConnection = "service_connection" - case serviceConnectionObj = "service_connection_obj" - case tokenIdentifier = "token_identifier" - case config - case managed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(type, forKey: .type) - try container.encode(providers, forKey: .providers) - try container.encode(providersObj, forKey: .providersObj) - try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) - try container.encode(serviceConnectionObj, forKey: .serviceConnectionObj) - try container.encode(tokenIdentifier, forKey: .tokenIdentifier) - try container.encode(config, forKey: .config) - try container.encodeIfPresent(managed, forKey: .managed) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OutpostDefaultConfig.swift b/authentikClient/Classes/OpenAPIs/Models/OutpostDefaultConfig.swift deleted file mode 100644 index 741b67d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OutpostDefaultConfig.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// OutpostDefaultConfig.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Global default outpost config */ -public struct OutpostDefaultConfig: Codable, JSONEncodable, Hashable { - - public var config: [String: AnyCodable] - - public init(config: [String: AnyCodable]) { - self.config = config - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case config - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(config, forKey: .config) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OutpostHealth.swift b/authentikClient/Classes/OpenAPIs/Models/OutpostHealth.swift deleted file mode 100644 index 464d33d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OutpostHealth.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// OutpostHealth.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Outpost health status */ -public struct OutpostHealth: Codable, JSONEncodable, Hashable { - - public var uid: String - public var lastSeen: Date - public var version: String - public var versionShould: String - public var versionOutdated: Bool - public var buildHash: String - public var buildHashShould: String - public var hostname: String - - public init(uid: String, lastSeen: Date, version: String, versionShould: String, versionOutdated: Bool, buildHash: String, buildHashShould: String, hostname: String) { - self.uid = uid - self.lastSeen = lastSeen - self.version = version - self.versionShould = versionShould - self.versionOutdated = versionOutdated - self.buildHash = buildHash - self.buildHashShould = buildHashShould - self.hostname = hostname - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case uid - case lastSeen = "last_seen" - case version - case versionShould = "version_should" - case versionOutdated = "version_outdated" - case buildHash = "build_hash" - case buildHashShould = "build_hash_should" - case hostname - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(uid, forKey: .uid) - try container.encode(lastSeen, forKey: .lastSeen) - try container.encode(version, forKey: .version) - try container.encode(versionShould, forKey: .versionShould) - try container.encode(versionOutdated, forKey: .versionOutdated) - try container.encode(buildHash, forKey: .buildHash) - try container.encode(buildHashShould, forKey: .buildHashShould) - try container.encode(hostname, forKey: .hostname) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OutpostRequest.swift b/authentikClient/Classes/OpenAPIs/Models/OutpostRequest.swift deleted file mode 100644 index 0346e37..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OutpostRequest.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// OutpostRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Outpost Serializer */ -public struct OutpostRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var type: OutpostTypeEnum - public var providers: [Int] - /** Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. */ - public var serviceConnection: UUID? - public var config: [String: AnyCodable] - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - - public init(name: String, type: OutpostTypeEnum, providers: [Int], serviceConnection: UUID? = nil, config: [String: AnyCodable], managed: String? = nil) { - self.name = name - self.type = type - self.providers = providers - self.serviceConnection = serviceConnection - self.config = config - self.managed = managed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case type - case providers - case serviceConnection = "service_connection" - case config - case managed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(type, forKey: .type) - try container.encode(providers, forKey: .providers) - try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) - try container.encode(config, forKey: .config) - try container.encodeIfPresent(managed, forKey: .managed) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/OutpostTypeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/OutpostTypeEnum.swift deleted file mode 100644 index 4cb9904..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/OutpostTypeEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// OutpostTypeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `proxy` - Proxy * `ldap` - Ldap * `radius` - Radius */ -public enum OutpostTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case proxy = "proxy" - case ldap = "ldap" - case radius = "radius" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationList.swift deleted file mode 100644 index df8324e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedApplicationList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedApplicationList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Application] - - public init(pagination: Pagination, results: [Application]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationListPagination.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationListPagination.swift deleted file mode 100644 index d42d034..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedApplicationListPagination.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// PaginatedApplicationListPagination.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedApplicationListPagination: Codable, JSONEncodable, Hashable { - - public var next: Double - public var previous: Double - public var count: Double - public var current: Double - public var totalPages: Double - public var startIndex: Double - public var endIndex: Double - - public init(next: Double, previous: Double, count: Double, current: Double, totalPages: Double, startIndex: Double, endIndex: Double) { - self.next = next - self.previous = previous - self.count = count - self.current = current - self.totalPages = totalPages - self.startIndex = startIndex - self.endIndex = endIndex - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case next - case previous - case count - case current - case totalPages = "total_pages" - case startIndex = "start_index" - case endIndex = "end_index" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(next, forKey: .next) - try container.encode(previous, forKey: .previous) - try container.encode(count, forKey: .count) - try container.encode(current, forKey: .current) - try container.encode(totalPages, forKey: .totalPages) - try container.encode(startIndex, forKey: .startIndex) - try container.encode(endIndex, forKey: .endIndex) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticateWebAuthnStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticateWebAuthnStageList.swift deleted file mode 100644 index ff40916..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticateWebAuthnStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticateWebAuthnStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticateWebAuthnStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticateWebAuthnStage] - - public init(pagination: Pagination, results: [AuthenticateWebAuthnStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatedSessionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatedSessionList.swift deleted file mode 100644 index 85d9763..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatedSessionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatedSessionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatedSessionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatedSession] - - public init(pagination: Pagination, results: [AuthenticatedSession]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorDuoStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorDuoStageList.swift deleted file mode 100644 index 0ec3da4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorDuoStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatorDuoStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatorDuoStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatorDuoStage] - - public init(pagination: Pagination, results: [AuthenticatorDuoStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorSMSStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorSMSStageList.swift deleted file mode 100644 index 277b0dd..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorSMSStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatorSMSStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatorSMSStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatorSMSStage] - - public init(pagination: Pagination, results: [AuthenticatorSMSStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorStaticStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorStaticStageList.swift deleted file mode 100644 index e9135c2..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorStaticStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatorStaticStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatorStaticStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatorStaticStage] - - public init(pagination: Pagination, results: [AuthenticatorStaticStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorTOTPStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorTOTPStageList.swift deleted file mode 100644 index e9ef00c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorTOTPStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatorTOTPStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatorTOTPStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatorTOTPStage] - - public init(pagination: Pagination, results: [AuthenticatorTOTPStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorValidateStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorValidateStageList.swift deleted file mode 100644 index fa1d106..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedAuthenticatorValidateStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedAuthenticatorValidateStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedAuthenticatorValidateStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [AuthenticatorValidateStage] - - public init(pagination: Pagination, results: [AuthenticatorValidateStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedBlueprintInstanceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedBlueprintInstanceList.swift deleted file mode 100644 index 14dbd63..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedBlueprintInstanceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedBlueprintInstanceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedBlueprintInstanceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [BlueprintInstance] - - public init(pagination: Pagination, results: [BlueprintInstance]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedCaptchaStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedCaptchaStageList.swift deleted file mode 100644 index c22469c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedCaptchaStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedCaptchaStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedCaptchaStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [CaptchaStage] - - public init(pagination: Pagination, results: [CaptchaStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedCertificateKeyPairList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedCertificateKeyPairList.swift deleted file mode 100644 index b506e82..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedCertificateKeyPairList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedCertificateKeyPairList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedCertificateKeyPairList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [CertificateKeyPair] - - public init(pagination: Pagination, results: [CertificateKeyPair]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedConsentStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedConsentStageList.swift deleted file mode 100644 index 0d758e3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedConsentStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedConsentStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedConsentStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ConsentStage] - - public init(pagination: Pagination, results: [ConsentStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedDenyStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedDenyStageList.swift deleted file mode 100644 index 32b92a4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedDenyStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedDenyStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedDenyStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [DenyStage] - - public init(pagination: Pagination, results: [DenyStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedDockerServiceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedDockerServiceConnectionList.swift deleted file mode 100644 index 2253ae4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedDockerServiceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedDockerServiceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedDockerServiceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [DockerServiceConnection] - - public init(pagination: Pagination, results: [DockerServiceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyPolicyList.swift deleted file mode 100644 index 174b52e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedDummyPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedDummyPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [DummyPolicy] - - public init(pagination: Pagination, results: [DummyPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyStageList.swift deleted file mode 100644 index 72a27b5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedDummyStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedDummyStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedDummyStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [DummyStage] - - public init(pagination: Pagination, results: [DummyStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedDuoDeviceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedDuoDeviceList.swift deleted file mode 100644 index 92804a8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedDuoDeviceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedDuoDeviceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedDuoDeviceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [DuoDevice] - - public init(pagination: Pagination, results: [DuoDevice]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedEmailStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedEmailStageList.swift deleted file mode 100644 index 6697547..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedEmailStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedEmailStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedEmailStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [EmailStage] - - public init(pagination: Pagination, results: [EmailStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedEventList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedEventList.swift deleted file mode 100644 index bcef968..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedEventList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedEventList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedEventList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Event] - - public init(pagination: Pagination, results: [Event]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedEventMatcherPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedEventMatcherPolicyList.swift deleted file mode 100644 index 2e57857..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedEventMatcherPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedEventMatcherPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedEventMatcherPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [EventMatcherPolicy] - - public init(pagination: Pagination, results: [EventMatcherPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedExpiringBaseGrantModelList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedExpiringBaseGrantModelList.swift deleted file mode 100644 index 78a6375..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedExpiringBaseGrantModelList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedExpiringBaseGrantModelList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedExpiringBaseGrantModelList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ExpiringBaseGrantModel] - - public init(pagination: Pagination, results: [ExpiringBaseGrantModel]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedExpressionPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedExpressionPolicyList.swift deleted file mode 100644 index 6f7f2ba..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedExpressionPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedExpressionPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedExpressionPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ExpressionPolicy] - - public init(pagination: Pagination, results: [ExpressionPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraRoleObjectPermissionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraRoleObjectPermissionList.swift deleted file mode 100644 index 1c0725c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraRoleObjectPermissionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedExtraRoleObjectPermissionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedExtraRoleObjectPermissionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ExtraRoleObjectPermission] - - public init(pagination: Pagination, results: [ExtraRoleObjectPermission]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraUserObjectPermissionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraUserObjectPermissionList.swift deleted file mode 100644 index d48dbed..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedExtraUserObjectPermissionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedExtraUserObjectPermissionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedExtraUserObjectPermissionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ExtraUserObjectPermission] - - public init(pagination: Pagination, results: [ExtraUserObjectPermission]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowList.swift deleted file mode 100644 index c04e635..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedFlowList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedFlowList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Flow] - - public init(pagination: Pagination, results: [Flow]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowStageBindingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowStageBindingList.swift deleted file mode 100644 index 26537f0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedFlowStageBindingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedFlowStageBindingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedFlowStageBindingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [FlowStageBinding] - - public init(pagination: Pagination, results: [FlowStageBinding]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedGroupList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedGroupList.swift deleted file mode 100644 index 20c62de..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedGroupList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedGroupList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedGroupList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Group] - - public init(pagination: Pagination, results: [Group]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedIdentificationStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedIdentificationStageList.swift deleted file mode 100644 index 2077697..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedIdentificationStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedIdentificationStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedIdentificationStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [IdentificationStage] - - public init(pagination: Pagination, results: [IdentificationStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationList.swift deleted file mode 100644 index 3d9793a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedInvitationList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedInvitationList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Invitation] - - public init(pagination: Pagination, results: [Invitation]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationStageList.swift deleted file mode 100644 index 9ec1744..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedInvitationStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedInvitationStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedInvitationStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [InvitationStage] - - public init(pagination: Pagination, results: [InvitationStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedKubernetesServiceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedKubernetesServiceConnectionList.swift deleted file mode 100644 index 53a9391..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedKubernetesServiceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedKubernetesServiceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedKubernetesServiceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [KubernetesServiceConnection] - - public init(pagination: Pagination, results: [KubernetesServiceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPOutpostConfigList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPOutpostConfigList.swift deleted file mode 100644 index f4beff3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPOutpostConfigList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedLDAPOutpostConfigList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedLDAPOutpostConfigList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [LDAPOutpostConfig] - - public init(pagination: Pagination, results: [LDAPOutpostConfig]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPPropertyMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPPropertyMappingList.swift deleted file mode 100644 index 5ca6727..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPPropertyMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedLDAPPropertyMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedLDAPPropertyMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [LDAPPropertyMapping] - - public init(pagination: Pagination, results: [LDAPPropertyMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPProviderList.swift deleted file mode 100644 index af1f978..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedLDAPProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedLDAPProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [LDAPProvider] - - public init(pagination: Pagination, results: [LDAPProvider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPSourceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPSourceList.swift deleted file mode 100644 index d5ffa95..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedLDAPSourceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedLDAPSourceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedLDAPSourceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [LDAPSource] - - public init(pagination: Pagination, results: [LDAPSource]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedLicenseList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedLicenseList.swift deleted file mode 100644 index 4783a1e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedLicenseList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedLicenseList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedLicenseList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [License] - - public init(pagination: Pagination, results: [License]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationList.swift deleted file mode 100644 index e6ba3b5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedNotificationList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedNotificationList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Notification] - - public init(pagination: Pagination, results: [Notification]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationRuleList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationRuleList.swift deleted file mode 100644 index 4df4242..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationRuleList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedNotificationRuleList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedNotificationRuleList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [NotificationRule] - - public init(pagination: Pagination, results: [NotificationRule]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationTransportList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationTransportList.swift deleted file mode 100644 index 6aa8882..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationTransportList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedNotificationTransportList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedNotificationTransportList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [NotificationTransport] - - public init(pagination: Pagination, results: [NotificationTransport]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationWebhookMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationWebhookMappingList.swift deleted file mode 100644 index 4995758..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedNotificationWebhookMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedNotificationWebhookMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedNotificationWebhookMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [NotificationWebhookMapping] - - public init(pagination: Pagination, results: [NotificationWebhookMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuth2ProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuth2ProviderList.swift deleted file mode 100644 index b6c2866..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuth2ProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedOAuth2ProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedOAuth2ProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [OAuth2Provider] - - public init(pagination: Pagination, results: [OAuth2Provider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuthSourceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuthSourceList.swift deleted file mode 100644 index 72a6306..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedOAuthSourceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedOAuthSourceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedOAuthSourceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [OAuthSource] - - public init(pagination: Pagination, results: [OAuthSource]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedOutpostList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedOutpostList.swift deleted file mode 100644 index f7c8f5e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedOutpostList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedOutpostList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedOutpostList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Outpost] - - public init(pagination: Pagination, results: [Outpost]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordExpiryPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordExpiryPolicyList.swift deleted file mode 100644 index e04c0e5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordExpiryPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPasswordExpiryPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPasswordExpiryPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PasswordExpiryPolicy] - - public init(pagination: Pagination, results: [PasswordExpiryPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordPolicyList.swift deleted file mode 100644 index 2c15936..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPasswordPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPasswordPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PasswordPolicy] - - public init(pagination: Pagination, results: [PasswordPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordStageList.swift deleted file mode 100644 index 51f3d52..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPasswordStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPasswordStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPasswordStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PasswordStage] - - public init(pagination: Pagination, results: [PasswordStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPermissionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPermissionList.swift deleted file mode 100644 index c04c602..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPermissionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPermissionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPermissionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Permission] - - public init(pagination: Pagination, results: [Permission]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceConnectionList.swift deleted file mode 100644 index d62ab0e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPlexSourceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPlexSourceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PlexSourceConnection] - - public init(pagination: Pagination, results: [PlexSourceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceList.swift deleted file mode 100644 index 3cffcf4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPlexSourceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPlexSourceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPlexSourceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PlexSource] - - public init(pagination: Pagination, results: [PlexSource]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyBindingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyBindingList.swift deleted file mode 100644 index efde7cf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyBindingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPolicyBindingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPolicyBindingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PolicyBinding] - - public init(pagination: Pagination, results: [PolicyBinding]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyList.swift deleted file mode 100644 index aad8fcc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Policy] - - public init(pagination: Pagination, results: [Policy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptList.swift deleted file mode 100644 index b6c6eb6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPromptList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPromptList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Prompt] - - public init(pagination: Pagination, results: [Prompt]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptStageList.swift deleted file mode 100644 index 64867ec..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPromptStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPromptStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPromptStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PromptStage] - - public init(pagination: Pagination, results: [PromptStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedPropertyMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedPropertyMappingList.swift deleted file mode 100644 index 2b52d06..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedPropertyMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedPropertyMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedPropertyMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [PropertyMapping] - - public init(pagination: Pagination, results: [PropertyMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedProviderList.swift deleted file mode 100644 index 1144ea5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Provider] - - public init(pagination: Pagination, results: [Provider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyOutpostConfigList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyOutpostConfigList.swift deleted file mode 100644 index 3f0a62b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyOutpostConfigList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedProxyOutpostConfigList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedProxyOutpostConfigList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ProxyOutpostConfig] - - public init(pagination: Pagination, results: [ProxyOutpostConfig]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyProviderList.swift deleted file mode 100644 index 9cb57a3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedProxyProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedProxyProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedProxyProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ProxyProvider] - - public init(pagination: Pagination, results: [ProxyProvider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusOutpostConfigList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusOutpostConfigList.swift deleted file mode 100644 index 6a586f3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusOutpostConfigList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedRadiusOutpostConfigList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedRadiusOutpostConfigList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [RadiusOutpostConfig] - - public init(pagination: Pagination, results: [RadiusOutpostConfig]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusProviderList.swift deleted file mode 100644 index 316199c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedRadiusProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedRadiusProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedRadiusProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [RadiusProvider] - - public init(pagination: Pagination, results: [RadiusProvider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationList.swift deleted file mode 100644 index 5c85943..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedReputationList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedReputationList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Reputation] - - public init(pagination: Pagination, results: [Reputation]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationPolicyList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationPolicyList.swift deleted file mode 100644 index 5b408fe..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedReputationPolicyList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedReputationPolicyList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedReputationPolicyList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ReputationPolicy] - - public init(pagination: Pagination, results: [ReputationPolicy]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleAssignedObjectPermissionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleAssignedObjectPermissionList.swift deleted file mode 100644 index e04def6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleAssignedObjectPermissionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedRoleAssignedObjectPermissionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedRoleAssignedObjectPermissionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [RoleAssignedObjectPermission] - - public init(pagination: Pagination, results: [RoleAssignedObjectPermission]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleList.swift deleted file mode 100644 index 92be489..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedRoleList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedRoleList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedRoleList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Role] - - public init(pagination: Pagination, results: [Role]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLPropertyMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLPropertyMappingList.swift deleted file mode 100644 index 4e286e3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLPropertyMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSAMLPropertyMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSAMLPropertyMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SAMLPropertyMapping] - - public init(pagination: Pagination, results: [SAMLPropertyMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLProviderList.swift deleted file mode 100644 index eb712b1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSAMLProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSAMLProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SAMLProvider] - - public init(pagination: Pagination, results: [SAMLProvider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLSourceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLSourceList.swift deleted file mode 100644 index 0f62564..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSAMLSourceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSAMLSourceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSAMLSourceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SAMLSource] - - public init(pagination: Pagination, results: [SAMLSource]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMMappingList.swift deleted file mode 100644 index cc3980d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSCIMMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSCIMMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SCIMMapping] - - public init(pagination: Pagination, results: [SCIMMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMProviderList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMProviderList.swift deleted file mode 100644 index df29117..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSCIMProviderList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSCIMProviderList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSCIMProviderList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SCIMProvider] - - public init(pagination: Pagination, results: [SCIMProvider]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSMSDeviceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSMSDeviceList.swift deleted file mode 100644 index 921c0e9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSMSDeviceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSMSDeviceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSMSDeviceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [SMSDevice] - - public init(pagination: Pagination, results: [SMSDevice]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedScopeMappingList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedScopeMappingList.swift deleted file mode 100644 index 41b3eee..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedScopeMappingList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedScopeMappingList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedScopeMappingList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ScopeMapping] - - public init(pagination: Pagination, results: [ScopeMapping]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedServiceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedServiceConnectionList.swift deleted file mode 100644 index 0632643..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedServiceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedServiceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedServiceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [ServiceConnection] - - public init(pagination: Pagination, results: [ServiceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedSourceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedSourceList.swift deleted file mode 100644 index ba2eeb6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedSourceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedSourceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedSourceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Source] - - public init(pagination: Pagination, results: [Source]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedStageList.swift deleted file mode 100644 index 2c04869..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Stage] - - public init(pagination: Pagination, results: [Stage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedStaticDeviceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedStaticDeviceList.swift deleted file mode 100644 index f984dc1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedStaticDeviceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedStaticDeviceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedStaticDeviceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [StaticDevice] - - public init(pagination: Pagination, results: [StaticDevice]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedTOTPDeviceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedTOTPDeviceList.swift deleted file mode 100644 index a5e1642..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedTOTPDeviceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedTOTPDeviceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedTOTPDeviceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [TOTPDevice] - - public init(pagination: Pagination, results: [TOTPDevice]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedTenantList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedTenantList.swift deleted file mode 100644 index 79934b3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedTenantList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedTenantList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedTenantList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Tenant] - - public init(pagination: Pagination, results: [Tenant]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenList.swift deleted file mode 100644 index 997a63b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedTokenList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedTokenList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [Token] - - public init(pagination: Pagination, results: [Token]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenModelList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenModelList.swift deleted file mode 100644 index 6c68563..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedTokenModelList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedTokenModelList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedTokenModelList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [TokenModel] - - public init(pagination: Pagination, results: [TokenModel]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserAssignedObjectPermissionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserAssignedObjectPermissionList.swift deleted file mode 100644 index a6b493f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserAssignedObjectPermissionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserAssignedObjectPermissionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserAssignedObjectPermissionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserAssignedObjectPermission] - - public init(pagination: Pagination, results: [UserAssignedObjectPermission]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserConsentList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserConsentList.swift deleted file mode 100644 index 6130253..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserConsentList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserConsentList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserConsentList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserConsent] - - public init(pagination: Pagination, results: [UserConsent]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserDeleteStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserDeleteStageList.swift deleted file mode 100644 index c2d7fca..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserDeleteStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserDeleteStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserDeleteStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserDeleteStage] - - public init(pagination: Pagination, results: [UserDeleteStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserList.swift deleted file mode 100644 index 2dc6cff..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [User] - - public init(pagination: Pagination, results: [User]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLoginStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLoginStageList.swift deleted file mode 100644 index 212272e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLoginStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserLoginStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserLoginStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserLoginStage] - - public init(pagination: Pagination, results: [UserLoginStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLogoutStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLogoutStageList.swift deleted file mode 100644 index 32ad0f3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserLogoutStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserLogoutStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserLogoutStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserLogoutStage] - - public init(pagination: Pagination, results: [UserLogoutStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserOAuthSourceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserOAuthSourceConnectionList.swift deleted file mode 100644 index cb6af95..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserOAuthSourceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserOAuthSourceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserOAuthSourceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserOAuthSourceConnection] - - public init(pagination: Pagination, results: [UserOAuthSourceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSAMLSourceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSAMLSourceConnectionList.swift deleted file mode 100644 index 6f59d34..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSAMLSourceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserSAMLSourceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserSAMLSourceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserSAMLSourceConnection] - - public init(pagination: Pagination, results: [UserSAMLSourceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSourceConnectionList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSourceConnectionList.swift deleted file mode 100644 index e7439cf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserSourceConnectionList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserSourceConnectionList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserSourceConnectionList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserSourceConnection] - - public init(pagination: Pagination, results: [UserSourceConnection]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserWriteStageList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedUserWriteStageList.swift deleted file mode 100644 index f4b927f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedUserWriteStageList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedUserWriteStageList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedUserWriteStageList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [UserWriteStage] - - public init(pagination: Pagination, results: [UserWriteStage]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PaginatedWebAuthnDeviceList.swift b/authentikClient/Classes/OpenAPIs/Models/PaginatedWebAuthnDeviceList.swift deleted file mode 100644 index b978c7e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PaginatedWebAuthnDeviceList.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PaginatedWebAuthnDeviceList.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct PaginatedWebAuthnDeviceList: Codable, JSONEncodable, Hashable { - - public var pagination: Pagination - public var results: [WebAuthnDevice] - - public init(pagination: Pagination, results: [WebAuthnDevice]) { - self.pagination = pagination - self.results = results - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pagination - case results - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) - try container.encode(results, forKey: .results) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Pagination.swift b/authentikClient/Classes/OpenAPIs/Models/Pagination.swift deleted file mode 100644 index 04a76ac..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Pagination.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Pagination.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct Pagination: Codable, JSONEncodable, Hashable { - - public var next: Double - public var previous: Double - public var count: Double - public var current: Double - public var totalPages: Double - public var startIndex: Double - public var endIndex: Double - - public init(next: Double, previous: Double, count: Double, current: Double, totalPages: Double, startIndex: Double, endIndex: Double) { - self.next = next - self.previous = previous - self.count = count - self.current = current - self.totalPages = totalPages - self.startIndex = startIndex - self.endIndex = endIndex - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case next - case previous - case count - case current - case totalPages = "total_pages" - case startIndex = "start_index" - case endIndex = "end_index" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(next, forKey: .next) - try container.encode(previous, forKey: .previous) - try container.encode(count, forKey: .count) - try container.encode(current, forKey: .current) - try container.encode(totalPages, forKey: .totalPages) - try container.encode(startIndex, forKey: .startIndex) - try container.encode(endIndex, forKey: .endIndex) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordChallenge.swift deleted file mode 100644 index 0f277a1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordChallenge.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// PasswordChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password challenge UI fields */ -public struct PasswordChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-password" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - public var recoveryUrl: String? - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-password", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, recoveryUrl: String? = nil) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - self.recoveryUrl = recoveryUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - case recoveryUrl = "recovery_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - try container.encodeIfPresent(recoveryUrl, forKey: .recoveryUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordChallengeResponseRequest.swift deleted file mode 100644 index 1c7f94f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PasswordChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password challenge response */ -public struct PasswordChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-password" - public var password: String - - public init(component: String? = "ak-stage-password", password: String) { - self.component = component - self.password = password - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(password, forKey: .password) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicy.swift deleted file mode 100644 index 61adc77..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicy.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// PasswordExpiryPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Expiry Policy Serializer */ -public struct PasswordExpiryPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - public var days: Int - public var denyOnly: Bool? - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, days: Int, denyOnly: Bool? = nil) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.days = days - self.denyOnly = denyOnly - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case days - case denyOnly = "deny_only" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encode(days, forKey: .days) - try container.encodeIfPresent(denyOnly, forKey: .denyOnly) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicyRequest.swift deleted file mode 100644 index fe3d9c5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordExpiryPolicyRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// PasswordExpiryPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Expiry Policy Serializer */ -public struct PasswordExpiryPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var days: Int - public var denyOnly: Bool? - - public init(name: String, executionLogging: Bool? = nil, days: Int, denyOnly: Bool? = nil) { - self.name = name - self.executionLogging = executionLogging - self.days = days - self.denyOnly = denyOnly - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case days - case denyOnly = "deny_only" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(days, forKey: .days) - try container.encodeIfPresent(denyOnly, forKey: .denyOnly) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordPolicy.swift deleted file mode 100644 index 04707c5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordPolicy.swift +++ /dev/null @@ -1,122 +0,0 @@ -// -// PasswordPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Policy Serializer */ -public struct PasswordPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - /** Field key to check, field keys defined in Prompt stages are available. */ - public var passwordField: String? - public var amountDigits: Int? - public var amountUppercase: Int? - public var amountLowercase: Int? - public var amountSymbols: Int? - public var lengthMin: Int? - public var symbolCharset: String? - public var errorMessage: String? - public var checkStaticRules: Bool? - public var checkHaveIBeenPwned: Bool? - public var checkZxcvbn: Bool? - /** How many times the password hash is allowed to be on haveibeenpwned */ - public var hibpAllowedCount: Int? - /** If the zxcvbn score is equal or less than this value, the policy will fail. */ - public var zxcvbnScoreThreshold: Int? - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.passwordField = passwordField - self.amountDigits = amountDigits - self.amountUppercase = amountUppercase - self.amountLowercase = amountLowercase - self.amountSymbols = amountSymbols - self.lengthMin = lengthMin - self.symbolCharset = symbolCharset - self.errorMessage = errorMessage - self.checkStaticRules = checkStaticRules - self.checkHaveIBeenPwned = checkHaveIBeenPwned - self.checkZxcvbn = checkZxcvbn - self.hibpAllowedCount = hibpAllowedCount - self.zxcvbnScoreThreshold = zxcvbnScoreThreshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case passwordField = "password_field" - case amountDigits = "amount_digits" - case amountUppercase = "amount_uppercase" - case amountLowercase = "amount_lowercase" - case amountSymbols = "amount_symbols" - case lengthMin = "length_min" - case symbolCharset = "symbol_charset" - case errorMessage = "error_message" - case checkStaticRules = "check_static_rules" - case checkHaveIBeenPwned = "check_have_i_been_pwned" - case checkZxcvbn = "check_zxcvbn" - case hibpAllowedCount = "hibp_allowed_count" - case zxcvbnScoreThreshold = "zxcvbn_score_threshold" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encodeIfPresent(passwordField, forKey: .passwordField) - try container.encodeIfPresent(amountDigits, forKey: .amountDigits) - try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) - try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) - try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) - try container.encodeIfPresent(lengthMin, forKey: .lengthMin) - try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) - try container.encodeIfPresent(errorMessage, forKey: .errorMessage) - try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) - try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) - try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) - try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) - try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordPolicyRequest.swift deleted file mode 100644 index 16d4e17..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordPolicyRequest.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// PasswordPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Policy Serializer */ -public struct PasswordPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Field key to check, field keys defined in Prompt stages are available. */ - public var passwordField: String? - public var amountDigits: Int? - public var amountUppercase: Int? - public var amountLowercase: Int? - public var amountSymbols: Int? - public var lengthMin: Int? - public var symbolCharset: String? - public var errorMessage: String? - public var checkStaticRules: Bool? - public var checkHaveIBeenPwned: Bool? - public var checkZxcvbn: Bool? - /** How many times the password hash is allowed to be on haveibeenpwned */ - public var hibpAllowedCount: Int? - /** If the zxcvbn score is equal or less than this value, the policy will fail. */ - public var zxcvbnScoreThreshold: Int? - - public init(name: String, executionLogging: Bool? = nil, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.passwordField = passwordField - self.amountDigits = amountDigits - self.amountUppercase = amountUppercase - self.amountLowercase = amountLowercase - self.amountSymbols = amountSymbols - self.lengthMin = lengthMin - self.symbolCharset = symbolCharset - self.errorMessage = errorMessage - self.checkStaticRules = checkStaticRules - self.checkHaveIBeenPwned = checkHaveIBeenPwned - self.checkZxcvbn = checkZxcvbn - self.hibpAllowedCount = hibpAllowedCount - self.zxcvbnScoreThreshold = zxcvbnScoreThreshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case passwordField = "password_field" - case amountDigits = "amount_digits" - case amountUppercase = "amount_uppercase" - case amountLowercase = "amount_lowercase" - case amountSymbols = "amount_symbols" - case lengthMin = "length_min" - case symbolCharset = "symbol_charset" - case errorMessage = "error_message" - case checkStaticRules = "check_static_rules" - case checkHaveIBeenPwned = "check_have_i_been_pwned" - case checkZxcvbn = "check_zxcvbn" - case hibpAllowedCount = "hibp_allowed_count" - case zxcvbnScoreThreshold = "zxcvbn_score_threshold" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(passwordField, forKey: .passwordField) - try container.encodeIfPresent(amountDigits, forKey: .amountDigits) - try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) - try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) - try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) - try container.encodeIfPresent(lengthMin, forKey: .lengthMin) - try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) - try container.encodeIfPresent(errorMessage, forKey: .errorMessage) - try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) - try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) - try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) - try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) - try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordStage.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordStage.swift deleted file mode 100644 index c69df09..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordStage.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// PasswordStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PasswordStage Serializer */ -public struct PasswordStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Selection of backends to test the password against. */ - public var backends: [BackendsEnum] - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - /** How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. */ - public var failedAttemptsBeforeCancel: Int? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, backends: [BackendsEnum], configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.backends = backends - self.configureFlow = configureFlow - self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case backends - case configureFlow = "configure_flow" - case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(backends, forKey: .backends) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PasswordStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PasswordStageRequest.swift deleted file mode 100644 index f73ebc5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PasswordStageRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// PasswordStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PasswordStage Serializer */ -public struct PasswordStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Selection of backends to test the password against. */ - public var backends: [BackendsEnum] - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - /** How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. */ - public var failedAttemptsBeforeCancel: Int? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, backends: [BackendsEnum], configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { - self.name = name - self.flowSet = flowSet - self.backends = backends - self.configureFlow = configureFlow - self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case backends - case configureFlow = "configure_flow" - case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(backends, forKey: .backends) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedApplicationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedApplicationRequest.swift deleted file mode 100644 index d9697dc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedApplicationRequest.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// PatchedApplicationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Application Serializer */ -public struct PatchedApplicationRequest: Codable, JSONEncodable, Hashable { - - /** Application's display Name. */ - public var name: String? - /** Internal application name, used in URLs. */ - public var slug: String? - public var provider: Int? - public var backchannelProviders: [Int]? - /** Open launch URL in a new browser tab or window. */ - public var openInNewTab: Bool? - public var metaLaunchUrl: String? - public var metaDescription: String? - public var metaPublisher: String? - public var policyEngineMode: PolicyEngineMode? - public var group: String? - - public init(name: String? = nil, slug: String? = nil, provider: Int? = nil, backchannelProviders: [Int]? = nil, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { - self.name = name - self.slug = slug - self.provider = provider - self.backchannelProviders = backchannelProviders - self.openInNewTab = openInNewTab - self.metaLaunchUrl = metaLaunchUrl - self.metaDescription = metaDescription - self.metaPublisher = metaPublisher - self.policyEngineMode = policyEngineMode - self.group = group - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case provider - case backchannelProviders = "backchannel_providers" - case openInNewTab = "open_in_new_tab" - case metaLaunchUrl = "meta_launch_url" - case metaDescription = "meta_description" - case metaPublisher = "meta_publisher" - case policyEngineMode = "policy_engine_mode" - case group - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(provider, forKey: .provider) - try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) - try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) - try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) - try container.encodeIfPresent(metaDescription, forKey: .metaDescription) - try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(group, forKey: .group) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticateWebAuthnStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticateWebAuthnStageRequest.swift deleted file mode 100644 index f126d50..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticateWebAuthnStageRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// PatchedAuthenticateWebAuthnStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticateWebAuthnStage Serializer */ -public struct PatchedAuthenticateWebAuthnStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var userVerification: UserVerificationEnum? - public var authenticatorAttachment: AuthenticatorAttachmentEnum? - public var residentKeyRequirement: ResidentKeyRequirementEnum? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.userVerification = userVerification - self.authenticatorAttachment = authenticatorAttachment - self.residentKeyRequirement = residentKeyRequirement - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case userVerification = "user_verification" - case authenticatorAttachment = "authenticator_attachment" - case residentKeyRequirement = "resident_key_requirement" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(userVerification, forKey: .userVerification) - try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) - try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorDuoStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorDuoStageRequest.swift deleted file mode 100644 index a24f99c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorDuoStageRequest.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// PatchedAuthenticatorDuoStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorDuoStage Serializer */ -public struct PatchedAuthenticatorDuoStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var clientId: String? - public var clientSecret: String? - public var apiHostname: String? - public var adminIntegrationKey: String? - public var adminSecretKey: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String? = nil, clientSecret: String? = nil, apiHostname: String? = nil, adminIntegrationKey: String? = nil, adminSecretKey: String? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.clientId = clientId - self.clientSecret = clientSecret - self.apiHostname = apiHostname - self.adminIntegrationKey = adminIntegrationKey - self.adminSecretKey = adminSecretKey - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case clientId = "client_id" - case clientSecret = "client_secret" - case apiHostname = "api_hostname" - case adminIntegrationKey = "admin_integration_key" - case adminSecretKey = "admin_secret_key" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(clientSecret, forKey: .clientSecret) - try container.encodeIfPresent(apiHostname, forKey: .apiHostname) - try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) - try container.encodeIfPresent(adminSecretKey, forKey: .adminSecretKey) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorSMSStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorSMSStageRequest.swift deleted file mode 100644 index 05c4f98..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorSMSStageRequest.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// PatchedAuthenticatorSMSStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorSMSStage Serializer */ -public struct PatchedAuthenticatorSMSStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var provider: ProviderEnum? - public var fromNumber: String? - public var accountSid: String? - public var auth: String? - public var authPassword: String? - public var authType: AuthTypeEnum? - /** When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. */ - public var verifyOnly: Bool? - /** Optionally modify the payload being sent to custom providers. */ - public var mapping: UUID? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum? = nil, fromNumber: String? = nil, accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.provider = provider - self.fromNumber = fromNumber - self.accountSid = accountSid - self.auth = auth - self.authPassword = authPassword - self.authType = authType - self.verifyOnly = verifyOnly - self.mapping = mapping - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case provider - case fromNumber = "from_number" - case accountSid = "account_sid" - case auth - case authPassword = "auth_password" - case authType = "auth_type" - case verifyOnly = "verify_only" - case mapping - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(provider, forKey: .provider) - try container.encodeIfPresent(fromNumber, forKey: .fromNumber) - try container.encodeIfPresent(accountSid, forKey: .accountSid) - try container.encodeIfPresent(auth, forKey: .auth) - try container.encodeIfPresent(authPassword, forKey: .authPassword) - try container.encodeIfPresent(authType, forKey: .authType) - try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) - try container.encodeIfPresent(mapping, forKey: .mapping) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorStaticStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorStaticStageRequest.swift deleted file mode 100644 index 3b0e0a4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorStaticStageRequest.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// PatchedAuthenticatorStaticStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorStaticStage Serializer */ -public struct PatchedAuthenticatorStaticStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var tokenCount: Int? - public var tokenLength: Int? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.tokenCount = tokenCount - self.tokenLength = tokenLength - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case tokenCount = "token_count" - case tokenLength = "token_length" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(tokenCount, forKey: .tokenCount) - try container.encodeIfPresent(tokenLength, forKey: .tokenLength) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorTOTPStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorTOTPStageRequest.swift deleted file mode 100644 index 5d48f41..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorTOTPStageRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// PatchedAuthenticatorTOTPStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorTOTPStage Serializer */ -public struct PatchedAuthenticatorTOTPStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - public var friendlyName: String? - public var digits: DigitsEnum? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum? = nil) { - self.name = name - self.flowSet = flowSet - self.configureFlow = configureFlow - self.friendlyName = friendlyName - self.digits = digits - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case configureFlow = "configure_flow" - case friendlyName = "friendly_name" - case digits - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - try container.encodeIfPresent(digits, forKey: .digits) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorValidateStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorValidateStageRequest.swift deleted file mode 100644 index 447df5d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedAuthenticatorValidateStageRequest.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// PatchedAuthenticatorValidateStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** AuthenticatorValidateStage Serializer */ -public struct PatchedAuthenticatorValidateStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var notConfiguredAction: NotConfiguredActionEnum? - /** Device classes which can be used to authenticate */ - public var deviceClasses: [DeviceClassesEnum]? - /** Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. */ - public var configurationStages: [UUID]? - /** If any of the user's device has been used within this threshold, this stage will be skipped */ - public var lastAuthThreshold: String? - /** Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged */ - public var webauthnUserVerification: UserVerificationEnum? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { - self.name = name - self.flowSet = flowSet - self.notConfiguredAction = notConfiguredAction - self.deviceClasses = deviceClasses - self.configurationStages = configurationStages - self.lastAuthThreshold = lastAuthThreshold - self.webauthnUserVerification = webauthnUserVerification - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case notConfiguredAction = "not_configured_action" - case deviceClasses = "device_classes" - case configurationStages = "configuration_stages" - case lastAuthThreshold = "last_auth_threshold" - case webauthnUserVerification = "webauthn_user_verification" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) - try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) - try container.encodeIfPresent(configurationStages, forKey: .configurationStages) - try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) - try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedBlueprintInstanceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedBlueprintInstanceRequest.swift deleted file mode 100644 index 8d43439..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedBlueprintInstanceRequest.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// PatchedBlueprintInstanceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Info about a single blueprint instance file */ -public struct PatchedBlueprintInstanceRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var path: String? = "" - public var context: [String: AnyCodable]? - public var enabled: Bool? - public var content: String? - - public init(name: String? = nil, path: String? = "", context: [String: AnyCodable]? = nil, enabled: Bool? = nil, content: String? = nil) { - self.name = name - self.path = path - self.context = context - self.enabled = enabled - self.content = content - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case path - case context - case enabled - case content - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(context, forKey: .context) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(content, forKey: .content) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedCaptchaStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedCaptchaStageRequest.swift deleted file mode 100644 index d992a58..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedCaptchaStageRequest.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// PatchedCaptchaStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CaptchaStage Serializer */ -public struct PatchedCaptchaStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Public key, acquired your captcha Provider. */ - public var publicKey: String? - /** Private key, acquired your captcha Provider. */ - public var privateKey: String? - public var jsUrl: String? - public var apiUrl: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, publicKey: String? = nil, privateKey: String? = nil, jsUrl: String? = nil, apiUrl: String? = nil) { - self.name = name - self.flowSet = flowSet - self.publicKey = publicKey - self.privateKey = privateKey - self.jsUrl = jsUrl - self.apiUrl = apiUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case publicKey = "public_key" - case privateKey = "private_key" - case jsUrl = "js_url" - case apiUrl = "api_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(publicKey, forKey: .publicKey) - try container.encodeIfPresent(privateKey, forKey: .privateKey) - try container.encodeIfPresent(jsUrl, forKey: .jsUrl) - try container.encodeIfPresent(apiUrl, forKey: .apiUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedCertificateKeyPairRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedCertificateKeyPairRequest.swift deleted file mode 100644 index d7156b8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedCertificateKeyPairRequest.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// PatchedCertificateKeyPairRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** CertificateKeyPair Serializer */ -public struct PatchedCertificateKeyPairRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** PEM-encoded Certificate data */ - public var certificateData: String? - /** Optional Private Key. If this is set, you can use this keypair for encryption. */ - public var keyData: String? - - public init(name: String? = nil, certificateData: String? = nil, keyData: String? = nil) { - self.name = name - self.certificateData = certificateData - self.keyData = keyData - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case certificateData = "certificate_data" - case keyData = "key_data" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(certificateData, forKey: .certificateData) - try container.encodeIfPresent(keyData, forKey: .keyData) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedConsentStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedConsentStageRequest.swift deleted file mode 100644 index 5e8f272..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedConsentStageRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// PatchedConsentStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ConsentStage Serializer */ -public struct PatchedConsentStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var mode: ConsentStageModeEnum? - /** Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). */ - public var consentExpireIn: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { - self.name = name - self.flowSet = flowSet - self.mode = mode - self.consentExpireIn = consentExpireIn - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case mode - case consentExpireIn = "consent_expire_in" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedDenyStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedDenyStageRequest.swift deleted file mode 100644 index 3749033..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedDenyStageRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PatchedDenyStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DenyStage Serializer */ -public struct PatchedDenyStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var denyMessage: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, denyMessage: String? = nil) { - self.name = name - self.flowSet = flowSet - self.denyMessage = denyMessage - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case denyMessage = "deny_message" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(denyMessage, forKey: .denyMessage) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedDockerServiceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedDockerServiceConnectionRequest.swift deleted file mode 100644 index b20501f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedDockerServiceConnectionRequest.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// PatchedDockerServiceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DockerServiceConnection Serializer */ -public struct PatchedDockerServiceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - /** Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. */ - public var url: String? - /** CA which the endpoint's Certificate is verified against. Can be left empty for no validation. */ - public var tlsVerification: UUID? - /** Certificate/Key used for authentication. Can be left empty for no authentication. */ - public var tlsAuthentication: UUID? - - public init(name: String? = nil, local: Bool? = nil, url: String? = nil, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { - self.name = name - self.local = local - self.url = url - self.tlsVerification = tlsVerification - self.tlsAuthentication = tlsAuthentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case local - case url - case tlsVerification = "tls_verification" - case tlsAuthentication = "tls_authentication" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encodeIfPresent(url, forKey: .url) - try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) - try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedDummyPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedDummyPolicyRequest.swift deleted file mode 100644 index 6de8694..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedDummyPolicyRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// PatchedDummyPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Dummy Policy Serializer */ -public struct PatchedDummyPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var result: Bool? - public var waitMin: Int? - public var waitMax: Int? - - public init(name: String? = nil, executionLogging: Bool? = nil, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.result = result - self.waitMin = waitMin - self.waitMax = waitMax - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case result - case waitMin = "wait_min" - case waitMax = "wait_max" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(result, forKey: .result) - try container.encodeIfPresent(waitMin, forKey: .waitMin) - try container.encodeIfPresent(waitMax, forKey: .waitMax) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedDummyStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedDummyStageRequest.swift deleted file mode 100644 index 2602c71..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedDummyStageRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PatchedDummyStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** DummyStage Serializer */ -public struct PatchedDummyStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var throwError: Bool? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, throwError: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.throwError = throwError - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case throwError = "throw_error" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(throwError, forKey: .throwError) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedDuoDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedDuoDeviceRequest.swift deleted file mode 100644 index e4a5b4c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedDuoDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// PatchedDuoDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Duo authenticator devices */ -public struct PatchedDuoDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedEmailStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedEmailStageRequest.swift deleted file mode 100644 index 0d7a998..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedEmailStageRequest.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// PatchedEmailStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** EmailStage Serializer */ -public struct PatchedEmailStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** When enabled, global Email connection settings will be used and connection settings below will be ignored. */ - public var useGlobalSettings: Bool? - public var host: String? - public var port: Int? - public var username: String? - public var password: String? - public var useTls: Bool? - public var useSsl: Bool? - public var timeout: Int? - public var fromAddress: String? - /** Time in minutes the token sent is valid. */ - public var tokenExpiry: Int? - public var subject: String? - public var template: String? - /** Activate users upon completion of stage. */ - public var activateUserOnSuccess: Bool? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, password: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.useGlobalSettings = useGlobalSettings - self.host = host - self.port = port - self.username = username - self.password = password - self.useTls = useTls - self.useSsl = useSsl - self.timeout = timeout - self.fromAddress = fromAddress - self.tokenExpiry = tokenExpiry - self.subject = subject - self.template = template - self.activateUserOnSuccess = activateUserOnSuccess - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case useGlobalSettings = "use_global_settings" - case host - case port - case username - case password - case useTls = "use_tls" - case useSsl = "use_ssl" - case timeout - case fromAddress = "from_address" - case tokenExpiry = "token_expiry" - case subject - case template - case activateUserOnSuccess = "activate_user_on_success" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) - try container.encodeIfPresent(host, forKey: .host) - try container.encodeIfPresent(port, forKey: .port) - try container.encodeIfPresent(username, forKey: .username) - try container.encodeIfPresent(password, forKey: .password) - try container.encodeIfPresent(useTls, forKey: .useTls) - try container.encodeIfPresent(useSsl, forKey: .useSsl) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(fromAddress, forKey: .fromAddress) - try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) - try container.encodeIfPresent(subject, forKey: .subject) - try container.encodeIfPresent(template, forKey: .template) - try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedEventMatcherPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedEventMatcherPolicyRequest.swift deleted file mode 100644 index a696bba..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedEventMatcherPolicyRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// PatchedEventMatcherPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Matcher Policy Serializer */ -public struct PatchedEventMatcherPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix */ - public var action: EventActions? - /** Matches Event's Client IP (strict matching, for network matching use an Expression Policy) */ - public var clientIp: String? - /** Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise */ - public var app: AppEnum? - /** Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License */ - public var model: ModelEnum? - - public init(name: String? = nil, executionLogging: Bool? = nil, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { - self.name = name - self.executionLogging = executionLogging - self.action = action - self.clientIp = clientIp - self.app = app - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case action - case clientIp = "client_ip" - case app - case model - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(action, forKey: .action) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encodeIfPresent(app, forKey: .app) - try container.encodeIfPresent(model, forKey: .model) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedEventRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedEventRequest.swift deleted file mode 100644 index cb78677..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedEventRequest.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// PatchedEventRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Event Serializer */ -public struct PatchedEventRequest: Codable, JSONEncodable, Hashable { - - public var user: [String: AnyCodable]? - public var action: EventActions? - public var app: String? - public var context: [String: AnyCodable]? - public var clientIp: String? - public var expires: Date? - public var tenant: [String: AnyCodable]? - - public init(user: [String: AnyCodable]? = nil, action: EventActions? = nil, app: String? = nil, context: [String: AnyCodable]? = nil, clientIp: String? = nil, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { - self.user = user - self.action = action - self.app = app - self.context = context - self.clientIp = clientIp - self.expires = expires - self.tenant = tenant - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case action - case app - case context - case clientIp = "client_ip" - case expires - case tenant - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(action, forKey: .action) - try container.encodeIfPresent(app, forKey: .app) - try container.encodeIfPresent(context, forKey: .context) - try container.encodeIfPresent(clientIp, forKey: .clientIp) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(tenant, forKey: .tenant) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedExpressionPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedExpressionPolicyRequest.swift deleted file mode 100644 index ff23fae..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedExpressionPolicyRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// PatchedExpressionPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Membership Policy Serializer */ -public struct PatchedExpressionPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var expression: String? - - public init(name: String? = nil, executionLogging: Bool? = nil, expression: String? = nil) { - self.name = name - self.executionLogging = executionLogging - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedFlowRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedFlowRequest.swift deleted file mode 100644 index 2c6770e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedFlowRequest.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// PatchedFlowRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Flow Serializer */ -public struct PatchedFlowRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Visible in the URL. */ - public var slug: String? - /** Shown as the Title in Flow pages. */ - public var title: String? - /** Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration */ - public var designation: FlowDesignationEnum? - public var policyEngineMode: PolicyEngineMode? - /** Enable compatibility mode, increases compatibility with password managers on mobile devices. */ - public var compatibilityMode: Bool? - public var layout: LayoutEnum? - /** Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue */ - public var deniedAction: DeniedActionEnum? - /** Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser */ - public var authentication: AuthenticationEnum? - - public init(name: String? = nil, slug: String? = nil, title: String? = nil, designation: FlowDesignationEnum? = nil, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { - self.name = name - self.slug = slug - self.title = title - self.designation = designation - self.policyEngineMode = policyEngineMode - self.compatibilityMode = compatibilityMode - self.layout = layout - self.deniedAction = deniedAction - self.authentication = authentication - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case title - case designation - case policyEngineMode = "policy_engine_mode" - case compatibilityMode = "compatibility_mode" - case layout - case deniedAction = "denied_action" - case authentication - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(title, forKey: .title) - try container.encodeIfPresent(designation, forKey: .designation) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) - try container.encodeIfPresent(layout, forKey: .layout) - try container.encodeIfPresent(deniedAction, forKey: .deniedAction) - try container.encodeIfPresent(authentication, forKey: .authentication) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedFlowStageBindingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedFlowStageBindingRequest.swift deleted file mode 100644 index d3a7706..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedFlowStageBindingRequest.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// PatchedFlowStageBindingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** FlowStageBinding Serializer */ -public struct PatchedFlowStageBindingRequest: Codable, JSONEncodable, Hashable { - - public var target: UUID? - public var stage: UUID? - /** Evaluate policies during the Flow planning process. */ - public var evaluateOnPlan: Bool? - /** Evaluate policies when the Stage is present to the user. */ - public var reEvaluatePolicies: Bool? - public var order: Int? - public var policyEngineMode: PolicyEngineMode? - /** Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context */ - public var invalidResponseAction: InvalidResponseActionEnum? - - public init(target: UUID? = nil, stage: UUID? = nil, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int? = nil, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { - self.target = target - self.stage = stage - self.evaluateOnPlan = evaluateOnPlan - self.reEvaluatePolicies = reEvaluatePolicies - self.order = order - self.policyEngineMode = policyEngineMode - self.invalidResponseAction = invalidResponseAction - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case target - case stage - case evaluateOnPlan = "evaluate_on_plan" - case reEvaluatePolicies = "re_evaluate_policies" - case order - case policyEngineMode = "policy_engine_mode" - case invalidResponseAction = "invalid_response_action" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(target, forKey: .target) - try container.encodeIfPresent(stage, forKey: .stage) - try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) - try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) - try container.encodeIfPresent(order, forKey: .order) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedGroupRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedGroupRequest.swift deleted file mode 100644 index d99f4a8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedGroupRequest.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// PatchedGroupRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Group Serializer */ -public struct PatchedGroupRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Users added to this group will be superusers. */ - public var isSuperuser: Bool? - public var parent: UUID? - public var users: [Int]? - public var attributes: [String: AnyCodable]? - public var roles: [UUID]? - - public init(name: String? = nil, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil) { - self.name = name - self.isSuperuser = isSuperuser - self.parent = parent - self.users = users - self.attributes = attributes - self.roles = roles - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case isSuperuser = "is_superuser" - case parent - case users - case attributes - case roles - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(parent, forKey: .parent) - try container.encodeIfPresent(users, forKey: .users) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encodeIfPresent(roles, forKey: .roles) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedIdentificationStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedIdentificationStageRequest.swift deleted file mode 100644 index 05e1e98..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedIdentificationStageRequest.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// PatchedIdentificationStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** IdentificationStage Serializer */ -public struct PatchedIdentificationStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Fields of the user object to match against. (Hold shift to select multiple options) */ - public var userFields: [UserFieldsEnum]? - /** When set, shows a password field, instead of showing the password field as seaprate step. */ - public var passwordStage: UUID? - /** When enabled, user fields are matched regardless of their casing. */ - public var caseInsensitiveMatching: Bool? - /** When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown */ - public var showMatchedUser: Bool? - /** Optional enrollment flow, which is linked at the bottom of the page. */ - public var enrollmentFlow: UUID? - /** Optional recovery flow, which is linked at the bottom of the page. */ - public var recoveryFlow: UUID? - /** Optional passwordless flow, which is linked at the bottom of the page. */ - public var passwordlessFlow: UUID? - /** Specify which sources should be shown. */ - public var sources: [UUID]? - public var showSourceLabels: Bool? - /** When enabled, the stage will succeed and continue even when incorrect user info is entered. */ - public var pretendUserExists: Bool? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.userFields = userFields - self.passwordStage = passwordStage - self.caseInsensitiveMatching = caseInsensitiveMatching - self.showMatchedUser = showMatchedUser - self.enrollmentFlow = enrollmentFlow - self.recoveryFlow = recoveryFlow - self.passwordlessFlow = passwordlessFlow - self.sources = sources - self.showSourceLabels = showSourceLabels - self.pretendUserExists = pretendUserExists - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case userFields = "user_fields" - case passwordStage = "password_stage" - case caseInsensitiveMatching = "case_insensitive_matching" - case showMatchedUser = "show_matched_user" - case enrollmentFlow = "enrollment_flow" - case recoveryFlow = "recovery_flow" - case passwordlessFlow = "passwordless_flow" - case sources - case showSourceLabels = "show_source_labels" - case pretendUserExists = "pretend_user_exists" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userFields, forKey: .userFields) - try container.encodeIfPresent(passwordStage, forKey: .passwordStage) - try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) - try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) - try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) - try container.encodeIfPresent(sources, forKey: .sources) - try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) - try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationRequest.swift deleted file mode 100644 index 0f28f52..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationRequest.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// PatchedInvitationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Invitation Serializer */ -public struct PatchedInvitationRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var expires: Date? - public var fixedData: [String: AnyCodable]? - /** When enabled, the invitation will be deleted after usage. */ - public var singleUse: Bool? - /** When set, only the configured flow can use this invitation. */ - public var flow: UUID? - - public init(name: String? = nil, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, singleUse: Bool? = nil, flow: UUID? = nil) { - self.name = name - self.expires = expires - self.fixedData = fixedData - self.singleUse = singleUse - self.flow = flow - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case expires - case fixedData = "fixed_data" - case singleUse = "single_use" - case flow - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(fixedData, forKey: .fixedData) - try container.encodeIfPresent(singleUse, forKey: .singleUse) - try container.encodeIfPresent(flow, forKey: .flow) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationStageRequest.swift deleted file mode 100644 index cc1c8cf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedInvitationStageRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// PatchedInvitationStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** InvitationStage Serializer */ -public struct PatchedInvitationStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. */ - public var continueFlowWithoutInvitation: Bool? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, continueFlowWithoutInvitation: Bool? = nil) { - self.name = name - self.flowSet = flowSet - self.continueFlowWithoutInvitation = continueFlowWithoutInvitation - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case continueFlowWithoutInvitation = "continue_flow_without_invitation" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedKubernetesServiceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedKubernetesServiceConnectionRequest.swift deleted file mode 100644 index 3cf9476..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedKubernetesServiceConnectionRequest.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// PatchedKubernetesServiceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** KubernetesServiceConnection Serializer */ -public struct PatchedKubernetesServiceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - /** Paste your kubeconfig here. authentik will automatically use the currently selected context. */ - public var kubeconfig: [String: AnyCodable]? - /** Verify SSL Certificates of the Kubernetes API endpoint */ - public var verifySsl: Bool? - - public init(name: String? = nil, local: Bool? = nil, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { - self.name = name - self.local = local - self.kubeconfig = kubeconfig - self.verifySsl = verifySsl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case local - case kubeconfig - case verifySsl = "verify_ssl" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) - try container.encodeIfPresent(verifySsl, forKey: .verifySsl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPPropertyMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPPropertyMappingRequest.swift deleted file mode 100644 index 0d7be00..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPPropertyMappingRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// PatchedLDAPPropertyMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP PropertyMapping Serializer */ -public struct PatchedLDAPPropertyMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String? - public var expression: String? - public var objectField: String? - - public init(managed: String? = nil, name: String? = nil, expression: String? = nil, objectField: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - self.objectField = objectField - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case objectField = "object_field" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expression, forKey: .expression) - try container.encodeIfPresent(objectField, forKey: .objectField) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPProviderRequest.swift deleted file mode 100644 index 47eb0ae..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPProviderRequest.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// PatchedLDAPProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAPProvider Serializer */ -public struct PatchedLDAPProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID? - public var propertyMappings: [UUID]? - /** DN under which objects are accessible. */ - public var baseDn: String? - /** Users in this group can do search queries. If not set, every user can execute search queries. */ - public var searchGroup: UUID? - public var certificate: UUID? - public var tlsServerName: String? - /** The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber */ - public var uidStartNumber: Int? - /** The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber */ - public var gidStartNumber: Int? - public var searchMode: LDAPAPIAccessMode? - public var bindMode: LDAPAPIAccessMode? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.baseDn = baseDn - self.searchGroup = searchGroup - self.certificate = certificate - self.tlsServerName = tlsServerName - self.uidStartNumber = uidStartNumber - self.gidStartNumber = gidStartNumber - self.searchMode = searchMode - self.bindMode = bindMode - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case baseDn = "base_dn" - case searchGroup = "search_group" - case certificate - case tlsServerName = "tls_server_name" - case uidStartNumber = "uid_start_number" - case gidStartNumber = "gid_start_number" - case searchMode = "search_mode" - case bindMode = "bind_mode" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(baseDn, forKey: .baseDn) - try container.encodeIfPresent(searchGroup, forKey: .searchGroup) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) - try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) - try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) - try container.encodeIfPresent(searchMode, forKey: .searchMode) - try container.encodeIfPresent(bindMode, forKey: .bindMode) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPSourceRequest.swift deleted file mode 100644 index 50818e2..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedLDAPSourceRequest.swift +++ /dev/null @@ -1,156 +0,0 @@ -// -// PatchedLDAPSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** LDAP Source Serializer */ -public struct PatchedLDAPSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String? - /** Internal source name, used in URLs. */ - public var slug: String? - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - public var serverUri: String? - /** Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. */ - public var peerCertificate: UUID? - /** Client certificate to authenticate against the LDAP Server's Certificate. */ - public var clientCertificate: UUID? - public var bindCn: String? - public var bindPassword: String? - public var startTls: Bool? - public var sni: Bool? - public var baseDn: String? - /** Prepended to Base DN for User-queries. */ - public var additionalUserDn: String? - /** Prepended to Base DN for Group-queries. */ - public var additionalGroupDn: String? - /** Consider Objects matching this filter to be Users. */ - public var userObjectFilter: String? - /** Consider Objects matching this filter to be Groups. */ - public var groupObjectFilter: String? - /** Field which contains members of a group. */ - public var groupMembershipField: String? - /** Field which contains a unique Identifier. */ - public var objectUniquenessField: String? - public var syncUsers: Bool? - /** When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. */ - public var syncUsersPassword: Bool? - public var syncGroups: Bool? - public var syncParentGroup: UUID? - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - - public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, serverUri: String? = nil, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, bindPassword: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String? = nil, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.serverUri = serverUri - self.peerCertificate = peerCertificate - self.clientCertificate = clientCertificate - self.bindCn = bindCn - self.bindPassword = bindPassword - self.startTls = startTls - self.sni = sni - self.baseDn = baseDn - self.additionalUserDn = additionalUserDn - self.additionalGroupDn = additionalGroupDn - self.userObjectFilter = userObjectFilter - self.groupObjectFilter = groupObjectFilter - self.groupMembershipField = groupMembershipField - self.objectUniquenessField = objectUniquenessField - self.syncUsers = syncUsers - self.syncUsersPassword = syncUsersPassword - self.syncGroups = syncGroups - self.syncParentGroup = syncParentGroup - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case serverUri = "server_uri" - case peerCertificate = "peer_certificate" - case clientCertificate = "client_certificate" - case bindCn = "bind_cn" - case bindPassword = "bind_password" - case startTls = "start_tls" - case sni - case baseDn = "base_dn" - case additionalUserDn = "additional_user_dn" - case additionalGroupDn = "additional_group_dn" - case userObjectFilter = "user_object_filter" - case groupObjectFilter = "group_object_filter" - case groupMembershipField = "group_membership_field" - case objectUniquenessField = "object_uniqueness_field" - case syncUsers = "sync_users" - case syncUsersPassword = "sync_users_password" - case syncGroups = "sync_groups" - case syncParentGroup = "sync_parent_group" - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encodeIfPresent(serverUri, forKey: .serverUri) - try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) - try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) - try container.encodeIfPresent(bindCn, forKey: .bindCn) - try container.encodeIfPresent(bindPassword, forKey: .bindPassword) - try container.encodeIfPresent(startTls, forKey: .startTls) - try container.encodeIfPresent(sni, forKey: .sni) - try container.encodeIfPresent(baseDn, forKey: .baseDn) - try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) - try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) - try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) - try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) - try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) - try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) - try container.encodeIfPresent(syncUsers, forKey: .syncUsers) - try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) - try container.encodeIfPresent(syncGroups, forKey: .syncGroups) - try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedLicenseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedLicenseRequest.swift deleted file mode 100644 index 5d56b53..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedLicenseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PatchedLicenseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** License Serializer */ -public struct PatchedLicenseRequest: Codable, JSONEncodable, Hashable { - - public var key: String? - - public init(key: String? = nil) { - self.key = key - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case key - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(key, forKey: .key) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRequest.swift deleted file mode 100644 index 679a0c2..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedNotificationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Notification Serializer */ -public struct PatchedNotificationRequest: Codable, JSONEncodable, Hashable { - - public var event: EventRequest? - public var seen: Bool? - - public init(event: EventRequest? = nil, seen: Bool? = nil) { - self.event = event - self.seen = seen - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case event - case seen - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(event, forKey: .event) - try container.encodeIfPresent(seen, forKey: .seen) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRuleRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRuleRequest.swift deleted file mode 100644 index cea1de6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationRuleRequest.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// PatchedNotificationRuleRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationRule Serializer */ -public struct PatchedNotificationRuleRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. */ - public var transports: [UUID]? - /** Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert */ - public var severity: SeverityEnum? - /** Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. */ - public var group: UUID? - - public init(name: String? = nil, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil) { - self.name = name - self.transports = transports - self.severity = severity - self.group = group - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case transports - case severity - case group - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(transports, forKey: .transports) - try container.encodeIfPresent(severity, forKey: .severity) - try container.encodeIfPresent(group, forKey: .group) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationTransportRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationTransportRequest.swift deleted file mode 100644 index 99738a5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationTransportRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// PatchedNotificationTransportRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationTransport Serializer */ -public struct PatchedNotificationTransportRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var mode: NotificationTransportModeEnum? - public var webhookUrl: String? - public var webhookMapping: UUID? - /** Only send notification once, for example when sending a webhook into a chat channel. */ - public var sendOnce: Bool? - - public init(name: String? = nil, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { - self.name = name - self.mode = mode - self.webhookUrl = webhookUrl - self.webhookMapping = webhookMapping - self.sendOnce = sendOnce - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case mode - case webhookUrl = "webhook_url" - case webhookMapping = "webhook_mapping" - case sendOnce = "send_once" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) - try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) - try container.encodeIfPresent(sendOnce, forKey: .sendOnce) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationWebhookMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationWebhookMappingRequest.swift deleted file mode 100644 index 8748cc0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedNotificationWebhookMappingRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedNotificationWebhookMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** NotificationWebhookMapping Serializer */ -public struct PatchedNotificationWebhookMappingRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var expression: String? - - public init(name: String? = nil, expression: String? = nil) { - self.name = name - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedOAuth2ProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedOAuth2ProviderRequest.swift deleted file mode 100644 index 262bc01..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedOAuth2ProviderRequest.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// PatchedOAuth2ProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth2Provider Serializer */ -public struct PatchedOAuth2ProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID? - public var propertyMappings: [UUID]? - /** Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public */ - public var clientType: ClientTypeEnum? - public var clientId: String? - public var clientSecret: String? - /** Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessCodeValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - /** Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. */ - public var includeClaimsInIdToken: Bool? - /** Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. */ - public var signingKey: UUID? - /** Enter each URI on a new line. */ - public var redirectUris: String? - /** Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. */ - public var subMode: SubModeEnum? - /** Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. */ - public var issuerMode: IssuerModeEnum? - public var jwksSources: [UUID]? - - public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.clientType = clientType - self.clientId = clientId - self.clientSecret = clientSecret - self.accessCodeValidity = accessCodeValidity - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - self.includeClaimsInIdToken = includeClaimsInIdToken - self.signingKey = signingKey - self.redirectUris = redirectUris - self.subMode = subMode - self.issuerMode = issuerMode - self.jwksSources = jwksSources - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case clientType = "client_type" - case clientId = "client_id" - case clientSecret = "client_secret" - case accessCodeValidity = "access_code_validity" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - case includeClaimsInIdToken = "include_claims_in_id_token" - case signingKey = "signing_key" - case redirectUris = "redirect_uris" - case subMode = "sub_mode" - case issuerMode = "issuer_mode" - case jwksSources = "jwks_sources" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(clientType, forKey: .clientType) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(clientSecret, forKey: .clientSecret) - try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) - try container.encodeIfPresent(signingKey, forKey: .signingKey) - try container.encodeIfPresent(redirectUris, forKey: .redirectUris) - try container.encodeIfPresent(subMode, forKey: .subMode) - try container.encodeIfPresent(issuerMode, forKey: .issuerMode) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedOAuthSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedOAuthSourceRequest.swift deleted file mode 100644 index a1e8403..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedOAuthSourceRequest.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// PatchedOAuthSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct PatchedOAuthSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String? - /** Internal source name, used in URLs. */ - public var slug: String? - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - public var providerType: ProviderTypeEnum? - /** URL used to request the initial token. This URL is only required for OAuth 1. */ - public var requestTokenUrl: String? - /** URL the user is redirect to to conest the flow. */ - public var authorizationUrl: String? - /** URL used by authentik to retrieve tokens. */ - public var accessTokenUrl: String? - /** URL used by authentik to get user information. */ - public var profileUrl: String? - public var consumerKey: String? - public var consumerSecret: String? - public var additionalScopes: String? - public var oidcWellKnownUrl: String? - public var oidcJwksUrl: String? - public var oidcJwks: [String: AnyCodable]? - - public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, providerType: ProviderTypeEnum? = nil, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String? = nil, consumerSecret: String? = nil, additionalScopes: String? = nil, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.providerType = providerType - self.requestTokenUrl = requestTokenUrl - self.authorizationUrl = authorizationUrl - self.accessTokenUrl = accessTokenUrl - self.profileUrl = profileUrl - self.consumerKey = consumerKey - self.consumerSecret = consumerSecret - self.additionalScopes = additionalScopes - self.oidcWellKnownUrl = oidcWellKnownUrl - self.oidcJwksUrl = oidcJwksUrl - self.oidcJwks = oidcJwks - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case providerType = "provider_type" - case requestTokenUrl = "request_token_url" - case authorizationUrl = "authorization_url" - case accessTokenUrl = "access_token_url" - case profileUrl = "profile_url" - case consumerKey = "consumer_key" - case consumerSecret = "consumer_secret" - case additionalScopes = "additional_scopes" - case oidcWellKnownUrl = "oidc_well_known_url" - case oidcJwksUrl = "oidc_jwks_url" - case oidcJwks = "oidc_jwks" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encodeIfPresent(providerType, forKey: .providerType) - try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) - try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) - try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) - try container.encodeIfPresent(profileUrl, forKey: .profileUrl) - try container.encodeIfPresent(consumerKey, forKey: .consumerKey) - try container.encodeIfPresent(consumerSecret, forKey: .consumerSecret) - try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) - try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) - try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) - try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedOutpostRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedOutpostRequest.swift deleted file mode 100644 index 0610cc6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedOutpostRequest.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// PatchedOutpostRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Outpost Serializer */ -public struct PatchedOutpostRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var type: OutpostTypeEnum? - public var providers: [Int]? - /** Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. */ - public var serviceConnection: UUID? - public var config: [String: AnyCodable]? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - - public init(name: String? = nil, type: OutpostTypeEnum? = nil, providers: [Int]? = nil, serviceConnection: UUID? = nil, config: [String: AnyCodable]? = nil, managed: String? = nil) { - self.name = name - self.type = type - self.providers = providers - self.serviceConnection = serviceConnection - self.config = config - self.managed = managed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case type - case providers - case serviceConnection = "service_connection" - case config - case managed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(type, forKey: .type) - try container.encodeIfPresent(providers, forKey: .providers) - try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) - try container.encodeIfPresent(config, forKey: .config) - try container.encodeIfPresent(managed, forKey: .managed) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordExpiryPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordExpiryPolicyRequest.swift deleted file mode 100644 index 65fe98a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordExpiryPolicyRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// PatchedPasswordExpiryPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Expiry Policy Serializer */ -public struct PatchedPasswordExpiryPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var days: Int? - public var denyOnly: Bool? - - public init(name: String? = nil, executionLogging: Bool? = nil, days: Int? = nil, denyOnly: Bool? = nil) { - self.name = name - self.executionLogging = executionLogging - self.days = days - self.denyOnly = denyOnly - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case days - case denyOnly = "deny_only" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(days, forKey: .days) - try container.encodeIfPresent(denyOnly, forKey: .denyOnly) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordPolicyRequest.swift deleted file mode 100644 index 95ad2d0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordPolicyRequest.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// PatchedPasswordPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Password Policy Serializer */ -public struct PatchedPasswordPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Field key to check, field keys defined in Prompt stages are available. */ - public var passwordField: String? - public var amountDigits: Int? - public var amountUppercase: Int? - public var amountLowercase: Int? - public var amountSymbols: Int? - public var lengthMin: Int? - public var symbolCharset: String? - public var errorMessage: String? - public var checkStaticRules: Bool? - public var checkHaveIBeenPwned: Bool? - public var checkZxcvbn: Bool? - /** How many times the password hash is allowed to be on haveibeenpwned */ - public var hibpAllowedCount: Int? - /** If the zxcvbn score is equal or less than this value, the policy will fail. */ - public var zxcvbnScoreThreshold: Int? - - public init(name: String? = nil, executionLogging: Bool? = nil, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.passwordField = passwordField - self.amountDigits = amountDigits - self.amountUppercase = amountUppercase - self.amountLowercase = amountLowercase - self.amountSymbols = amountSymbols - self.lengthMin = lengthMin - self.symbolCharset = symbolCharset - self.errorMessage = errorMessage - self.checkStaticRules = checkStaticRules - self.checkHaveIBeenPwned = checkHaveIBeenPwned - self.checkZxcvbn = checkZxcvbn - self.hibpAllowedCount = hibpAllowedCount - self.zxcvbnScoreThreshold = zxcvbnScoreThreshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case passwordField = "password_field" - case amountDigits = "amount_digits" - case amountUppercase = "amount_uppercase" - case amountLowercase = "amount_lowercase" - case amountSymbols = "amount_symbols" - case lengthMin = "length_min" - case symbolCharset = "symbol_charset" - case errorMessage = "error_message" - case checkStaticRules = "check_static_rules" - case checkHaveIBeenPwned = "check_have_i_been_pwned" - case checkZxcvbn = "check_zxcvbn" - case hibpAllowedCount = "hibp_allowed_count" - case zxcvbnScoreThreshold = "zxcvbn_score_threshold" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(passwordField, forKey: .passwordField) - try container.encodeIfPresent(amountDigits, forKey: .amountDigits) - try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) - try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) - try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) - try container.encodeIfPresent(lengthMin, forKey: .lengthMin) - try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) - try container.encodeIfPresent(errorMessage, forKey: .errorMessage) - try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) - try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) - try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) - try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) - try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordStageRequest.swift deleted file mode 100644 index f7cc00c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPasswordStageRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// PatchedPasswordStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PasswordStage Serializer */ -public struct PatchedPasswordStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Selection of backends to test the password against. */ - public var backends: [BackendsEnum]? - /** Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. */ - public var configureFlow: UUID? - /** How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. */ - public var failedAttemptsBeforeCancel: Int? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, backends: [BackendsEnum]? = nil, configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { - self.name = name - self.flowSet = flowSet - self.backends = backends - self.configureFlow = configureFlow - self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case backends - case configureFlow = "configure_flow" - case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(backends, forKey: .backends) - try container.encodeIfPresent(configureFlow, forKey: .configureFlow) - try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPermissionAssignRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPermissionAssignRequest.swift deleted file mode 100644 index 0521179..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPermissionAssignRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PatchedPermissionAssignRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Request to assign a new permission */ -public struct PatchedPermissionAssignRequest: Codable, JSONEncodable, Hashable { - - public var permissions: [String]? - public var model: ModelEnum? - public var objectPk: String? - - public init(permissions: [String]? = nil, model: ModelEnum? = nil, objectPk: String? = nil) { - self.permissions = permissions - self.model = model - self.objectPk = objectPk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case permissions - case model - case objectPk = "object_pk" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(permissions, forKey: .permissions) - try container.encodeIfPresent(model, forKey: .model) - try container.encodeIfPresent(objectPk, forKey: .objectPk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceConnectionRequest.swift deleted file mode 100644 index 960a799..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceConnectionRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedPlexSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source connection Serializer */ -public struct PatchedPlexSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var identifier: String? - public var plexToken: String? - - public init(identifier: String? = nil, plexToken: String? = nil) { - self.identifier = identifier - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case identifier - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(identifier, forKey: .identifier) - try container.encodeIfPresent(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceRequest.swift deleted file mode 100644 index ee30680..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPlexSourceRequest.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// PatchedPlexSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source Serializer */ -public struct PatchedPlexSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String? - /** Internal source name, used in URLs. */ - public var slug: String? - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - /** Client identifier used to talk to Plex. */ - public var clientId: String? - /** Which servers a user has to be a member of to be granted access. Empty list allows every server. */ - public var allowedServers: [String]? - /** Allow friends to authenticate, even if you don't share a server. */ - public var allowFriends: Bool? - /** Plex token used to check friends */ - public var plexToken: String? - - public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.clientId = clientId - self.allowedServers = allowedServers - self.allowFriends = allowFriends - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case clientId = "client_id" - case allowedServers = "allowed_servers" - case allowFriends = "allow_friends" - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(allowedServers, forKey: .allowedServers) - try container.encodeIfPresent(allowFriends, forKey: .allowFriends) - try container.encodeIfPresent(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPolicyBindingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPolicyBindingRequest.swift deleted file mode 100644 index 5369e6c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPolicyBindingRequest.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// PatchedPolicyBindingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PolicyBinding Serializer */ -public struct PatchedPolicyBindingRequest: Codable, JSONEncodable, Hashable { - - public var policy: UUID? - public var group: UUID? - public var user: Int? - public var target: UUID? - /** Negates the outcome of the policy. Messages are unaffected. */ - public var negate: Bool? - public var enabled: Bool? - public var order: Int? - /** Timeout after which Policy execution is terminated. */ - public var timeout: Int? - /** Result if the Policy execution fails. */ - public var failureResult: Bool? - - public init(policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, target: UUID? = nil, negate: Bool? = nil, enabled: Bool? = nil, order: Int? = nil, timeout: Int? = nil, failureResult: Bool? = nil) { - self.policy = policy - self.group = group - self.user = user - self.target = target - self.negate = negate - self.enabled = enabled - self.order = order - self.timeout = timeout - self.failureResult = failureResult - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case policy - case group - case user - case target - case negate - case enabled - case order - case timeout - case failureResult = "failure_result" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(policy, forKey: .policy) - try container.encodeIfPresent(group, forKey: .group) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(target, forKey: .target) - try container.encodeIfPresent(negate, forKey: .negate) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(order, forKey: .order) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(failureResult, forKey: .failureResult) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPromptRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPromptRequest.swift deleted file mode 100644 index 66cbe3b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPromptRequest.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// PatchedPromptRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Prompt Serializer */ -public struct PatchedPromptRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Name of the form field, also used to store the value */ - public var fieldKey: String? - public var label: String? - public var type: PromptTypeEnum? - public var _required: Bool? - /** Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. */ - public var placeholder: String? - /** Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. */ - public var initialValue: String? - public var order: Int? - public var promptstageSet: [StageRequest]? - public var subText: String? - public var placeholderExpression: Bool? - public var initialValueExpression: Bool? - - public init(name: String? = nil, fieldKey: String? = nil, label: String? = nil, type: PromptTypeEnum? = nil, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [StageRequest]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { - self.name = name - self.fieldKey = fieldKey - self.label = label - self.type = type - self._required = _required - self.placeholder = placeholder - self.initialValue = initialValue - self.order = order - self.promptstageSet = promptstageSet - self.subText = subText - self.placeholderExpression = placeholderExpression - self.initialValueExpression = initialValueExpression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case fieldKey = "field_key" - case label - case type - case _required = "required" - case placeholder - case initialValue = "initial_value" - case order - case promptstageSet = "promptstage_set" - case subText = "sub_text" - case placeholderExpression = "placeholder_expression" - case initialValueExpression = "initial_value_expression" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(fieldKey, forKey: .fieldKey) - try container.encodeIfPresent(label, forKey: .label) - try container.encodeIfPresent(type, forKey: .type) - try container.encodeIfPresent(_required, forKey: ._required) - try container.encodeIfPresent(placeholder, forKey: .placeholder) - try container.encodeIfPresent(initialValue, forKey: .initialValue) - try container.encodeIfPresent(order, forKey: .order) - try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) - try container.encodeIfPresent(subText, forKey: .subText) - try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) - try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedPromptStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedPromptStageRequest.swift deleted file mode 100644 index d7a49ab..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedPromptStageRequest.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// PatchedPromptStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PromptStage Serializer */ -public struct PatchedPromptStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var fields: [UUID]? - public var validationPolicies: [UUID]? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, fields: [UUID]? = nil, validationPolicies: [UUID]? = nil) { - self.name = name - self.flowSet = flowSet - self.fields = fields - self.validationPolicies = validationPolicies - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case fields - case validationPolicies = "validation_policies" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(fields, forKey: .fields) - try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedProxyProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedProxyProviderRequest.swift deleted file mode 100644 index 07cd2ce..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedProxyProviderRequest.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// PatchedProxyProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ProxyProvider Serializer */ -public struct PatchedProxyProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID? - public var propertyMappings: [UUID]? - public var internalHost: String? - public var externalHost: String? - /** Validate SSL Certificates of upstream servers */ - public var internalHostSslValidation: Bool? - public var certificate: UUID? - /** Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. */ - public var skipPathRegex: String? - /** Set a custom HTTP-Basic Authentication header based on values from authentik. */ - public var basicAuthEnabled: Bool? - /** User/Group Attribute used for the password part of the HTTP-Basic Header. */ - public var basicAuthPasswordAttribute: String? - /** User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. */ - public var basicAuthUserAttribute: String? - /** Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain */ - public var mode: ProxyMode? - /** When enabled, this provider will intercept the authorization header and authenticate requests based on its value. */ - public var interceptHeaderAuth: Bool? - public var cookieDomain: String? - public var jwksSources: [UUID]? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - - public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, internalHost: String? = nil, externalHost: String? = nil, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.internalHost = internalHost - self.externalHost = externalHost - self.internalHostSslValidation = internalHostSslValidation - self.certificate = certificate - self.skipPathRegex = skipPathRegex - self.basicAuthEnabled = basicAuthEnabled - self.basicAuthPasswordAttribute = basicAuthPasswordAttribute - self.basicAuthUserAttribute = basicAuthUserAttribute - self.mode = mode - self.interceptHeaderAuth = interceptHeaderAuth - self.cookieDomain = cookieDomain - self.jwksSources = jwksSources - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case internalHost = "internal_host" - case externalHost = "external_host" - case internalHostSslValidation = "internal_host_ssl_validation" - case certificate - case skipPathRegex = "skip_path_regex" - case basicAuthEnabled = "basic_auth_enabled" - case basicAuthPasswordAttribute = "basic_auth_password_attribute" - case basicAuthUserAttribute = "basic_auth_user_attribute" - case mode - case interceptHeaderAuth = "intercept_header_auth" - case cookieDomain = "cookie_domain" - case jwksSources = "jwks_sources" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(internalHost, forKey: .internalHost) - try container.encodeIfPresent(externalHost, forKey: .externalHost) - try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) - try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) - try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) - try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) - try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedRadiusProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedRadiusProviderRequest.swift deleted file mode 100644 index d78481b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedRadiusProviderRequest.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// PatchedRadiusProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** RadiusProvider Serializer */ -public struct PatchedRadiusProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID? - public var propertyMappings: [UUID]? - /** List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. */ - public var clientNetworks: String? - /** Shared secret between clients and server to hash packets. */ - public var sharedSecret: String? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.clientNetworks = clientNetworks - self.sharedSecret = sharedSecret - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case clientNetworks = "client_networks" - case sharedSecret = "shared_secret" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) - try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedReputationPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedReputationPolicyRequest.swift deleted file mode 100644 index 7be45ea..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedReputationPolicyRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// PatchedReputationPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Reputation Policy Serializer */ -public struct PatchedReputationPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var checkIp: Bool? - public var checkUsername: Bool? - public var threshold: Int? - - public init(name: String? = nil, executionLogging: Bool? = nil, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.checkIp = checkIp - self.checkUsername = checkUsername - self.threshold = threshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case checkIp = "check_ip" - case checkUsername = "check_username" - case threshold - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(checkIp, forKey: .checkIp) - try container.encodeIfPresent(checkUsername, forKey: .checkUsername) - try container.encodeIfPresent(threshold, forKey: .threshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedRoleRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedRoleRequest.swift deleted file mode 100644 index 96bc89d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedRoleRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PatchedRoleRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Role serializer */ -public struct PatchedRoleRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLPropertyMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLPropertyMappingRequest.swift deleted file mode 100644 index d317da3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLPropertyMappingRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// PatchedSAMLPropertyMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLPropertyMapping Serializer */ -public struct PatchedSAMLPropertyMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String? - public var expression: String? - public var samlName: String? - public var friendlyName: String? - - public init(managed: String? = nil, name: String? = nil, expression: String? = nil, samlName: String? = nil, friendlyName: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - self.samlName = samlName - self.friendlyName = friendlyName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case samlName = "saml_name" - case friendlyName = "friendly_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expression, forKey: .expression) - try container.encodeIfPresent(samlName, forKey: .samlName) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLProviderRequest.swift deleted file mode 100644 index c769e15..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLProviderRequest.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// PatchedSAMLProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLProvider Serializer */ -public struct PatchedSAMLProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID? - public var propertyMappings: [UUID]? - public var acsUrl: String? - /** Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. */ - public var audience: String? - /** Also known as EntityID */ - public var issuer: String? - /** Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). */ - public var assertionValidNotBefore: String? - /** Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var assertionValidNotOnOrAfter: String? - /** Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var sessionValidNotOnOrAfter: String? - /** Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered */ - public var nameIdMapping: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Keypair used to sign outgoing Responses going to the Service Provider. */ - public var signingKp: UUID? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post */ - public var spBinding: SpBindingEnum? - /** Default relay_state value for IDP-initiated logins */ - public var defaultRelayState: String? - - public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, acsUrl: String? = nil, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.acsUrl = acsUrl - self.audience = audience - self.issuer = issuer - self.assertionValidNotBefore = assertionValidNotBefore - self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter - self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter - self.nameIdMapping = nameIdMapping - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.signingKp = signingKp - self.verificationKp = verificationKp - self.spBinding = spBinding - self.defaultRelayState = defaultRelayState - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case acsUrl = "acs_url" - case audience - case issuer - case assertionValidNotBefore = "assertion_valid_not_before" - case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" - case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" - case nameIdMapping = "name_id_mapping" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case signingKp = "signing_kp" - case verificationKp = "verification_kp" - case spBinding = "sp_binding" - case defaultRelayState = "default_relay_state" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(acsUrl, forKey: .acsUrl) - try container.encodeIfPresent(audience, forKey: .audience) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) - try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) - try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) - try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(spBinding, forKey: .spBinding) - try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLSourceRequest.swift deleted file mode 100644 index d1d49ea..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSAMLSourceRequest.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// PatchedSAMLSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLSource Serializer */ -public struct PatchedSAMLSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String? - /** Internal source name, used in URLs. */ - public var slug: String? - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - /** Flow used before authentication. */ - public var preAuthenticationFlow: UUID? - /** Also known as Entity ID. Defaults the Metadata URL. */ - public var issuer: String? - /** URL that the initial Login request is sent to. */ - public var ssoUrl: String? - /** Optional URL if your IDP supports Single-Logout. */ - public var sloUrl: String? - /** Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. */ - public var allowIdpInitiated: Bool? - /** NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient */ - public var nameIdPolicy: NameIdPolicyEnum? - public var bindingType: BindingTypeEnum? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** Keypair used to sign outgoing Responses going to the Identity Provider. */ - public var signingKp: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). */ - public var temporaryUserDeleteAfter: String? - - public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, preAuthenticationFlow: UUID? = nil, issuer: String? = nil, ssoUrl: String? = nil, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.preAuthenticationFlow = preAuthenticationFlow - self.issuer = issuer - self.ssoUrl = ssoUrl - self.sloUrl = sloUrl - self.allowIdpInitiated = allowIdpInitiated - self.nameIdPolicy = nameIdPolicy - self.bindingType = bindingType - self.verificationKp = verificationKp - self.signingKp = signingKp - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.temporaryUserDeleteAfter = temporaryUserDeleteAfter - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case preAuthenticationFlow = "pre_authentication_flow" - case issuer - case ssoUrl = "sso_url" - case sloUrl = "slo_url" - case allowIdpInitiated = "allow_idp_initiated" - case nameIdPolicy = "name_id_policy" - case bindingType = "binding_type" - case verificationKp = "verification_kp" - case signingKp = "signing_kp" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case temporaryUserDeleteAfter = "temporary_user_delete_after" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encodeIfPresent(preAuthenticationFlow, forKey: .preAuthenticationFlow) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encodeIfPresent(ssoUrl, forKey: .ssoUrl) - try container.encodeIfPresent(sloUrl, forKey: .sloUrl) - try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) - try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) - try container.encodeIfPresent(bindingType, forKey: .bindingType) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMMappingRequest.swift deleted file mode 100644 index 1a15d1e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMMappingRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// PatchedSCIMMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMMapping Serializer */ -public struct PatchedSCIMMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String? - public var expression: String? - - public init(managed: String? = nil, name: String? = nil, expression: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMProviderRequest.swift deleted file mode 100644 index 0171913..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSCIMProviderRequest.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// PatchedSCIMProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMProvider Serializer */ -public struct PatchedSCIMProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - /** Base URL to SCIM requests, usually ends in /v2 */ - public var url: String? - /** Authentication token */ - public var token: String? - public var excludeUsersServiceAccount: Bool? - public var filterGroup: UUID? - - public init(name: String? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, url: String? = nil, token: String? = nil, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { - self.name = name - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - self.url = url - self.token = token - self.excludeUsersServiceAccount = excludeUsersServiceAccount - self.filterGroup = filterGroup - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - case url - case token - case excludeUsersServiceAccount = "exclude_users_service_account" - case filterGroup = "filter_group" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - try container.encodeIfPresent(url, forKey: .url) - try container.encodeIfPresent(token, forKey: .token) - try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) - try container.encodeIfPresent(filterGroup, forKey: .filterGroup) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedSMSDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedSMSDeviceRequest.swift deleted file mode 100644 index 7cb22bc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedSMSDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// PatchedSMSDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for sms authenticator devices */ -public struct PatchedSMSDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedScopeMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedScopeMappingRequest.swift deleted file mode 100644 index e936264..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedScopeMappingRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// PatchedScopeMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ScopeMapping Serializer */ -public struct PatchedScopeMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String? - public var expression: String? - /** Scope name requested by the client */ - public var scopeName: String? - /** Description shown to the user when consenting. If left empty, the user won't be informed. */ - public var description: String? - - public init(managed: String? = nil, name: String? = nil, expression: String? = nil, scopeName: String? = nil, description: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - self.scopeName = scopeName - self.description = description - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case scopeName = "scope_name" - case description - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(expression, forKey: .expression) - try container.encodeIfPresent(scopeName, forKey: .scopeName) - try container.encodeIfPresent(description, forKey: .description) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedStaticDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedStaticDeviceRequest.swift deleted file mode 100644 index 6e07a77..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedStaticDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// PatchedStaticDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for static authenticator devices */ -public struct PatchedStaticDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedTOTPDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedTOTPDeviceRequest.swift deleted file mode 100644 index f9c0f4a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedTOTPDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// PatchedTOTPDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for totp authenticator devices */ -public struct PatchedTOTPDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedTenantRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedTenantRequest.swift deleted file mode 100644 index c387b9e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedTenantRequest.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// PatchedTenantRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Tenant Serializer */ -public struct PatchedTenantRequest: Codable, JSONEncodable, Hashable { - - /** Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` */ - public var domain: String? - public var _default: Bool? - public var brandingTitle: String? - public var brandingLogo: String? - public var brandingFavicon: String? - public var flowAuthentication: UUID? - public var flowInvalidation: UUID? - public var flowRecovery: UUID? - public var flowUnenrollment: UUID? - public var flowUserSettings: UUID? - public var flowDeviceCode: UUID? - /** Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). */ - public var eventRetention: String? - /** Web Certificate used by the authentik Core webserver. */ - public var webCertificate: UUID? - public var attributes: [String: AnyCodable]? - - public init(domain: String? = nil, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { - self.domain = domain - self._default = _default - self.brandingTitle = brandingTitle - self.brandingLogo = brandingLogo - self.brandingFavicon = brandingFavicon - self.flowAuthentication = flowAuthentication - self.flowInvalidation = flowInvalidation - self.flowRecovery = flowRecovery - self.flowUnenrollment = flowUnenrollment - self.flowUserSettings = flowUserSettings - self.flowDeviceCode = flowDeviceCode - self.eventRetention = eventRetention - self.webCertificate = webCertificate - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case domain - case _default = "default" - case brandingTitle = "branding_title" - case brandingLogo = "branding_logo" - case brandingFavicon = "branding_favicon" - case flowAuthentication = "flow_authentication" - case flowInvalidation = "flow_invalidation" - case flowRecovery = "flow_recovery" - case flowUnenrollment = "flow_unenrollment" - case flowUserSettings = "flow_user_settings" - case flowDeviceCode = "flow_device_code" - case eventRetention = "event_retention" - case webCertificate = "web_certificate" - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(domain, forKey: .domain) - try container.encodeIfPresent(_default, forKey: ._default) - try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) - try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) - try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) - try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) - try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) - try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) - try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) - try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) - try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) - try container.encodeIfPresent(eventRetention, forKey: .eventRetention) - try container.encodeIfPresent(webCertificate, forKey: .webCertificate) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedTokenRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedTokenRequest.swift deleted file mode 100644 index 19ad422..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedTokenRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// PatchedTokenRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Token Serializer */ -public struct PatchedTokenRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var identifier: String? - public var intent: IntentEnum? - public var user: Int? - public var description: String? - public var expires: Date? - public var expiring: Bool? - - public init(managed: String? = nil, identifier: String? = nil, intent: IntentEnum? = nil, user: Int? = nil, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { - self.managed = managed - self.identifier = identifier - self.intent = intent - self.user = user - self.description = description - self.expires = expires - self.expiring = expiring - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case identifier - case intent - case user - case description - case expires - case expiring - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encodeIfPresent(identifier, forKey: .identifier) - try container.encodeIfPresent(intent, forKey: .intent) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(description, forKey: .description) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(expiring, forKey: .expiring) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserDeleteStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserDeleteStageRequest.swift deleted file mode 100644 index e425642..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserDeleteStageRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedUserDeleteStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserDeleteStage Serializer */ -public struct PatchedUserDeleteStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil) { - self.name = name - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserLoginStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserLoginStageRequest.swift deleted file mode 100644 index 0ad1f33..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserLoginStageRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// PatchedUserLoginStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLoginStage Serializer */ -public struct PatchedUserLoginStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - /** Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var sessionDuration: String? - /** Terminate all other sessions of the user logging in. */ - public var terminateOtherSessions: Bool? - /** Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var rememberMeOffset: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { - self.name = name - self.flowSet = flowSet - self.sessionDuration = sessionDuration - self.terminateOtherSessions = terminateOtherSessions - self.rememberMeOffset = rememberMeOffset - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case sessionDuration = "session_duration" - case terminateOtherSessions = "terminate_other_sessions" - case rememberMeOffset = "remember_me_offset" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) - try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) - try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserLogoutStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserLogoutStageRequest.swift deleted file mode 100644 index 2c88d24..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserLogoutStageRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedUserLogoutStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLogoutStage Serializer */ -public struct PatchedUserLogoutStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil) { - self.name = name - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserOAuthSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserOAuthSourceConnectionRequest.swift deleted file mode 100644 index 7ddf7f6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserOAuthSourceConnectionRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PatchedUserOAuthSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct PatchedUserOAuthSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var user: Int? - public var identifier: String? - public var accessToken: String? - - public init(user: Int? = nil, identifier: String? = nil, accessToken: String? = nil) { - self.user = user - self.identifier = identifier - self.accessToken = accessToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case identifier - case accessToken = "access_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(identifier, forKey: .identifier) - try container.encodeIfPresent(accessToken, forKey: .accessToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserRequest.swift deleted file mode 100644 index 820a651..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserRequest.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// PatchedUserRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User Serializer */ -public struct PatchedUserRequest: Codable, JSONEncodable, Hashable { - - public var username: String? - /** User's display name. */ - public var name: String? - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var groups: [UUID]? - public var email: String? - public var attributes: [String: AnyCodable]? - public var path: String? - public var type: UserTypeEnum? - - public init(username: String? = nil, name: String? = nil, isActive: Bool? = nil, lastLogin: Date? = nil, groups: [UUID]? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, path: String? = nil, type: UserTypeEnum? = nil) { - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.groups = groups - self.email = email - self.attributes = attributes - self.path = path - self.type = type - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case groups - case email - case attributes - case path - case type - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(username, forKey: .username) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encodeIfPresent(groups, forKey: .groups) - try container.encodeIfPresent(email, forKey: .email) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(type, forKey: .type) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserSAMLSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserSAMLSourceConnectionRequest.swift deleted file mode 100644 index d716e66..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserSAMLSourceConnectionRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PatchedUserSAMLSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAML Source Serializer */ -public struct PatchedUserSAMLSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var user: Int? - public var identifier: String? - - public init(user: Int? = nil, identifier: String? = nil) { - self.user = user - self.identifier = identifier - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case identifier - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(identifier, forKey: .identifier) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedUserWriteStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedUserWriteStageRequest.swift deleted file mode 100644 index 1ca095d..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedUserWriteStageRequest.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// PatchedUserWriteStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserWriteStage Serializer */ -public struct PatchedUserWriteStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - public var flowSet: [FlowSetRequest]? - public var userCreationMode: UserCreationModeEnum? - /** When set, newly created users are inactive and cannot login. */ - public var createUsersAsInactive: Bool? - /** Optionally add newly created users to this group. */ - public var createUsersGroup: UUID? - public var userType: UserTypeEnum? - public var userPathTemplate: String? - - public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { - self.name = name - self.flowSet = flowSet - self.userCreationMode = userCreationMode - self.createUsersAsInactive = createUsersAsInactive - self.createUsersGroup = createUsersGroup - self.userType = userType - self.userPathTemplate = userPathTemplate - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case userCreationMode = "user_creation_mode" - case createUsersAsInactive = "create_users_as_inactive" - case createUsersGroup = "create_users_group" - case userType = "user_type" - case userPathTemplate = "user_path_template" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) - try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) - try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) - try container.encodeIfPresent(userType, forKey: .userType) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PatchedWebAuthnDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PatchedWebAuthnDeviceRequest.swift deleted file mode 100644 index 795e860..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PatchedWebAuthnDeviceRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PatchedWebAuthnDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for WebAuthn authenticator devices */ -public struct PatchedWebAuthnDeviceRequest: Codable, JSONEncodable, Hashable { - - public var name: String? - - public init(name: String? = nil) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Permission.swift b/authentikClient/Classes/OpenAPIs/Models/Permission.swift deleted file mode 100644 index 332e6ea..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Permission.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// Permission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Global permission */ -public struct Permission: Codable, JSONEncodable, Hashable { - - public var id: Int - public var name: String - public var codename: String - public var model: String - public var appLabel: String - /** Human-readable app label */ - public var appLabelVerbose: String - /** Human-readable model name */ - public var modelVerbose: String - - public init(id: Int, name: String, codename: String, model: String, appLabel: String, appLabelVerbose: String, modelVerbose: String) { - self.id = id - self.name = name - self.codename = codename - self.model = model - self.appLabel = appLabel - self.appLabelVerbose = appLabelVerbose - self.modelVerbose = modelVerbose - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case id - case name - case codename - case model - case appLabel = "app_label" - case appLabelVerbose = "app_label_verbose" - case modelVerbose = "model_verbose" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(name, forKey: .name) - try container.encode(codename, forKey: .codename) - try container.encode(model, forKey: .model) - try container.encode(appLabel, forKey: .appLabel) - try container.encode(appLabelVerbose, forKey: .appLabelVerbose) - try container.encode(modelVerbose, forKey: .modelVerbose) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PermissionAssignRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PermissionAssignRequest.swift deleted file mode 100644 index ac5db13..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PermissionAssignRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PermissionAssignRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Request to assign a new permission */ -public struct PermissionAssignRequest: Codable, JSONEncodable, Hashable { - - public var permissions: [String] - public var model: ModelEnum? - public var objectPk: String? - - public init(permissions: [String], model: ModelEnum? = nil, objectPk: String? = nil) { - self.permissions = permissions - self.model = model - self.objectPk = objectPk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case permissions - case model - case objectPk = "object_pk" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(permissions, forKey: .permissions) - try container.encodeIfPresent(model, forKey: .model) - try container.encodeIfPresent(objectPk, forKey: .objectPk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallenge.swift deleted file mode 100644 index 0cea96f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallenge.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// PlexAuthenticationChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge shown to the user in identification stage */ -public struct PlexAuthenticationChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-source-plex" - public var responseErrors: [String: [ErrorDetail]]? - public var clientId: String - public var slug: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-source-plex", responseErrors: [String: [ErrorDetail]]? = nil, clientId: String, slug: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.clientId = clientId - self.slug = slug - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case clientId = "client_id" - case slug - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(clientId, forKey: .clientId) - try container.encode(slug, forKey: .slug) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallengeResponseRequest.swift deleted file mode 100644 index 4561b96..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexAuthenticationChallengeResponseRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PlexAuthenticationChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Pseudo class for plex response */ -public struct PlexAuthenticationChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-source-plex" - - public init(component: String? = "ak-source-plex") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexSource.swift b/authentikClient/Classes/OpenAPIs/Models/PlexSource.swift deleted file mode 100644 index 10d2b49..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexSource.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// PlexSource.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source Serializer */ -public struct PlexSource: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var userPathTemplate: String? - /** Get the URL to the Icon. If the name is /static or starts with http it is returned as-is */ - public var icon: String? - /** Client identifier used to talk to Plex. */ - public var clientId: String? - /** Which servers a user has to be a member of to be granted access. Empty list allows every server. */ - public var allowedServers: [String]? - /** Allow friends to authenticate, even if you don't share a server. */ - public var allowFriends: Bool? - /** Plex token used to check friends */ - public var plexToken: String - - public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String) { - self.pk = pk - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.managed = managed - self.userPathTemplate = userPathTemplate - self.icon = icon - self.clientId = clientId - self.allowedServers = allowedServers - self.allowFriends = allowFriends - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case managed - case userPathTemplate = "user_path_template" - case icon - case clientId = "client_id" - case allowedServers = "allowed_servers" - case allowFriends = "allow_friends" - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encode(managed, forKey: .managed) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(icon, forKey: .icon) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(allowedServers, forKey: .allowedServers) - try container.encodeIfPresent(allowFriends, forKey: .allowFriends) - try container.encode(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnection.swift deleted file mode 100644 index 153e20f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnection.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// PlexSourceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source connection Serializer */ -public struct PlexSourceConnection: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var user: Int - public var source: Source - public var identifier: String - public var plexToken: String - - public init(pk: Int, user: Int, source: Source, identifier: String, plexToken: String) { - self.pk = pk - self.user = user - self.source = source - self.identifier = identifier - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case user - case source - case identifier - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(user, forKey: .user) - try container.encode(source, forKey: .source) - try container.encode(identifier, forKey: .identifier) - try container.encode(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnectionRequest.swift deleted file mode 100644 index 9842194..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexSourceConnectionRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PlexSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source connection Serializer */ -public struct PlexSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var identifier: String - public var plexToken: String - - public init(identifier: String, plexToken: String) { - self.identifier = identifier - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case identifier - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(identifier, forKey: .identifier) - try container.encode(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PlexSourceRequest.swift deleted file mode 100644 index 926860a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexSourceRequest.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// PlexSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Plex Source Serializer */ -public struct PlexSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - /** Client identifier used to talk to Plex. */ - public var clientId: String? - /** Which servers a user has to be a member of to be granted access. Empty list allows every server. */ - public var allowedServers: [String]? - /** Allow friends to authenticate, even if you don't share a server. */ - public var allowFriends: Bool? - /** Plex token used to check friends */ - public var plexToken: String - - public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.clientId = clientId - self.allowedServers = allowedServers - self.allowFriends = allowFriends - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case clientId = "client_id" - case allowedServers = "allowed_servers" - case allowFriends = "allow_friends" - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(allowedServers, forKey: .allowedServers) - try container.encodeIfPresent(allowFriends, forKey: .allowFriends) - try container.encode(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PlexTokenRedeemRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PlexTokenRedeemRequest.swift deleted file mode 100644 index b10c1cf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PlexTokenRedeemRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PlexTokenRedeemRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer to redeem a plex token */ -public struct PlexTokenRedeemRequest: Codable, JSONEncodable, Hashable { - - public var plexToken: String - - public init(plexToken: String) { - self.plexToken = plexToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case plexToken = "plex_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(plexToken, forKey: .plexToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Policy.swift b/authentikClient/Classes/OpenAPIs/Models/Policy.swift deleted file mode 100644 index d047113..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Policy.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Policy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Policy Serializer */ -public struct Policy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyBinding.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyBinding.swift deleted file mode 100644 index e6bc452..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyBinding.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// PolicyBinding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PolicyBinding Serializer */ -public struct PolicyBinding: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var policy: UUID? - public var group: UUID? - public var user: Int? - public var policyObj: Policy - public var groupObj: Group - public var userObj: User - public var target: UUID - /** Negates the outcome of the policy. Messages are unaffected. */ - public var negate: Bool? - public var enabled: Bool? - public var order: Int - /** Timeout after which Policy execution is terminated. */ - public var timeout: Int? - /** Result if the Policy execution fails. */ - public var failureResult: Bool? - - public init(pk: UUID, policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, policyObj: Policy, groupObj: Group, userObj: User, target: UUID, negate: Bool? = nil, enabled: Bool? = nil, order: Int, timeout: Int? = nil, failureResult: Bool? = nil) { - self.pk = pk - self.policy = policy - self.group = group - self.user = user - self.policyObj = policyObj - self.groupObj = groupObj - self.userObj = userObj - self.target = target - self.negate = negate - self.enabled = enabled - self.order = order - self.timeout = timeout - self.failureResult = failureResult - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case policy - case group - case user - case policyObj = "policy_obj" - case groupObj = "group_obj" - case userObj = "user_obj" - case target - case negate - case enabled - case order - case timeout - case failureResult = "failure_result" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(policy, forKey: .policy) - try container.encodeIfPresent(group, forKey: .group) - try container.encodeIfPresent(user, forKey: .user) - try container.encode(policyObj, forKey: .policyObj) - try container.encode(groupObj, forKey: .groupObj) - try container.encode(userObj, forKey: .userObj) - try container.encode(target, forKey: .target) - try container.encodeIfPresent(negate, forKey: .negate) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encode(order, forKey: .order) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(failureResult, forKey: .failureResult) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyBindingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyBindingRequest.swift deleted file mode 100644 index 11cc066..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyBindingRequest.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// PolicyBindingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PolicyBinding Serializer */ -public struct PolicyBindingRequest: Codable, JSONEncodable, Hashable { - - public var policy: UUID? - public var group: UUID? - public var user: Int? - public var target: UUID - /** Negates the outcome of the policy. Messages are unaffected. */ - public var negate: Bool? - public var enabled: Bool? - public var order: Int - /** Timeout after which Policy execution is terminated. */ - public var timeout: Int? - /** Result if the Policy execution fails. */ - public var failureResult: Bool? - - public init(policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, target: UUID, negate: Bool? = nil, enabled: Bool? = nil, order: Int, timeout: Int? = nil, failureResult: Bool? = nil) { - self.policy = policy - self.group = group - self.user = user - self.target = target - self.negate = negate - self.enabled = enabled - self.order = order - self.timeout = timeout - self.failureResult = failureResult - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case policy - case group - case user - case target - case negate - case enabled - case order - case timeout - case failureResult = "failure_result" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(policy, forKey: .policy) - try container.encodeIfPresent(group, forKey: .group) - try container.encodeIfPresent(user, forKey: .user) - try container.encode(target, forKey: .target) - try container.encodeIfPresent(negate, forKey: .negate) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encode(order, forKey: .order) - try container.encodeIfPresent(timeout, forKey: .timeout) - try container.encodeIfPresent(failureResult, forKey: .failureResult) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyEngineMode.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyEngineMode.swift deleted file mode 100644 index 386b1ed..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyEngineMode.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// PolicyEngineMode.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `all` - all, all policies must pass * `any` - any, any policy must pass */ -public enum PolicyEngineMode: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case all = "all" - case any = "any" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyRequest.swift deleted file mode 100644 index fdbe7d3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyRequest.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// PolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Policy Serializer */ -public struct PolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - - public init(name: String, executionLogging: Bool? = nil) { - self.name = name - self.executionLogging = executionLogging - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyTestRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyTestRequest.swift deleted file mode 100644 index 53c405a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyTestRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PolicyTestRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Test policy execution for a user with context */ -public struct PolicyTestRequest: Codable, JSONEncodable, Hashable { - - public var user: Int - public var context: [String: AnyCodable]? - - public init(user: Int, context: [String: AnyCodable]? = nil) { - self.user = user - self.context = context - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case context - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(user, forKey: .user) - try container.encodeIfPresent(context, forKey: .context) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PolicyTestResult.swift b/authentikClient/Classes/OpenAPIs/Models/PolicyTestResult.swift deleted file mode 100644 index b0d6c57..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PolicyTestResult.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// PolicyTestResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** result of a policy test */ -public struct PolicyTestResult: Codable, JSONEncodable, Hashable { - - public var passing: Bool - public var messages: [String] - public var logMessages: [[String: AnyCodable]] - - public init(passing: Bool, messages: [String], logMessages: [[String: AnyCodable]]) { - self.passing = passing - self.messages = messages - self.logMessages = logMessages - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case passing - case messages - case logMessages = "log_messages" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(passing, forKey: .passing) - try container.encode(messages, forKey: .messages) - try container.encode(logMessages, forKey: .logMessages) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Prompt.swift b/authentikClient/Classes/OpenAPIs/Models/Prompt.swift deleted file mode 100644 index 7b1fd9f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Prompt.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// Prompt.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Prompt Serializer */ -public struct Prompt: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Name of the form field, also used to store the value */ - public var fieldKey: String - public var label: String - public var type: PromptTypeEnum - public var _required: Bool? - /** Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. */ - public var placeholder: String? - /** Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. */ - public var initialValue: String? - public var order: Int? - public var promptstageSet: [Stage]? - public var subText: String? - public var placeholderExpression: Bool? - public var initialValueExpression: Bool? - - public init(pk: UUID, name: String, fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [Stage]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { - self.pk = pk - self.name = name - self.fieldKey = fieldKey - self.label = label - self.type = type - self._required = _required - self.placeholder = placeholder - self.initialValue = initialValue - self.order = order - self.promptstageSet = promptstageSet - self.subText = subText - self.placeholderExpression = placeholderExpression - self.initialValueExpression = initialValueExpression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case fieldKey = "field_key" - case label - case type - case _required = "required" - case placeholder - case initialValue = "initial_value" - case order - case promptstageSet = "promptstage_set" - case subText = "sub_text" - case placeholderExpression = "placeholder_expression" - case initialValueExpression = "initial_value_expression" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(fieldKey, forKey: .fieldKey) - try container.encode(label, forKey: .label) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(_required, forKey: ._required) - try container.encodeIfPresent(placeholder, forKey: .placeholder) - try container.encodeIfPresent(initialValue, forKey: .initialValue) - try container.encodeIfPresent(order, forKey: .order) - try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) - try container.encodeIfPresent(subText, forKey: .subText) - try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) - try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/PromptChallenge.swift deleted file mode 100644 index e92dfe3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PromptChallenge.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// PromptChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Initial challenge being sent, define fields */ -public struct PromptChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-prompt" - public var responseErrors: [String: [ErrorDetail]]? - public var fields: [StagePrompt] - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-prompt", responseErrors: [String: [ErrorDetail]]? = nil, fields: [StagePrompt]) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.fields = fields - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case fields - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(fields, forKey: .fields) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PromptChallengeResponseRequest.swift deleted file mode 100644 index f558960..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PromptChallengeResponseRequest.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// PromptChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Validate response, fields are dynamically created based on the stage */ -public struct PromptChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-prompt" - - public init(component: String? = "ak-stage-prompt") { - self.component = component - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - } - - public var additionalProperties: [String: AnyCodable] = [:] - - public subscript(key: String) -> AnyCodable? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - var additionalPropertiesContainer = encoder.container(keyedBy: String.self) - try additionalPropertiesContainer.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - component = try container.decodeIfPresent(String.self, forKey: .component) - var nonAdditionalPropertyKeys = Set() - nonAdditionalPropertyKeys.insert("component") - let additionalPropertiesContainer = try decoder.container(keyedBy: String.self) - additionalProperties = try additionalPropertiesContainer.decodeMap(AnyCodable.self, excludedKeys: nonAdditionalPropertyKeys) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PromptRequest.swift deleted file mode 100644 index c4e7b4c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PromptRequest.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// PromptRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Prompt Serializer */ -public struct PromptRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Name of the form field, also used to store the value */ - public var fieldKey: String - public var label: String - public var type: PromptTypeEnum - public var _required: Bool? - /** Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. */ - public var placeholder: String? - /** Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. */ - public var initialValue: String? - public var order: Int? - public var promptstageSet: [StageRequest]? - public var subText: String? - public var placeholderExpression: Bool? - public var initialValueExpression: Bool? - - public init(name: String, fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [StageRequest]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { - self.name = name - self.fieldKey = fieldKey - self.label = label - self.type = type - self._required = _required - self.placeholder = placeholder - self.initialValue = initialValue - self.order = order - self.promptstageSet = promptstageSet - self.subText = subText - self.placeholderExpression = placeholderExpression - self.initialValueExpression = initialValueExpression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case fieldKey = "field_key" - case label - case type - case _required = "required" - case placeholder - case initialValue = "initial_value" - case order - case promptstageSet = "promptstage_set" - case subText = "sub_text" - case placeholderExpression = "placeholder_expression" - case initialValueExpression = "initial_value_expression" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(fieldKey, forKey: .fieldKey) - try container.encode(label, forKey: .label) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(_required, forKey: ._required) - try container.encodeIfPresent(placeholder, forKey: .placeholder) - try container.encodeIfPresent(initialValue, forKey: .initialValue) - try container.encodeIfPresent(order, forKey: .order) - try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) - try container.encodeIfPresent(subText, forKey: .subText) - try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) - try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptStage.swift b/authentikClient/Classes/OpenAPIs/Models/PromptStage.swift deleted file mode 100644 index f9199a0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PromptStage.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// PromptStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PromptStage Serializer */ -public struct PromptStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var fields: [UUID] - public var validationPolicies: [UUID]? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, fields: [UUID], validationPolicies: [UUID]? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.fields = fields - self.validationPolicies = validationPolicies - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case fields - case validationPolicies = "validation_policies" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(fields, forKey: .fields) - try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/PromptStageRequest.swift deleted file mode 100644 index 8f66e4b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PromptStageRequest.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// PromptStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PromptStage Serializer */ -public struct PromptStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var fields: [UUID] - public var validationPolicies: [UUID]? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, fields: [UUID], validationPolicies: [UUID]? = nil) { - self.name = name - self.flowSet = flowSet - self.fields = fields - self.validationPolicies = validationPolicies - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case fields - case validationPolicies = "validation_policies" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encode(fields, forKey: .fields) - try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PropertyMapping.swift b/authentikClient/Classes/OpenAPIs/Models/PropertyMapping.swift deleted file mode 100644 index 2420bc8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PropertyMapping.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// PropertyMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** PropertyMapping Serializer */ -public struct PropertyMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Get object's component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - - public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { - self.pk = pk - self.managed = managed - self.name = name - self.expression = expression - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case name - case expression - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PropertyMappingPreview.swift b/authentikClient/Classes/OpenAPIs/Models/PropertyMappingPreview.swift deleted file mode 100644 index 036225a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PropertyMappingPreview.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// PropertyMappingPreview.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Preview how the current user is mapped via the property mappings selected in a provider */ -public struct PropertyMappingPreview: Codable, JSONEncodable, Hashable { - - public var preview: [String: AnyCodable] - - public init(preview: [String: AnyCodable]) { - self.preview = preview - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case preview - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(preview, forKey: .preview) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/PropertyMappingTestResult.swift b/authentikClient/Classes/OpenAPIs/Models/PropertyMappingTestResult.swift deleted file mode 100644 index b5e21be..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/PropertyMappingTestResult.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// PropertyMappingTestResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Result of a Property-mapping test */ -public struct PropertyMappingTestResult: Codable, JSONEncodable, Hashable { - - public var result: String - public var successful: Bool - - public init(result: String, successful: Bool) { - self.result = result - self.successful = successful - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case result - case successful - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(result, forKey: .result) - try container.encode(successful, forKey: .successful) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Provider.swift b/authentikClient/Classes/OpenAPIs/Models/Provider.swift deleted file mode 100644 index fa9c2cc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Provider.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// Provider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Provider Serializer */ -public struct Provider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ProviderEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ProviderEnum.swift deleted file mode 100644 index 9a25db4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProviderEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ProviderEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `twilio` - Twilio * `generic` - Generic */ -public enum ProviderEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case twilio = "twilio" - case generic = "generic" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ProviderModelEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ProviderModelEnum.swift deleted file mode 100644 index 91cadc3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProviderModelEnum.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ProviderModelEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `authentik_providers_ldap.ldapprovider` - authentik_providers_ldap.ldapprovider * `authentik_providers_oauth2.oauth2provider` - authentik_providers_oauth2.oauth2provider * `authentik_providers_proxy.proxyprovider` - authentik_providers_proxy.proxyprovider * `authentik_providers_radius.radiusprovider` - authentik_providers_radius.radiusprovider * `authentik_providers_saml.samlprovider` - authentik_providers_saml.samlprovider * `authentik_providers_scim.scimprovider` - authentik_providers_scim.scimprovider */ -public enum ProviderModelEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case ldapPeriodLdapprovider = "authentik_providers_ldap.ldapprovider" - case oauth2PeriodOauth2provider = "authentik_providers_oauth2.oauth2provider" - case proxyPeriodProxyprovider = "authentik_providers_proxy.proxyprovider" - case radiusPeriodRadiusprovider = "authentik_providers_radius.radiusprovider" - case samlPeriodSamlprovider = "authentik_providers_saml.samlprovider" - case scimPeriodScimprovider = "authentik_providers_scim.scimprovider" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ProviderRequest.swift deleted file mode 100644 index 9897f24..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProviderRequest.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Provider Serializer */ -public struct ProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ProxyMode.swift b/authentikClient/Classes/OpenAPIs/Models/ProxyMode.swift deleted file mode 100644 index 7dbd9ff..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProxyMode.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ProxyMode.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain */ -public enum ProxyMode: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case proxy = "proxy" - case forwardSingle = "forward_single" - case forwardDomain = "forward_domain" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ProxyOutpostConfig.swift b/authentikClient/Classes/OpenAPIs/Models/ProxyOutpostConfig.swift deleted file mode 100644 index ca1623e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProxyOutpostConfig.swift +++ /dev/null @@ -1,124 +0,0 @@ -// -// ProxyOutpostConfig.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Proxy provider serializer for outposts */ -public struct ProxyOutpostConfig: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - public var internalHost: String? - public var externalHost: String - /** Validate SSL Certificates of upstream servers */ - public var internalHostSslValidation: Bool? - public var clientId: String? - public var clientSecret: String? - public var oidcConfiguration: OpenIDConnectConfiguration - public var cookieSecret: String? - public var certificate: UUID? - /** Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. */ - public var skipPathRegex: String? - /** Set a custom HTTP-Basic Authentication header based on values from authentik. */ - public var basicAuthEnabled: Bool? - /** User/Group Attribute used for the password part of the HTTP-Basic Header. */ - public var basicAuthPasswordAttribute: String? - /** User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. */ - public var basicAuthUserAttribute: String? - /** Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain */ - public var mode: ProxyMode? - public var cookieDomain: String? - /** Get token validity as second count */ - public var accessTokenValidity: Double? - /** When enabled, this provider will intercept the authorization header and authenticate requests based on its value. */ - public var interceptHeaderAuth: Bool? - /** Get all the scope names the outpost should request, including custom-defined ones */ - public var scopesToRequest: [String] - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - - public init(pk: Int, name: String, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, clientId: String? = nil, clientSecret: String? = nil, oidcConfiguration: OpenIDConnectConfiguration, cookieSecret: String? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, cookieDomain: String? = nil, accessTokenValidity: Double?, interceptHeaderAuth: Bool? = nil, scopesToRequest: [String], assignedApplicationSlug: String, assignedApplicationName: String) { - self.pk = pk - self.name = name - self.internalHost = internalHost - self.externalHost = externalHost - self.internalHostSslValidation = internalHostSslValidation - self.clientId = clientId - self.clientSecret = clientSecret - self.oidcConfiguration = oidcConfiguration - self.cookieSecret = cookieSecret - self.certificate = certificate - self.skipPathRegex = skipPathRegex - self.basicAuthEnabled = basicAuthEnabled - self.basicAuthPasswordAttribute = basicAuthPasswordAttribute - self.basicAuthUserAttribute = basicAuthUserAttribute - self.mode = mode - self.cookieDomain = cookieDomain - self.accessTokenValidity = accessTokenValidity - self.interceptHeaderAuth = interceptHeaderAuth - self.scopesToRequest = scopesToRequest - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case internalHost = "internal_host" - case externalHost = "external_host" - case internalHostSslValidation = "internal_host_ssl_validation" - case clientId = "client_id" - case clientSecret = "client_secret" - case oidcConfiguration = "oidc_configuration" - case cookieSecret = "cookie_secret" - case certificate - case skipPathRegex = "skip_path_regex" - case basicAuthEnabled = "basic_auth_enabled" - case basicAuthPasswordAttribute = "basic_auth_password_attribute" - case basicAuthUserAttribute = "basic_auth_user_attribute" - case mode - case cookieDomain = "cookie_domain" - case accessTokenValidity = "access_token_validity" - case interceptHeaderAuth = "intercept_header_auth" - case scopesToRequest = "scopes_to_request" - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(internalHost, forKey: .internalHost) - try container.encode(externalHost, forKey: .externalHost) - try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) - try container.encodeIfPresent(clientId, forKey: .clientId) - try container.encodeIfPresent(clientSecret, forKey: .clientSecret) - try container.encode(oidcConfiguration, forKey: .oidcConfiguration) - try container.encodeIfPresent(cookieSecret, forKey: .cookieSecret) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) - try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) - try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) - try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) - try container.encode(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) - try container.encode(scopesToRequest, forKey: .scopesToRequest) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ProxyProvider.swift b/authentikClient/Classes/OpenAPIs/Models/ProxyProvider.swift deleted file mode 100644 index f1d6f18..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProxyProvider.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// ProxyProvider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ProxyProvider Serializer */ -public struct ProxyProvider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var clientId: String - public var internalHost: String? - public var externalHost: String - /** Validate SSL Certificates of upstream servers */ - public var internalHostSslValidation: Bool? - public var certificate: UUID? - /** Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. */ - public var skipPathRegex: String? - /** Set a custom HTTP-Basic Authentication header based on values from authentik. */ - public var basicAuthEnabled: Bool? - /** User/Group Attribute used for the password part of the HTTP-Basic Header. */ - public var basicAuthPasswordAttribute: String? - /** User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. */ - public var basicAuthUserAttribute: String? - /** Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain */ - public var mode: ProxyMode? - /** When enabled, this provider will intercept the authorization header and authenticate requests based on its value. */ - public var interceptHeaderAuth: Bool? - public var redirectUris: String - public var cookieDomain: String? - public var jwksSources: [UUID]? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - public var outpostSet: [String] - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientId: String, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, redirectUris: String, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, outpostSet: [String]) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.clientId = clientId - self.internalHost = internalHost - self.externalHost = externalHost - self.internalHostSslValidation = internalHostSslValidation - self.certificate = certificate - self.skipPathRegex = skipPathRegex - self.basicAuthEnabled = basicAuthEnabled - self.basicAuthPasswordAttribute = basicAuthPasswordAttribute - self.basicAuthUserAttribute = basicAuthUserAttribute - self.mode = mode - self.interceptHeaderAuth = interceptHeaderAuth - self.redirectUris = redirectUris - self.cookieDomain = cookieDomain - self.jwksSources = jwksSources - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - self.outpostSet = outpostSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case clientId = "client_id" - case internalHost = "internal_host" - case externalHost = "external_host" - case internalHostSslValidation = "internal_host_ssl_validation" - case certificate - case skipPathRegex = "skip_path_regex" - case basicAuthEnabled = "basic_auth_enabled" - case basicAuthPasswordAttribute = "basic_auth_password_attribute" - case basicAuthUserAttribute = "basic_auth_user_attribute" - case mode - case interceptHeaderAuth = "intercept_header_auth" - case redirectUris = "redirect_uris" - case cookieDomain = "cookie_domain" - case jwksSources = "jwks_sources" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - case outpostSet = "outpost_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(clientId, forKey: .clientId) - try container.encodeIfPresent(internalHost, forKey: .internalHost) - try container.encode(externalHost, forKey: .externalHost) - try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) - try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) - try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) - try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) - try container.encode(redirectUris, forKey: .redirectUris) - try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - try container.encode(outpostSet, forKey: .outpostSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ProxyProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ProxyProviderRequest.swift deleted file mode 100644 index 87ba739..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ProxyProviderRequest.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// ProxyProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ProxyProvider Serializer */ -public struct ProxyProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - public var internalHost: String? - public var externalHost: String - /** Validate SSL Certificates of upstream servers */ - public var internalHostSslValidation: Bool? - public var certificate: UUID? - /** Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. */ - public var skipPathRegex: String? - /** Set a custom HTTP-Basic Authentication header based on values from authentik. */ - public var basicAuthEnabled: Bool? - /** User/Group Attribute used for the password part of the HTTP-Basic Header. */ - public var basicAuthPasswordAttribute: String? - /** User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. */ - public var basicAuthUserAttribute: String? - /** Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain */ - public var mode: ProxyMode? - /** When enabled, this provider will intercept the authorization header and authenticate requests based on its value. */ - public var interceptHeaderAuth: Bool? - public var cookieDomain: String? - public var jwksSources: [UUID]? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var accessTokenValidity: String? - /** Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var refreshTokenValidity: String? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.internalHost = internalHost - self.externalHost = externalHost - self.internalHostSslValidation = internalHostSslValidation - self.certificate = certificate - self.skipPathRegex = skipPathRegex - self.basicAuthEnabled = basicAuthEnabled - self.basicAuthPasswordAttribute = basicAuthPasswordAttribute - self.basicAuthUserAttribute = basicAuthUserAttribute - self.mode = mode - self.interceptHeaderAuth = interceptHeaderAuth - self.cookieDomain = cookieDomain - self.jwksSources = jwksSources - self.accessTokenValidity = accessTokenValidity - self.refreshTokenValidity = refreshTokenValidity - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case internalHost = "internal_host" - case externalHost = "external_host" - case internalHostSslValidation = "internal_host_ssl_validation" - case certificate - case skipPathRegex = "skip_path_regex" - case basicAuthEnabled = "basic_auth_enabled" - case basicAuthPasswordAttribute = "basic_auth_password_attribute" - case basicAuthUserAttribute = "basic_auth_user_attribute" - case mode - case interceptHeaderAuth = "intercept_header_auth" - case cookieDomain = "cookie_domain" - case jwksSources = "jwks_sources" - case accessTokenValidity = "access_token_validity" - case refreshTokenValidity = "refresh_token_validity" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(internalHost, forKey: .internalHost) - try container.encode(externalHost, forKey: .externalHost) - try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) - try container.encodeIfPresent(certificate, forKey: .certificate) - try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) - try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) - try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) - try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) - try container.encodeIfPresent(mode, forKey: .mode) - try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) - try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) - try container.encodeIfPresent(jwksSources, forKey: .jwksSources) - try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) - try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RadiusOutpostConfig.swift b/authentikClient/Classes/OpenAPIs/Models/RadiusOutpostConfig.swift deleted file mode 100644 index 4eaebab..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RadiusOutpostConfig.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// RadiusOutpostConfig.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** RadiusProvider Serializer */ -public struct RadiusOutpostConfig: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - public var applicationSlug: String - public var authFlowSlug: String - /** List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. */ - public var clientNetworks: String? - /** Shared secret between clients and server to hash packets. */ - public var sharedSecret: String? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(pk: Int, name: String, applicationSlug: String, authFlowSlug: String, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { - self.pk = pk - self.name = name - self.applicationSlug = applicationSlug - self.authFlowSlug = authFlowSlug - self.clientNetworks = clientNetworks - self.sharedSecret = sharedSecret - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case applicationSlug = "application_slug" - case authFlowSlug = "auth_flow_slug" - case clientNetworks = "client_networks" - case sharedSecret = "shared_secret" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(applicationSlug, forKey: .applicationSlug) - try container.encode(authFlowSlug, forKey: .authFlowSlug) - try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) - try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RadiusProvider.swift b/authentikClient/Classes/OpenAPIs/Models/RadiusProvider.swift deleted file mode 100644 index c6e533a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RadiusProvider.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// RadiusProvider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** RadiusProvider Serializer */ -public struct RadiusProvider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. */ - public var clientNetworks: String? - /** Shared secret between clients and server to hash packets. */ - public var sharedSecret: String? - public var outpostSet: [String] - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientNetworks: String? = nil, sharedSecret: String? = nil, outpostSet: [String], mfaSupport: Bool? = nil) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.clientNetworks = clientNetworks - self.sharedSecret = sharedSecret - self.outpostSet = outpostSet - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case clientNetworks = "client_networks" - case sharedSecret = "shared_secret" - case outpostSet = "outpost_set" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) - try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) - try container.encode(outpostSet, forKey: .outpostSet) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RadiusProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/RadiusProviderRequest.swift deleted file mode 100644 index 450ba11..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RadiusProviderRequest.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// RadiusProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** RadiusProvider Serializer */ -public struct RadiusProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. */ - public var clientNetworks: String? - /** Shared secret between clients and server to hash packets. */ - public var sharedSecret: String? - /** When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. */ - public var mfaSupport: Bool? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.clientNetworks = clientNetworks - self.sharedSecret = sharedSecret - self.mfaSupport = mfaSupport - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case clientNetworks = "client_networks" - case sharedSecret = "shared_secret" - case mfaSupport = "mfa_support" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) - try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) - try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RedirectChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/RedirectChallenge.swift deleted file mode 100644 index 92d4413..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RedirectChallenge.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// RedirectChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Challenge type to redirect the client */ -public struct RedirectChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "xak-flow-redirect" - public var responseErrors: [String: [ErrorDetail]]? - public var to: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "xak-flow-redirect", responseErrors: [String: [ErrorDetail]]? = nil, to: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.to = to - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case to - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(to, forKey: .to) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Reputation.swift b/authentikClient/Classes/OpenAPIs/Models/Reputation.swift deleted file mode 100644 index b3c3fe3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Reputation.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Reputation.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Reputation Serializer */ -public struct Reputation: Codable, JSONEncodable, Hashable { - - public var pk: UUID? - public var identifier: String - public var ip: String - public var ipGeoData: [String: AnyCodable]? - public var score: Int64? - public var updated: Date - - public init(pk: UUID? = nil, identifier: String, ip: String, ipGeoData: [String: AnyCodable]? = nil, score: Int64? = nil, updated: Date) { - self.pk = pk - self.identifier = identifier - self.ip = ip - self.ipGeoData = ipGeoData - self.score = score - self.updated = updated - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case identifier - case ip - case ipGeoData = "ip_geo_data" - case score - case updated - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(pk, forKey: .pk) - try container.encode(identifier, forKey: .identifier) - try container.encode(ip, forKey: .ip) - try container.encodeIfPresent(ipGeoData, forKey: .ipGeoData) - try container.encodeIfPresent(score, forKey: .score) - try container.encode(updated, forKey: .updated) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ReputationPolicy.swift b/authentikClient/Classes/OpenAPIs/Models/ReputationPolicy.swift deleted file mode 100644 index 4ddd6d9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ReputationPolicy.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// ReputationPolicy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Reputation Policy Serializer */ -public struct ReputationPolicy: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Return objects policy is bound to */ - public var boundTo: Int - public var checkIp: Bool? - public var checkUsername: Bool? - public var threshold: Int? - - public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { - self.pk = pk - self.name = name - self.executionLogging = executionLogging - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.boundTo = boundTo - self.checkIp = checkIp - self.checkUsername = checkUsername - self.threshold = threshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case executionLogging = "execution_logging" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case boundTo = "bound_to" - case checkIp = "check_ip" - case checkUsername = "check_username" - case threshold - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(boundTo, forKey: .boundTo) - try container.encodeIfPresent(checkIp, forKey: .checkIp) - try container.encodeIfPresent(checkUsername, forKey: .checkUsername) - try container.encodeIfPresent(threshold, forKey: .threshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ReputationPolicyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ReputationPolicyRequest.swift deleted file mode 100644 index 4099ecf..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ReputationPolicyRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ReputationPolicyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Reputation Policy Serializer */ -public struct ReputationPolicyRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. */ - public var executionLogging: Bool? - public var checkIp: Bool? - public var checkUsername: Bool? - public var threshold: Int? - - public init(name: String, executionLogging: Bool? = nil, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { - self.name = name - self.executionLogging = executionLogging - self.checkIp = checkIp - self.checkUsername = checkUsername - self.threshold = threshold - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case executionLogging = "execution_logging" - case checkIp = "check_ip" - case checkUsername = "check_username" - case threshold - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(executionLogging, forKey: .executionLogging) - try container.encodeIfPresent(checkIp, forKey: .checkIp) - try container.encodeIfPresent(checkUsername, forKey: .checkUsername) - try container.encodeIfPresent(threshold, forKey: .threshold) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ResidentKeyRequirementEnum.swift b/authentikClient/Classes/OpenAPIs/Models/ResidentKeyRequirementEnum.swift deleted file mode 100644 index ca9badb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ResidentKeyRequirementEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ResidentKeyRequirementEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required */ -public enum ResidentKeyRequirementEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case discouraged = "discouraged" - case preferred = "preferred" - case _required = "required" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Role.swift b/authentikClient/Classes/OpenAPIs/Models/Role.swift deleted file mode 100644 index 4f9017b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Role.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Role.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Role serializer */ -public struct Role: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - - public init(pk: UUID, name: String) { - self.pk = pk - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RoleAssignedObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/RoleAssignedObjectPermission.swift deleted file mode 100644 index 4c58be1..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RoleAssignedObjectPermission.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// RoleAssignedObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Roles assigned object permission serializer */ -public struct RoleAssignedObjectPermission: Codable, JSONEncodable, Hashable { - - public var rolePk: String - public var name: String - public var permissions: [RoleObjectPermission] - - public init(rolePk: String, name: String, permissions: [RoleObjectPermission]) { - self.rolePk = rolePk - self.name = name - self.permissions = permissions - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case rolePk = "role_pk" - case name - case permissions - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(rolePk, forKey: .rolePk) - try container.encode(name, forKey: .name) - try container.encode(permissions, forKey: .permissions) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RoleObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/RoleObjectPermission.swift deleted file mode 100644 index de4d022..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RoleObjectPermission.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// RoleObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Role-bound object level permission */ -public struct RoleObjectPermission: Codable, JSONEncodable, Hashable { - - public var id: Int - public var codename: String - public var model: String - public var appLabel: String - public var objectPk: String - public var name: String - - public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String) { - self.id = id - self.codename = codename - self.model = model - self.appLabel = appLabel - self.objectPk = objectPk - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case id - case codename - case model - case appLabel = "app_label" - case objectPk = "object_pk" - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(codename, forKey: .codename) - try container.encode(model, forKey: .model) - try container.encode(appLabel, forKey: .appLabel) - try container.encode(objectPk, forKey: .objectPk) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/RoleRequest.swift b/authentikClient/Classes/OpenAPIs/Models/RoleRequest.swift deleted file mode 100644 index 596ff88..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/RoleRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// RoleRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Role serializer */ -public struct RoleRequest: Codable, JSONEncodable, Hashable { - - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLMetadata.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLMetadata.swift deleted file mode 100644 index 1c02258..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLMetadata.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// SAMLMetadata.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAML Provider Metadata serializer */ -public struct SAMLMetadata: Codable, JSONEncodable, Hashable { - - public var metadata: String - public var downloadUrl: String - - public init(metadata: String, downloadUrl: String) { - self.metadata = metadata - self.downloadUrl = downloadUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case metadata - case downloadUrl = "download_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(metadata, forKey: .metadata) - try container.encode(downloadUrl, forKey: .downloadUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMapping.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMapping.swift deleted file mode 100644 index dae2fc4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMapping.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// SAMLPropertyMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLPropertyMapping Serializer */ -public struct SAMLPropertyMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Get object's component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var samlName: String - public var friendlyName: String? - - public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, samlName: String, friendlyName: String? = nil) { - self.pk = pk - self.managed = managed - self.name = name - self.expression = expression - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.samlName = samlName - self.friendlyName = friendlyName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case name - case expression - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case samlName = "saml_name" - case friendlyName = "friendly_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(samlName, forKey: .samlName) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMappingRequest.swift deleted file mode 100644 index 18dbbd5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLPropertyMappingRequest.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// SAMLPropertyMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLPropertyMapping Serializer */ -public struct SAMLPropertyMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - public var samlName: String - public var friendlyName: String? - - public init(managed: String? = nil, name: String, expression: String, samlName: String, friendlyName: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - self.samlName = samlName - self.friendlyName = friendlyName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case samlName = "saml_name" - case friendlyName = "friendly_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(samlName, forKey: .samlName) - try container.encodeIfPresent(friendlyName, forKey: .friendlyName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLProvider.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLProvider.swift deleted file mode 100644 index 90cb016..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLProvider.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// SAMLProvider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLProvider Serializer */ -public struct SAMLProvider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedApplicationSlug: String - /** Application's display Name. */ - public var assignedApplicationName: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var acsUrl: String - /** Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. */ - public var audience: String? - /** Also known as EntityID */ - public var issuer: String? - /** Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). */ - public var assertionValidNotBefore: String? - /** Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var assertionValidNotOnOrAfter: String? - /** Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var sessionValidNotOnOrAfter: String? - /** Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered */ - public var nameIdMapping: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Keypair used to sign outgoing Responses going to the Service Provider. */ - public var signingKp: UUID? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post */ - public var spBinding: SpBindingEnum? - /** Default relay_state value for IDP-initiated logins */ - public var defaultRelayState: String? - /** Get metadata download URL */ - public var urlDownloadMetadata: String - /** Get SSO Post URL */ - public var urlSsoPost: String - /** Get SSO Redirect URL */ - public var urlSsoRedirect: String - /** Get SSO IDP-Initiated URL */ - public var urlSsoInit: String - /** Get SLO POST URL */ - public var urlSloPost: String - /** Get SLO redirect URL */ - public var urlSloRedirect: String - - public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, acsUrl: String, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil, urlDownloadMetadata: String, urlSsoPost: String, urlSsoRedirect: String, urlSsoInit: String, urlSloPost: String, urlSloRedirect: String) { - self.pk = pk - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.component = component - self.assignedApplicationSlug = assignedApplicationSlug - self.assignedApplicationName = assignedApplicationName - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.acsUrl = acsUrl - self.audience = audience - self.issuer = issuer - self.assertionValidNotBefore = assertionValidNotBefore - self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter - self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter - self.nameIdMapping = nameIdMapping - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.signingKp = signingKp - self.verificationKp = verificationKp - self.spBinding = spBinding - self.defaultRelayState = defaultRelayState - self.urlDownloadMetadata = urlDownloadMetadata - self.urlSsoPost = urlSsoPost - self.urlSsoRedirect = urlSsoRedirect - self.urlSsoInit = urlSsoInit - self.urlSloPost = urlSloPost - self.urlSloRedirect = urlSloRedirect - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case component - case assignedApplicationSlug = "assigned_application_slug" - case assignedApplicationName = "assigned_application_name" - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case acsUrl = "acs_url" - case audience - case issuer - case assertionValidNotBefore = "assertion_valid_not_before" - case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" - case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" - case nameIdMapping = "name_id_mapping" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case signingKp = "signing_kp" - case verificationKp = "verification_kp" - case spBinding = "sp_binding" - case defaultRelayState = "default_relay_state" - case urlDownloadMetadata = "url_download_metadata" - case urlSsoPost = "url_sso_post" - case urlSsoRedirect = "url_sso_redirect" - case urlSsoInit = "url_sso_init" - case urlSloPost = "url_slo_post" - case urlSloRedirect = "url_slo_redirect" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(component, forKey: .component) - try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) - try container.encode(assignedApplicationName, forKey: .assignedApplicationName) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(acsUrl, forKey: .acsUrl) - try container.encodeIfPresent(audience, forKey: .audience) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) - try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) - try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) - try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(spBinding, forKey: .spBinding) - try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) - try container.encode(urlDownloadMetadata, forKey: .urlDownloadMetadata) - try container.encode(urlSsoPost, forKey: .urlSsoPost) - try container.encode(urlSsoRedirect, forKey: .urlSsoRedirect) - try container.encode(urlSsoInit, forKey: .urlSsoInit) - try container.encode(urlSloPost, forKey: .urlSloPost) - try container.encode(urlSloRedirect, forKey: .urlSloRedirect) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLProviderRequest.swift deleted file mode 100644 index 02d5d90..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLProviderRequest.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// SAMLProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLProvider Serializer */ -public struct SAMLProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Flow used for authentication when the associated application is accessed by an un-authenticated user. */ - public var authenticationFlow: UUID? - /** Flow used when authorizing this provider. */ - public var authorizationFlow: UUID - public var propertyMappings: [UUID]? - public var acsUrl: String - /** Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. */ - public var audience: String? - /** Also known as EntityID */ - public var issuer: String? - /** Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). */ - public var assertionValidNotBefore: String? - /** Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var assertionValidNotOnOrAfter: String? - /** Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). */ - public var sessionValidNotOnOrAfter: String? - /** Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered */ - public var nameIdMapping: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Keypair used to sign outgoing Responses going to the Service Provider. */ - public var signingKp: UUID? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post */ - public var spBinding: SpBindingEnum? - /** Default relay_state value for IDP-initiated logins */ - public var defaultRelayState: String? - - public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, acsUrl: String, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil) { - self.name = name - self.authenticationFlow = authenticationFlow - self.authorizationFlow = authorizationFlow - self.propertyMappings = propertyMappings - self.acsUrl = acsUrl - self.audience = audience - self.issuer = issuer - self.assertionValidNotBefore = assertionValidNotBefore - self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter - self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter - self.nameIdMapping = nameIdMapping - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.signingKp = signingKp - self.verificationKp = verificationKp - self.spBinding = spBinding - self.defaultRelayState = defaultRelayState - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case authenticationFlow = "authentication_flow" - case authorizationFlow = "authorization_flow" - case propertyMappings = "property_mappings" - case acsUrl = "acs_url" - case audience - case issuer - case assertionValidNotBefore = "assertion_valid_not_before" - case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" - case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" - case nameIdMapping = "name_id_mapping" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case signingKp = "signing_kp" - case verificationKp = "verification_kp" - case spBinding = "sp_binding" - case defaultRelayState = "default_relay_state" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encode(authorizationFlow, forKey: .authorizationFlow) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encode(acsUrl, forKey: .acsUrl) - try container.encodeIfPresent(audience, forKey: .audience) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) - try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) - try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) - try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(spBinding, forKey: .spBinding) - try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLSource.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLSource.swift deleted file mode 100644 index d6dab25..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLSource.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// SAMLSource.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLSource Serializer */ -public struct SAMLSource: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var userPathTemplate: String? - /** Get the URL to the Icon. If the name is /static or starts with http it is returned as-is */ - public var icon: String? - /** Flow used before authentication. */ - public var preAuthenticationFlow: UUID - /** Also known as Entity ID. Defaults the Metadata URL. */ - public var issuer: String? - /** URL that the initial Login request is sent to. */ - public var ssoUrl: String - /** Optional URL if your IDP supports Single-Logout. */ - public var sloUrl: String? - /** Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. */ - public var allowIdpInitiated: Bool? - /** NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient */ - public var nameIdPolicy: NameIdPolicyEnum? - public var bindingType: BindingTypeEnum? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** Keypair used to sign outgoing Responses going to the Identity Provider. */ - public var signingKp: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). */ - public var temporaryUserDeleteAfter: String? - - public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, preAuthenticationFlow: UUID, issuer: String? = nil, ssoUrl: String, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { - self.pk = pk - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.managed = managed - self.userPathTemplate = userPathTemplate - self.icon = icon - self.preAuthenticationFlow = preAuthenticationFlow - self.issuer = issuer - self.ssoUrl = ssoUrl - self.sloUrl = sloUrl - self.allowIdpInitiated = allowIdpInitiated - self.nameIdPolicy = nameIdPolicy - self.bindingType = bindingType - self.verificationKp = verificationKp - self.signingKp = signingKp - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.temporaryUserDeleteAfter = temporaryUserDeleteAfter - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case managed - case userPathTemplate = "user_path_template" - case icon - case preAuthenticationFlow = "pre_authentication_flow" - case issuer - case ssoUrl = "sso_url" - case sloUrl = "slo_url" - case allowIdpInitiated = "allow_idp_initiated" - case nameIdPolicy = "name_id_policy" - case bindingType = "binding_type" - case verificationKp = "verification_kp" - case signingKp = "signing_kp" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case temporaryUserDeleteAfter = "temporary_user_delete_after" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encode(managed, forKey: .managed) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(icon, forKey: .icon) - try container.encode(preAuthenticationFlow, forKey: .preAuthenticationFlow) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encode(ssoUrl, forKey: .ssoUrl) - try container.encodeIfPresent(sloUrl, forKey: .sloUrl) - try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) - try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) - try container.encodeIfPresent(bindingType, forKey: .bindingType) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SAMLSourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SAMLSourceRequest.swift deleted file mode 100644 index 1c3f19b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SAMLSourceRequest.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// SAMLSourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAMLSource Serializer */ -public struct SAMLSourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - /** Flow used before authentication. */ - public var preAuthenticationFlow: UUID - /** Also known as Entity ID. Defaults the Metadata URL. */ - public var issuer: String? - /** URL that the initial Login request is sent to. */ - public var ssoUrl: String - /** Optional URL if your IDP supports Single-Logout. */ - public var sloUrl: String? - /** Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. */ - public var allowIdpInitiated: Bool? - /** NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient */ - public var nameIdPolicy: NameIdPolicyEnum? - public var bindingType: BindingTypeEnum? - /** When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. */ - public var verificationKp: UUID? - /** Keypair used to sign outgoing Responses going to the Identity Provider. */ - public var signingKp: UUID? - public var digestAlgorithm: DigestAlgorithmEnum? - public var signatureAlgorithm: SignatureAlgorithmEnum? - /** Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). */ - public var temporaryUserDeleteAfter: String? - - public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, preAuthenticationFlow: UUID, issuer: String? = nil, ssoUrl: String, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - self.preAuthenticationFlow = preAuthenticationFlow - self.issuer = issuer - self.ssoUrl = ssoUrl - self.sloUrl = sloUrl - self.allowIdpInitiated = allowIdpInitiated - self.nameIdPolicy = nameIdPolicy - self.bindingType = bindingType - self.verificationKp = verificationKp - self.signingKp = signingKp - self.digestAlgorithm = digestAlgorithm - self.signatureAlgorithm = signatureAlgorithm - self.temporaryUserDeleteAfter = temporaryUserDeleteAfter - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - case preAuthenticationFlow = "pre_authentication_flow" - case issuer - case ssoUrl = "sso_url" - case sloUrl = "slo_url" - case allowIdpInitiated = "allow_idp_initiated" - case nameIdPolicy = "name_id_policy" - case bindingType = "binding_type" - case verificationKp = "verification_kp" - case signingKp = "signing_kp" - case digestAlgorithm = "digest_algorithm" - case signatureAlgorithm = "signature_algorithm" - case temporaryUserDeleteAfter = "temporary_user_delete_after" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(preAuthenticationFlow, forKey: .preAuthenticationFlow) - try container.encodeIfPresent(issuer, forKey: .issuer) - try container.encode(ssoUrl, forKey: .ssoUrl) - try container.encodeIfPresent(sloUrl, forKey: .sloUrl) - try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) - try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) - try container.encodeIfPresent(bindingType, forKey: .bindingType) - try container.encodeIfPresent(verificationKp, forKey: .verificationKp) - try container.encodeIfPresent(signingKp, forKey: .signingKp) - try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) - try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) - try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SCIMMapping.swift b/authentikClient/Classes/OpenAPIs/Models/SCIMMapping.swift deleted file mode 100644 index 68c10a6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SCIMMapping.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// SCIMMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMMapping Serializer */ -public struct SCIMMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Get object's component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - - public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { - self.pk = pk - self.managed = managed - self.name = name - self.expression = expression - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case name - case expression - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SCIMMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SCIMMappingRequest.swift deleted file mode 100644 index 9b6166c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SCIMMappingRequest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// SCIMMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMMapping Serializer */ -public struct SCIMMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - - public init(managed: String? = nil, name: String, expression: String) { - self.managed = managed - self.name = name - self.expression = expression - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SCIMProvider.swift b/authentikClient/Classes/OpenAPIs/Models/SCIMProvider.swift deleted file mode 100644 index 73d6edd..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SCIMProvider.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// SCIMProvider.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMProvider Serializer */ -public struct SCIMProvider: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Internal application name, used in URLs. */ - public var assignedBackchannelApplicationSlug: String - /** Application's display Name. */ - public var assignedBackchannelApplicationName: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Base URL to SCIM requests, usually ends in /v2 */ - public var url: String - /** Authentication token */ - public var token: String - public var excludeUsersServiceAccount: Bool? - public var filterGroup: UUID? - - public init(pk: Int, name: String, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, component: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, url: String, token: String, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { - self.pk = pk - self.name = name - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - self.component = component - self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug - self.assignedBackchannelApplicationName = assignedBackchannelApplicationName - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.url = url - self.token = token - self.excludeUsersServiceAccount = excludeUsersServiceAccount - self.filterGroup = filterGroup - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - case component - case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" - case assignedBackchannelApplicationName = "assigned_backchannel_application_name" - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case url - case token - case excludeUsersServiceAccount = "exclude_users_service_account" - case filterGroup = "filter_group" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - try container.encode(component, forKey: .component) - try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) - try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(url, forKey: .url) - try container.encode(token, forKey: .token) - try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) - try container.encodeIfPresent(filterGroup, forKey: .filterGroup) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SCIMProviderRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SCIMProviderRequest.swift deleted file mode 100644 index 0354174..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SCIMProviderRequest.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// SCIMProviderRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SCIMProvider Serializer */ -public struct SCIMProviderRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var propertyMappings: [UUID]? - /** Property mappings used for group creation/updating. */ - public var propertyMappingsGroup: [UUID]? - /** Base URL to SCIM requests, usually ends in /v2 */ - public var url: String - /** Authentication token */ - public var token: String - public var excludeUsersServiceAccount: Bool? - public var filterGroup: UUID? - - public init(name: String, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, url: String, token: String, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { - self.name = name - self.propertyMappings = propertyMappings - self.propertyMappingsGroup = propertyMappingsGroup - self.url = url - self.token = token - self.excludeUsersServiceAccount = excludeUsersServiceAccount - self.filterGroup = filterGroup - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case propertyMappings = "property_mappings" - case propertyMappingsGroup = "property_mappings_group" - case url - case token - case excludeUsersServiceAccount = "exclude_users_service_account" - case filterGroup = "filter_group" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) - try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) - try container.encode(url, forKey: .url) - try container.encode(token, forKey: .token) - try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) - try container.encodeIfPresent(filterGroup, forKey: .filterGroup) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SMSDevice.swift b/authentikClient/Classes/OpenAPIs/Models/SMSDevice.swift deleted file mode 100644 index 3ad1aa8..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SMSDevice.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// SMSDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for sms authenticator devices */ -public struct SMSDevice: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - public var pk: Int - public var phoneNumber: String - - public init(name: String, pk: Int, phoneNumber: String) { - self.name = name - self.pk = pk - self.phoneNumber = phoneNumber - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case pk - case phoneNumber = "phone_number" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(pk, forKey: .pk) - try container.encode(phoneNumber, forKey: .phoneNumber) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SMSDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SMSDeviceRequest.swift deleted file mode 100644 index 485abb7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SMSDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// SMSDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for sms authenticator devices */ -public struct SMSDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ScopeMapping.swift b/authentikClient/Classes/OpenAPIs/Models/ScopeMapping.swift deleted file mode 100644 index 3cbd104..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ScopeMapping.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// ScopeMapping.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ScopeMapping Serializer */ -public struct ScopeMapping: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Get object's component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - /** Scope name requested by the client */ - public var scopeName: String - /** Description shown to the user when consenting. If left empty, the user won't be informed. */ - public var description: String? - - public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, scopeName: String, description: String? = nil) { - self.pk = pk - self.managed = managed - self.name = name - self.expression = expression - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.scopeName = scopeName - self.description = description - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case name - case expression - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case scopeName = "scope_name" - case description - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encode(scopeName, forKey: .scopeName) - try container.encodeIfPresent(description, forKey: .description) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ScopeMappingRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ScopeMappingRequest.swift deleted file mode 100644 index bc0cbcb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ScopeMappingRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// ScopeMappingRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ScopeMapping Serializer */ -public struct ScopeMappingRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var name: String - public var expression: String - /** Scope name requested by the client */ - public var scopeName: String - /** Description shown to the user when consenting. If left empty, the user won't be informed. */ - public var description: String? - - public init(managed: String? = nil, name: String, expression: String, scopeName: String, description: String? = nil) { - self.managed = managed - self.name = name - self.expression = expression - self.scopeName = scopeName - self.description = description - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case name - case expression - case scopeName = "scope_name" - case description - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(name, forKey: .name) - try container.encode(expression, forKey: .expression) - try container.encode(scopeName, forKey: .scopeName) - try container.encodeIfPresent(description, forKey: .description) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SelectableStage.swift b/authentikClient/Classes/OpenAPIs/Models/SelectableStage.swift deleted file mode 100644 index 71c1ecc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SelectableStage.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// SelectableStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for stages which can be selected by users */ -public struct SelectableStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - public var verboseName: String - public var metaModelName: String - - public init(pk: UUID, name: String, verboseName: String, metaModelName: String) { - self.pk = pk - self.name = name - self.verboseName = verboseName - self.metaModelName = metaModelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case verboseName = "verbose_name" - case metaModelName = "meta_model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(metaModelName, forKey: .metaModelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ServiceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/ServiceConnection.swift deleted file mode 100644 index dd798c9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ServiceConnection.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// ServiceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ServiceConnection Serializer */ -public struct ServiceConnection: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - /** Return component used to edit this object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - - public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { - self.pk = pk - self.name = name - self.local = local - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case local - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionRequest.swift deleted file mode 100644 index 07833a7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionRequest.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// ServiceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** ServiceConnection Serializer */ -public struct ServiceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** If enabled, use the local connection. Required Docker socket/Kubernetes Integration */ - public var local: Bool? - - public init(name: String, local: Bool? = nil) { - self.name = name - self.local = local - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case local - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(local, forKey: .local) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionState.swift b/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionState.swift deleted file mode 100644 index 74c11e9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ServiceConnectionState.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// ServiceConnectionState.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for Service connection state */ -public struct ServiceConnectionState: Codable, JSONEncodable, Hashable { - - public var healthy: Bool - public var version: String - - public init(healthy: Bool, version: String) { - self.healthy = healthy - self.version = version - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case healthy - case version - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(healthy, forKey: .healthy) - try container.encode(version, forKey: .version) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SessionUser.swift b/authentikClient/Classes/OpenAPIs/Models/SessionUser.swift deleted file mode 100644 index d7d7004..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SessionUser.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// SessionUser.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Response for the /user/me endpoint, returns the currently active user (as `user` property) and, if this user is being impersonated, the original user in the `original` property. */ -public struct SessionUser: Codable, JSONEncodable, Hashable { - - public var user: UserSelf - public var original: UserSelf? - - public init(user: UserSelf, original: UserSelf? = nil) { - self.user = user - self.original = original - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case original - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(user, forKey: .user) - try container.encodeIfPresent(original, forKey: .original) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SeverityEnum.swift b/authentikClient/Classes/OpenAPIs/Models/SeverityEnum.swift deleted file mode 100644 index 28a30ad..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SeverityEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// SeverityEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `notice` - Notice * `warning` - Warning * `alert` - Alert */ -public enum SeverityEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case notice = "notice" - case warning = "warning" - case alert = "alert" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/ShellChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/ShellChallenge.swift deleted file mode 100644 index 66b0fe0..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ShellChallenge.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// ShellChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** challenge type to render HTML as-is */ -public struct ShellChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "xak-flow-shell" - public var responseErrors: [String: [ErrorDetail]]? - public var body: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "xak-flow-shell", responseErrors: [String: [ErrorDetail]]? = nil, body: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.body = body - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case body - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(body, forKey: .body) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SignatureAlgorithmEnum.swift b/authentikClient/Classes/OpenAPIs/Models/SignatureAlgorithmEnum.swift deleted file mode 100644 index c5cfde2..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SignatureAlgorithmEnum.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SignatureAlgorithmEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 */ -public enum SignatureAlgorithmEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _200009xmldsigHashRsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" - case _200104xmldsigMoreHashRsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" - case _200104xmldsigMoreHashRsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" - case _200104xmldsigMoreHashRsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" - case _200009xmldsigHashDsaSha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Source.swift b/authentikClient/Classes/OpenAPIs/Models/Source.swift deleted file mode 100644 index cc8f331..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Source.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// Source.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Source Serializer */ -public struct Source: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - /** Get object component so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var userPathTemplate: String? - /** Get the URL to the Icon. If the name is /static or starts with http it is returned as-is */ - public var icon: String? - - public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?) { - self.pk = pk - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.managed = managed - self.userPathTemplate = userPathTemplate - self.icon = icon - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case managed - case userPathTemplate = "user_path_template" - case icon - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encode(managed, forKey: .managed) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - try container.encode(icon, forKey: .icon) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SourceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/SourceRequest.swift deleted file mode 100644 index cd1ea4b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SourceRequest.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// SourceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Source Serializer */ -public struct SourceRequest: Codable, JSONEncodable, Hashable { - - /** Source's display Name. */ - public var name: String - /** Internal source name, used in URLs. */ - public var slug: String - public var enabled: Bool? - /** Flow to use when authenticating existing users. */ - public var authenticationFlow: UUID? - /** Flow to use when enrolling new users. */ - public var enrollmentFlow: UUID? - public var policyEngineMode: PolicyEngineMode? - /** How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ - public var userMatchingMode: UserMatchingModeEnum? - public var userPathTemplate: String? - - public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil) { - self.name = name - self.slug = slug - self.enabled = enabled - self.authenticationFlow = authenticationFlow - self.enrollmentFlow = enrollmentFlow - self.policyEngineMode = policyEngineMode - self.userMatchingMode = userMatchingMode - self.userPathTemplate = userPathTemplate - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case enabled - case authenticationFlow = "authentication_flow" - case enrollmentFlow = "enrollment_flow" - case policyEngineMode = "policy_engine_mode" - case userMatchingMode = "user_matching_mode" - case userPathTemplate = "user_path_template" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) - try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) - try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) - try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SourceType.swift b/authentikClient/Classes/OpenAPIs/Models/SourceType.swift deleted file mode 100644 index 1c0542b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SourceType.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// SourceType.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for SourceType */ -public struct SourceType: Codable, JSONEncodable, Hashable { - - public var name: String - public var slug: String - public var urlsCustomizable: Bool - public var requestTokenUrl: String? - public var authorizationUrl: String? - public var accessTokenUrl: String? - public var profileUrl: String? - public var oidcWellKnownUrl: String? - public var oidcJwksUrl: String? - - public init(name: String, slug: String, urlsCustomizable: Bool, requestTokenUrl: String?, authorizationUrl: String?, accessTokenUrl: String?, profileUrl: String?, oidcWellKnownUrl: String?, oidcJwksUrl: String?) { - self.name = name - self.slug = slug - self.urlsCustomizable = urlsCustomizable - self.requestTokenUrl = requestTokenUrl - self.authorizationUrl = authorizationUrl - self.accessTokenUrl = accessTokenUrl - self.profileUrl = profileUrl - self.oidcWellKnownUrl = oidcWellKnownUrl - self.oidcJwksUrl = oidcJwksUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case slug - case urlsCustomizable = "urls_customizable" - case requestTokenUrl = "request_token_url" - case authorizationUrl = "authorization_url" - case accessTokenUrl = "access_token_url" - case profileUrl = "profile_url" - case oidcWellKnownUrl = "oidc_well_known_url" - case oidcJwksUrl = "oidc_jwks_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) - try container.encode(urlsCustomizable, forKey: .urlsCustomizable) - try container.encode(requestTokenUrl, forKey: .requestTokenUrl) - try container.encode(authorizationUrl, forKey: .authorizationUrl) - try container.encode(accessTokenUrl, forKey: .accessTokenUrl) - try container.encode(profileUrl, forKey: .profileUrl) - try container.encode(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) - try container.encode(oidcJwksUrl, forKey: .oidcJwksUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SpBindingEnum.swift b/authentikClient/Classes/OpenAPIs/Models/SpBindingEnum.swift deleted file mode 100644 index 2bd1577..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SpBindingEnum.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SpBindingEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `redirect` - Redirect * `post` - Post */ -public enum SpBindingEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case redirect = "redirect" - case post = "post" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Stage.swift b/authentikClient/Classes/OpenAPIs/Models/Stage.swift deleted file mode 100644 index 3e29507..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Stage.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Stage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stage Serializer */ -public struct Stage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StagePrompt.swift b/authentikClient/Classes/OpenAPIs/Models/StagePrompt.swift deleted file mode 100644 index 08be092..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StagePrompt.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// StagePrompt.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for a single Prompt field */ -public struct StagePrompt: Codable, JSONEncodable, Hashable { - - public var fieldKey: String - public var label: String - public var type: PromptTypeEnum - public var _required: Bool - public var placeholder: String - public var initialValue: String - public var order: Int - public var subText: String - public var choices: [String]? - - public init(fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool, placeholder: String, initialValue: String, order: Int, subText: String, choices: [String]?) { - self.fieldKey = fieldKey - self.label = label - self.type = type - self._required = _required - self.placeholder = placeholder - self.initialValue = initialValue - self.order = order - self.subText = subText - self.choices = choices - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case fieldKey = "field_key" - case label - case type - case _required = "required" - case placeholder - case initialValue = "initial_value" - case order - case subText = "sub_text" - case choices - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(fieldKey, forKey: .fieldKey) - try container.encode(label, forKey: .label) - try container.encode(type, forKey: .type) - try container.encode(_required, forKey: ._required) - try container.encode(placeholder, forKey: .placeholder) - try container.encode(initialValue, forKey: .initialValue) - try container.encode(order, forKey: .order) - try container.encode(subText, forKey: .subText) - try container.encode(choices, forKey: .choices) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/StageRequest.swift deleted file mode 100644 index 59b773c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StageRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// StageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Stage Serializer */ -public struct StageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - - public init(name: String, flowSet: [FlowSetRequest]? = nil) { - self.name = name - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StaticDevice.swift b/authentikClient/Classes/OpenAPIs/Models/StaticDevice.swift deleted file mode 100644 index feafd1b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StaticDevice.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// StaticDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for static authenticator devices */ -public struct StaticDevice: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - public var tokenSet: [StaticDeviceToken] - public var pk: Int - - public init(name: String, tokenSet: [StaticDeviceToken], pk: Int) { - self.name = name - self.tokenSet = tokenSet - self.pk = pk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case tokenSet = "token_set" - case pk - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(tokenSet, forKey: .tokenSet) - try container.encode(pk, forKey: .pk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/StaticDeviceRequest.swift deleted file mode 100644 index d1253c4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// StaticDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for static authenticator devices */ -public struct StaticDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceToken.swift b/authentikClient/Classes/OpenAPIs/Models/StaticDeviceToken.swift deleted file mode 100644 index 7c768c5..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceToken.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// StaticDeviceToken.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for static device's tokens */ -public struct StaticDeviceToken: Codable, JSONEncodable, Hashable { - - public var token: String - - public init(token: String) { - self.token = token - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case token - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(token, forKey: .token) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceTokenRequest.swift b/authentikClient/Classes/OpenAPIs/Models/StaticDeviceTokenRequest.swift deleted file mode 100644 index 0c6fc9b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/StaticDeviceTokenRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// StaticDeviceTokenRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for static device's tokens */ -public struct StaticDeviceTokenRequest: Codable, JSONEncodable, Hashable { - - public var token: String - - public init(token: String) { - self.token = token - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case token - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(token, forKey: .token) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/System.swift b/authentikClient/Classes/OpenAPIs/Models/System.swift deleted file mode 100644 index 28c3d6b..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/System.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// System.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get system information. */ -public struct System: Codable, JSONEncodable, Hashable { - - /** Get HTTP Request headers */ - public var httpHeaders: [String: String] - /** Get HTTP host */ - public var httpHost: String - /** Get HTTP Secure flag */ - public var httpIsSecure: Bool - public var runtime: SystemRuntime - /** Currently active tenant */ - public var tenant: String - /** Current server time */ - public var serverTime: Date - /** Get the FQDN configured on the embedded outpost */ - public var embeddedOutpostHost: String - - public init(httpHeaders: [String: String], httpHost: String, httpIsSecure: Bool, runtime: SystemRuntime, tenant: String, serverTime: Date, embeddedOutpostHost: String) { - self.httpHeaders = httpHeaders - self.httpHost = httpHost - self.httpIsSecure = httpIsSecure - self.runtime = runtime - self.tenant = tenant - self.serverTime = serverTime - self.embeddedOutpostHost = embeddedOutpostHost - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case httpHeaders = "http_headers" - case httpHost = "http_host" - case httpIsSecure = "http_is_secure" - case runtime - case tenant - case serverTime = "server_time" - case embeddedOutpostHost = "embedded_outpost_host" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(httpHeaders, forKey: .httpHeaders) - try container.encode(httpHost, forKey: .httpHost) - try container.encode(httpIsSecure, forKey: .httpIsSecure) - try container.encode(runtime, forKey: .runtime) - try container.encode(tenant, forKey: .tenant) - try container.encode(serverTime, forKey: .serverTime) - try container.encode(embeddedOutpostHost, forKey: .embeddedOutpostHost) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SystemInfo.swift b/authentikClient/Classes/OpenAPIs/Models/SystemInfo.swift deleted file mode 100644 index 4fa0fe3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SystemInfo.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// SystemInfo.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get system information. */ -public struct SystemInfo: Codable, JSONEncodable, Hashable { - - /** Get HTTP Request headers */ - public var httpHeaders: [String: String] - /** Get HTTP host */ - public var httpHost: String - /** Get HTTP Secure flag */ - public var httpIsSecure: Bool - public var runtime: SystemInfoRuntime - /** Currently active tenant */ - public var tenant: String - /** Current server time */ - public var serverTime: Date - /** Get the FQDN configured on the embedded outpost */ - public var embeddedOutpostHost: String - - public init(httpHeaders: [String: String], httpHost: String, httpIsSecure: Bool, runtime: SystemInfoRuntime, tenant: String, serverTime: Date, embeddedOutpostHost: String) { - self.httpHeaders = httpHeaders - self.httpHost = httpHost - self.httpIsSecure = httpIsSecure - self.runtime = runtime - self.tenant = tenant - self.serverTime = serverTime - self.embeddedOutpostHost = embeddedOutpostHost - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case httpHeaders = "http_headers" - case httpHost = "http_host" - case httpIsSecure = "http_is_secure" - case runtime - case tenant - case serverTime = "server_time" - case embeddedOutpostHost = "embedded_outpost_host" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(httpHeaders, forKey: .httpHeaders) - try container.encode(httpHost, forKey: .httpHost) - try container.encode(httpIsSecure, forKey: .httpIsSecure) - try container.encode(runtime, forKey: .runtime) - try container.encode(tenant, forKey: .tenant) - try container.encode(serverTime, forKey: .serverTime) - try container.encode(embeddedOutpostHost, forKey: .embeddedOutpostHost) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SystemInfoRuntime.swift b/authentikClient/Classes/OpenAPIs/Models/SystemInfoRuntime.swift deleted file mode 100644 index 46c2305..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SystemInfoRuntime.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// SystemInfoRuntime.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get versions */ -public struct SystemInfoRuntime: Codable, JSONEncodable, Hashable { - - public var pythonVersion: String - public var gunicornVersion: String - public var environment: String - public var architecture: String - public var platform: String - public var uname: String - - public init(pythonVersion: String, gunicornVersion: String, environment: String, architecture: String, platform: String, uname: String) { - self.pythonVersion = pythonVersion - self.gunicornVersion = gunicornVersion - self.environment = environment - self.architecture = architecture - self.platform = platform - self.uname = uname - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pythonVersion = "python_version" - case gunicornVersion = "gunicorn_version" - case environment - case architecture - case platform - case uname - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pythonVersion, forKey: .pythonVersion) - try container.encode(gunicornVersion, forKey: .gunicornVersion) - try container.encode(environment, forKey: .environment) - try container.encode(architecture, forKey: .architecture) - try container.encode(platform, forKey: .platform) - try container.encode(uname, forKey: .uname) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/SystemRuntime.swift b/authentikClient/Classes/OpenAPIs/Models/SystemRuntime.swift deleted file mode 100644 index 97ab38f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/SystemRuntime.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// SystemRuntime.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get versions */ -public struct SystemRuntime: Codable, JSONEncodable, Hashable { - - public var pythonVersion: String - public var gunicornVersion: String - public var environment: String - public var architecture: String - public var platform: String - public var uname: String - - public init(pythonVersion: String, gunicornVersion: String, environment: String, architecture: String, platform: String, uname: String) { - self.pythonVersion = pythonVersion - self.gunicornVersion = gunicornVersion - self.environment = environment - self.architecture = architecture - self.platform = platform - self.uname = uname - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pythonVersion = "python_version" - case gunicornVersion = "gunicorn_version" - case environment - case architecture - case platform - case uname - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pythonVersion, forKey: .pythonVersion) - try container.encode(gunicornVersion, forKey: .gunicornVersion) - try container.encode(environment, forKey: .environment) - try container.encode(architecture, forKey: .architecture) - try container.encode(platform, forKey: .platform) - try container.encode(uname, forKey: .uname) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TOTPDevice.swift b/authentikClient/Classes/OpenAPIs/Models/TOTPDevice.swift deleted file mode 100644 index 73c79a6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TOTPDevice.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// TOTPDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for totp authenticator devices */ -public struct TOTPDevice: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - public var pk: Int - - public init(name: String, pk: Int) { - self.name = name - self.pk = pk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case pk - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(pk, forKey: .pk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TOTPDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/TOTPDeviceRequest.swift deleted file mode 100644 index 9a106bd..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TOTPDeviceRequest.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TOTPDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for totp authenticator devices */ -public struct TOTPDeviceRequest: Codable, JSONEncodable, Hashable { - - /** The human-readable name of this device. */ - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Task.swift b/authentikClient/Classes/OpenAPIs/Models/Task.swift deleted file mode 100644 index c75e3e6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Task.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// Task.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serialize TaskInfo and TaskResult */ -public struct Task: Codable, JSONEncodable, Hashable { - - public var taskName: String - public var taskDescription: String - public var taskFinishTimestamp: Date - /** Get the duration a task took to run */ - public var taskDuration: Int - public var status: TaskStatusEnum - public var messages: [AnyCodable] - - public init(taskName: String, taskDescription: String, taskFinishTimestamp: Date, taskDuration: Int, status: TaskStatusEnum, messages: [AnyCodable]) { - self.taskName = taskName - self.taskDescription = taskDescription - self.taskFinishTimestamp = taskFinishTimestamp - self.taskDuration = taskDuration - self.status = status - self.messages = messages - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case taskName = "task_name" - case taskDescription = "task_description" - case taskFinishTimestamp = "task_finish_timestamp" - case taskDuration = "task_duration" - case status - case messages - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(taskName, forKey: .taskName) - try container.encode(taskDescription, forKey: .taskDescription) - try container.encode(taskFinishTimestamp, forKey: .taskFinishTimestamp) - try container.encode(taskDuration, forKey: .taskDuration) - try container.encode(status, forKey: .status) - try container.encode(messages, forKey: .messages) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TaskStatusEnum.swift b/authentikClient/Classes/OpenAPIs/Models/TaskStatusEnum.swift deleted file mode 100644 index d62a950..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TaskStatusEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// TaskStatusEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `SUCCESSFUL` - SUCCESSFUL * `WARNING` - WARNING * `ERROR` - ERROR * `UNKNOWN` - UNKNOWN */ -public enum TaskStatusEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case successful = "SUCCESSFUL" - case warning = "WARNING" - case error = "ERROR" - case unknown = "UNKNOWN" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/Tenant.swift b/authentikClient/Classes/OpenAPIs/Models/Tenant.swift deleted file mode 100644 index 88f67b9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Tenant.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// Tenant.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Tenant Serializer */ -public struct Tenant: Codable, JSONEncodable, Hashable { - - public var tenantUuid: UUID - /** Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` */ - public var domain: String - public var _default: Bool? - public var brandingTitle: String? - public var brandingLogo: String? - public var brandingFavicon: String? - public var flowAuthentication: UUID? - public var flowInvalidation: UUID? - public var flowRecovery: UUID? - public var flowUnenrollment: UUID? - public var flowUserSettings: UUID? - public var flowDeviceCode: UUID? - /** Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). */ - public var eventRetention: String? - /** Web Certificate used by the authentik Core webserver. */ - public var webCertificate: UUID? - public var attributes: [String: AnyCodable]? - - public init(tenantUuid: UUID, domain: String, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { - self.tenantUuid = tenantUuid - self.domain = domain - self._default = _default - self.brandingTitle = brandingTitle - self.brandingLogo = brandingLogo - self.brandingFavicon = brandingFavicon - self.flowAuthentication = flowAuthentication - self.flowInvalidation = flowInvalidation - self.flowRecovery = flowRecovery - self.flowUnenrollment = flowUnenrollment - self.flowUserSettings = flowUserSettings - self.flowDeviceCode = flowDeviceCode - self.eventRetention = eventRetention - self.webCertificate = webCertificate - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case tenantUuid = "tenant_uuid" - case domain - case _default = "default" - case brandingTitle = "branding_title" - case brandingLogo = "branding_logo" - case brandingFavicon = "branding_favicon" - case flowAuthentication = "flow_authentication" - case flowInvalidation = "flow_invalidation" - case flowRecovery = "flow_recovery" - case flowUnenrollment = "flow_unenrollment" - case flowUserSettings = "flow_user_settings" - case flowDeviceCode = "flow_device_code" - case eventRetention = "event_retention" - case webCertificate = "web_certificate" - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(tenantUuid, forKey: .tenantUuid) - try container.encode(domain, forKey: .domain) - try container.encodeIfPresent(_default, forKey: ._default) - try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) - try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) - try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) - try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) - try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) - try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) - try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) - try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) - try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) - try container.encodeIfPresent(eventRetention, forKey: .eventRetention) - try container.encodeIfPresent(webCertificate, forKey: .webCertificate) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TenantRequest.swift b/authentikClient/Classes/OpenAPIs/Models/TenantRequest.swift deleted file mode 100644 index b5fa732..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TenantRequest.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// TenantRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Tenant Serializer */ -public struct TenantRequest: Codable, JSONEncodable, Hashable { - - /** Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` */ - public var domain: String - public var _default: Bool? - public var brandingTitle: String? - public var brandingLogo: String? - public var brandingFavicon: String? - public var flowAuthentication: UUID? - public var flowInvalidation: UUID? - public var flowRecovery: UUID? - public var flowUnenrollment: UUID? - public var flowUserSettings: UUID? - public var flowDeviceCode: UUID? - /** Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). */ - public var eventRetention: String? - /** Web Certificate used by the authentik Core webserver. */ - public var webCertificate: UUID? - public var attributes: [String: AnyCodable]? - - public init(domain: String, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { - self.domain = domain - self._default = _default - self.brandingTitle = brandingTitle - self.brandingLogo = brandingLogo - self.brandingFavicon = brandingFavicon - self.flowAuthentication = flowAuthentication - self.flowInvalidation = flowInvalidation - self.flowRecovery = flowRecovery - self.flowUnenrollment = flowUnenrollment - self.flowUserSettings = flowUserSettings - self.flowDeviceCode = flowDeviceCode - self.eventRetention = eventRetention - self.webCertificate = webCertificate - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case domain - case _default = "default" - case brandingTitle = "branding_title" - case brandingLogo = "branding_logo" - case brandingFavicon = "branding_favicon" - case flowAuthentication = "flow_authentication" - case flowInvalidation = "flow_invalidation" - case flowRecovery = "flow_recovery" - case flowUnenrollment = "flow_unenrollment" - case flowUserSettings = "flow_user_settings" - case flowDeviceCode = "flow_device_code" - case eventRetention = "event_retention" - case webCertificate = "web_certificate" - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(domain, forKey: .domain) - try container.encodeIfPresent(_default, forKey: ._default) - try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) - try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) - try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) - try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) - try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) - try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) - try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) - try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) - try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) - try container.encodeIfPresent(eventRetention, forKey: .eventRetention) - try container.encodeIfPresent(webCertificate, forKey: .webCertificate) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Token.swift b/authentikClient/Classes/OpenAPIs/Models/Token.swift deleted file mode 100644 index 69ccb6c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Token.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// Token.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Token Serializer */ -public struct Token: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var identifier: String - public var intent: IntentEnum? - public var user: Int? - public var userObj: User - public var description: String? - public var expires: Date? - public var expiring: Bool? - - public init(pk: UUID, managed: String? = nil, identifier: String, intent: IntentEnum? = nil, user: Int? = nil, userObj: User, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { - self.pk = pk - self.managed = managed - self.identifier = identifier - self.intent = intent - self.user = user - self.userObj = userObj - self.description = description - self.expires = expires - self.expiring = expiring - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case managed - case identifier - case intent - case user - case userObj = "user_obj" - case description - case expires - case expiring - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(identifier, forKey: .identifier) - try container.encodeIfPresent(intent, forKey: .intent) - try container.encodeIfPresent(user, forKey: .user) - try container.encode(userObj, forKey: .userObj) - try container.encodeIfPresent(description, forKey: .description) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(expiring, forKey: .expiring) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TokenModel.swift b/authentikClient/Classes/OpenAPIs/Models/TokenModel.swift deleted file mode 100644 index 12fde52..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TokenModel.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// TokenModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for BaseGrantModel and RefreshToken */ -public struct TokenModel: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var provider: OAuth2Provider - public var user: User - /** Check if token is expired yet. */ - public var isExpired: Bool - public var expires: Date? - public var scope: [String] - /** Get the token's id_token as JSON String */ - public var idToken: String - public var revoked: Bool? - - public init(pk: Int, provider: OAuth2Provider, user: User, isExpired: Bool, expires: Date? = nil, scope: [String], idToken: String, revoked: Bool? = nil) { - self.pk = pk - self.provider = provider - self.user = user - self.isExpired = isExpired - self.expires = expires - self.scope = scope - self.idToken = idToken - self.revoked = revoked - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case provider - case user - case isExpired = "is_expired" - case expires - case scope - case idToken = "id_token" - case revoked - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(provider, forKey: .provider) - try container.encode(user, forKey: .user) - try container.encode(isExpired, forKey: .isExpired) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encode(scope, forKey: .scope) - try container.encode(idToken, forKey: .idToken) - try container.encodeIfPresent(revoked, forKey: .revoked) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TokenRequest.swift b/authentikClient/Classes/OpenAPIs/Models/TokenRequest.swift deleted file mode 100644 index 217dc8a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TokenRequest.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// TokenRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Token Serializer */ -public struct TokenRequest: Codable, JSONEncodable, Hashable { - - /** Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. */ - public var managed: String? - public var identifier: String - public var intent: IntentEnum? - public var user: Int? - public var description: String? - public var expires: Date? - public var expiring: Bool? - - public init(managed: String? = nil, identifier: String, intent: IntentEnum? = nil, user: Int? = nil, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { - self.managed = managed - self.identifier = identifier - self.intent = intent - self.user = user - self.description = description - self.expires = expires - self.expiring = expiring - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case managed - case identifier - case intent - case user - case description - case expires - case expiring - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(managed, forKey: .managed) - try container.encode(identifier, forKey: .identifier) - try container.encodeIfPresent(intent, forKey: .intent) - try container.encodeIfPresent(user, forKey: .user) - try container.encodeIfPresent(description, forKey: .description) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encodeIfPresent(expiring, forKey: .expiring) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TokenSetKeyRequest.swift b/authentikClient/Classes/OpenAPIs/Models/TokenSetKeyRequest.swift deleted file mode 100644 index 897d340..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TokenSetKeyRequest.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// TokenSetKeyRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct TokenSetKeyRequest: Codable, JSONEncodable, Hashable { - - public var key: String - - public init(key: String) { - self.key = key - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case key - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(key, forKey: .key) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TokenView.swift b/authentikClient/Classes/OpenAPIs/Models/TokenView.swift deleted file mode 100644 index ea09d60..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TokenView.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// TokenView.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Show token's current key */ -public struct TokenView: Codable, JSONEncodable, Hashable { - - public var key: String - - public init(key: String) { - self.key = key - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case key - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(key, forKey: .key) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationRequest.swift b/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationRequest.swift deleted file mode 100644 index c27b4d3..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// TransactionApplicationRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for creating a provider and an application in one transaction */ -public struct TransactionApplicationRequest: Codable, JSONEncodable, Hashable { - - public var app: ApplicationRequest - public var providerModel: ProviderModelEnum - public var provider: ModelRequest - - public init(app: ApplicationRequest, providerModel: ProviderModelEnum, provider: ModelRequest) { - self.app = app - self.providerModel = providerModel - self.provider = provider - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case app - case providerModel = "provider_model" - case provider - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(app, forKey: .app) - try container.encode(providerModel, forKey: .providerModel) - try container.encode(provider, forKey: .provider) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationResponse.swift b/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationResponse.swift deleted file mode 100644 index 9068853..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TransactionApplicationResponse.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// TransactionApplicationResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Transactional creation response */ -public struct TransactionApplicationResponse: Codable, JSONEncodable, Hashable { - - public var applied: Bool - public var logs: [String] - - public init(applied: Bool, logs: [String]) { - self.applied = applied - self.logs = logs - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case applied - case logs - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(applied, forKey: .applied) - try container.encode(logs, forKey: .logs) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/TypeCreate.swift b/authentikClient/Classes/OpenAPIs/Models/TypeCreate.swift deleted file mode 100644 index 9c6fe20..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/TypeCreate.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// TypeCreate.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Types of an object that can be created */ -public struct TypeCreate: Codable, JSONEncodable, Hashable { - - public var name: String - public var description: String - public var component: String - public var modelName: String - - public init(name: String, description: String, component: String, modelName: String) { - self.name = name - self.description = description - self.component = component - self.modelName = modelName - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case description - case component - case modelName = "model_name" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(description, forKey: .description) - try container.encode(component, forKey: .component) - try container.encode(modelName, forKey: .modelName) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UiThemeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UiThemeEnum.swift deleted file mode 100644 index 2c58fe4..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UiThemeEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// UiThemeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `automatic` - Automatic * `light` - Light * `dark` - Dark */ -public enum UiThemeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case automatic = "automatic" - case light = "light" - case dark = "dark" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/UsedBy.swift b/authentikClient/Classes/OpenAPIs/Models/UsedBy.swift deleted file mode 100644 index 2581edc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UsedBy.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// UsedBy.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** A list of all objects referencing the queried object */ -public struct UsedBy: Codable, JSONEncodable, Hashable { - - public var app: String - public var modelName: String - public var pk: String - public var name: String - public var action: UsedByActionEnum - - public init(app: String, modelName: String, pk: String, name: String, action: UsedByActionEnum) { - self.app = app - self.modelName = modelName - self.pk = pk - self.name = name - self.action = action - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case app - case modelName = "model_name" - case pk - case name - case action - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(app, forKey: .app) - try container.encode(modelName, forKey: .modelName) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(action, forKey: .action) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UsedByActionEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UsedByActionEnum.swift deleted file mode 100644 index cb10a1e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UsedByActionEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// UsedByActionEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `CASCADE` - CASCADE * `CASCADE_MANY` - CASCADE_MANY * `SET_NULL` - SET_NULL * `SET_DEFAULT` - SET_DEFAULT */ -public enum UsedByActionEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case cascade = "CASCADE" - case cascadeMany = "CASCADE_MANY" - case setNull = "SET_NULL" - case setDefault = "SET_DEFAULT" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/User.swift b/authentikClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 43941c7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User Serializer */ -public struct User: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var isSuperuser: Bool - public var groups: [UUID]? - public var groupsObj: [UserGroup] - public var email: String? - public var avatar: String - public var attributes: [String: AnyCodable]? - public var uid: String - public var path: String? - public var type: UserTypeEnum? - public var uuid: UUID - - public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, isSuperuser: Bool, groups: [UUID]? = nil, groupsObj: [UserGroup], email: String? = nil, avatar: String, attributes: [String: AnyCodable]? = nil, uid: String, path: String? = nil, type: UserTypeEnum? = nil, uuid: UUID) { - self.pk = pk - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.isSuperuser = isSuperuser - self.groups = groups - self.groupsObj = groupsObj - self.email = email - self.avatar = avatar - self.attributes = attributes - self.uid = uid - self.path = path - self.type = type - self.uuid = uuid - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case isSuperuser = "is_superuser" - case groups - case groupsObj = "groups_obj" - case email - case avatar - case attributes - case uid - case path - case type - case uuid - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encode(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(groups, forKey: .groups) - try container.encode(groupsObj, forKey: .groupsObj) - try container.encodeIfPresent(email, forKey: .email) - try container.encode(avatar, forKey: .avatar) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encode(uid, forKey: .uid) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(type, forKey: .type) - try container.encode(uuid, forKey: .uuid) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserAccountRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserAccountRequest.swift deleted file mode 100644 index f7614dc..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserAccountRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// UserAccountRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Account adding/removing operations */ -public struct UserAccountRequest: Codable, JSONEncodable, Hashable { - - public var pk: Int - - public init(pk: Int) { - self.pk = pk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserAssignedObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/UserAssignedObjectPermission.swift deleted file mode 100644 index a2bf7ce..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserAssignedObjectPermission.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// UserAssignedObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Users assigned object permission serializer */ -public struct UserAssignedObjectPermission: Codable, JSONEncodable, Hashable { - - public var pk: Int - /** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var email: String? - public var attributes: [String: AnyCodable]? - public var uid: String - public var permissions: [UserObjectPermission] - public var isSuperuser: Bool - - public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, uid: String, permissions: [UserObjectPermission], isSuperuser: Bool) { - self.pk = pk - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.email = email - self.attributes = attributes - self.uid = uid - self.permissions = permissions - self.isSuperuser = isSuperuser - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case email - case attributes - case uid - case permissions - case isSuperuser = "is_superuser" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encodeIfPresent(email, forKey: .email) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encode(uid, forKey: .uid) - try container.encode(permissions, forKey: .permissions) - try container.encode(isSuperuser, forKey: .isSuperuser) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserConsent.swift b/authentikClient/Classes/OpenAPIs/Models/UserConsent.swift deleted file mode 100644 index fe4cd96..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserConsent.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// UserConsent.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserConsent Serializer */ -public struct UserConsent: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var expires: Date? - public var user: User - public var application: Application - public var permissions: String? = "" - - public init(pk: Int, expires: Date? = nil, user: User, application: Application, permissions: String? = "") { - self.pk = pk - self.expires = expires - self.user = user - self.application = application - self.permissions = permissions - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case expires - case user - case application - case permissions - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encodeIfPresent(expires, forKey: .expires) - try container.encode(user, forKey: .user) - try container.encode(application, forKey: .application) - try container.encodeIfPresent(permissions, forKey: .permissions) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserCreationModeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UserCreationModeEnum.swift deleted file mode 100644 index 90dd815..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserCreationModeEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// UserCreationModeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create */ -public enum UserCreationModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case neverCreate = "never_create" - case createWhenRequired = "create_when_required" - case alwaysCreate = "always_create" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/UserDeleteStage.swift b/authentikClient/Classes/OpenAPIs/Models/UserDeleteStage.swift deleted file mode 100644 index 6697b0e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserDeleteStage.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// UserDeleteStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserDeleteStage Serializer */ -public struct UserDeleteStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserDeleteStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserDeleteStageRequest.swift deleted file mode 100644 index 6e4367e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserDeleteStageRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// UserDeleteStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserDeleteStage Serializer */ -public struct UserDeleteStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - - public init(name: String, flowSet: [FlowSetRequest]? = nil) { - self.name = name - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserFieldsEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UserFieldsEnum.swift deleted file mode 100644 index ee7670c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserFieldsEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// UserFieldsEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `email` - E Mail * `username` - Username * `upn` - Upn */ -public enum UserFieldsEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case email = "email" - case username = "username" - case upn = "upn" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/UserGroup.swift b/authentikClient/Classes/OpenAPIs/Models/UserGroup.swift deleted file mode 100644 index 63a3814..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserGroup.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// UserGroup.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Simplified Group Serializer for user's groups */ -public struct UserGroup: Codable, JSONEncodable, Hashable { - - public var pk: UUID - /** Get a numerical, int32 ID for the group */ - public var numPk: Int - public var name: String - /** Users added to this group will be superusers. */ - public var isSuperuser: Bool? - public var parent: UUID? - public var parentName: String - public var attributes: [String: AnyCodable]? - - public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String, attributes: [String: AnyCodable]? = nil) { - self.pk = pk - self.numPk = numPk - self.name = name - self.isSuperuser = isSuperuser - self.parent = parent - self.parentName = parentName - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case numPk = "num_pk" - case name - case isSuperuser = "is_superuser" - case parent - case parentName = "parent_name" - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(numPk, forKey: .numPk) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(parent, forKey: .parent) - try container.encode(parentName, forKey: .parentName) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserGroupRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserGroupRequest.swift deleted file mode 100644 index 9f3a520..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserGroupRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// UserGroupRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Simplified Group Serializer for user's groups */ -public struct UserGroupRequest: Codable, JSONEncodable, Hashable { - - public var name: String - /** Users added to this group will be superusers. */ - public var isSuperuser: Bool? - public var parent: UUID? - public var attributes: [String: AnyCodable]? - - public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, attributes: [String: AnyCodable]? = nil) { - self.name = name - self.isSuperuser = isSuperuser - self.parent = parent - self.attributes = attributes - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case isSuperuser = "is_superuser" - case parent - case attributes - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) - try container.encodeIfPresent(parent, forKey: .parent) - try container.encodeIfPresent(attributes, forKey: .attributes) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLoginChallenge.swift b/authentikClient/Classes/OpenAPIs/Models/UserLoginChallenge.swift deleted file mode 100644 index 58441ae..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLoginChallenge.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// UserLoginChallenge.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Empty challenge */ -public struct UserLoginChallenge: Codable, JSONEncodable, Hashable { - - public var type: ChallengeChoices - public var flowInfo: ContextualFlowInfo? - public var component: String? = "ak-stage-user-login" - public var responseErrors: [String: [ErrorDetail]]? - public var pendingUser: String - public var pendingUserAvatar: String - - public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-user-login", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String) { - self.type = type - self.flowInfo = flowInfo - self.component = component - self.responseErrors = responseErrors - self.pendingUser = pendingUser - self.pendingUserAvatar = pendingUserAvatar - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case flowInfo = "flow_info" - case component - case responseErrors = "response_errors" - case pendingUser = "pending_user" - case pendingUserAvatar = "pending_user_avatar" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(type, forKey: .type) - try container.encodeIfPresent(flowInfo, forKey: .flowInfo) - try container.encodeIfPresent(component, forKey: .component) - try container.encodeIfPresent(responseErrors, forKey: .responseErrors) - try container.encode(pendingUser, forKey: .pendingUser) - try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLoginChallengeResponseRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserLoginChallengeResponseRequest.swift deleted file mode 100644 index cc372d6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLoginChallengeResponseRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// UserLoginChallengeResponseRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User login challenge */ -public struct UserLoginChallengeResponseRequest: Codable, JSONEncodable, Hashable { - - public var component: String? = "ak-stage-user-login" - public var rememberMe: Bool - - public init(component: String? = "ak-stage-user-login", rememberMe: Bool) { - self.component = component - self.rememberMe = rememberMe - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case component - case rememberMe = "remember_me" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(component, forKey: .component) - try container.encode(rememberMe, forKey: .rememberMe) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLoginStage.swift b/authentikClient/Classes/OpenAPIs/Models/UserLoginStage.swift deleted file mode 100644 index 4dda09a..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLoginStage.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// UserLoginStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLoginStage Serializer */ -public struct UserLoginStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - /** Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var sessionDuration: String? - /** Terminate all other sessions of the user logging in. */ - public var terminateOtherSessions: Bool? - /** Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var rememberMeOffset: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.sessionDuration = sessionDuration - self.terminateOtherSessions = terminateOtherSessions - self.rememberMeOffset = rememberMeOffset - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case sessionDuration = "session_duration" - case terminateOtherSessions = "terminate_other_sessions" - case rememberMeOffset = "remember_me_offset" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) - try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) - try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLoginStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserLoginStageRequest.swift deleted file mode 100644 index 232b0f7..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLoginStageRequest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// UserLoginStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLoginStage Serializer */ -public struct UserLoginStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - /** Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var sessionDuration: String? - /** Terminate all other sessions of the user logging in. */ - public var terminateOtherSessions: Bool? - /** Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ - public var rememberMeOffset: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { - self.name = name - self.flowSet = flowSet - self.sessionDuration = sessionDuration - self.terminateOtherSessions = terminateOtherSessions - self.rememberMeOffset = rememberMeOffset - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case sessionDuration = "session_duration" - case terminateOtherSessions = "terminate_other_sessions" - case rememberMeOffset = "remember_me_offset" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) - try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) - try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLogoutStage.swift b/authentikClient/Classes/OpenAPIs/Models/UserLogoutStage.swift deleted file mode 100644 index cc4d1be..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLogoutStage.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// UserLogoutStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLogoutStage Serializer */ -public struct UserLogoutStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserLogoutStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserLogoutStageRequest.swift deleted file mode 100644 index 37177b9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserLogoutStageRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// UserLogoutStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserLogoutStage Serializer */ -public struct UserLogoutStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - - public init(name: String, flowSet: [FlowSetRequest]? = nil) { - self.name = name - self.flowSet = flowSet - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserMetrics.swift b/authentikClient/Classes/OpenAPIs/Models/UserMetrics.swift deleted file mode 100644 index e566625..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserMetrics.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// UserMetrics.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User Metrics */ -public struct UserMetrics: Codable, JSONEncodable, Hashable { - - public var logins: [Coordinate] - public var loginsFailed: [Coordinate] - public var authorizations: [Coordinate] - - public init(logins: [Coordinate], loginsFailed: [Coordinate], authorizations: [Coordinate]) { - self.logins = logins - self.loginsFailed = loginsFailed - self.authorizations = authorizations - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case logins - case loginsFailed = "logins_failed" - case authorizations - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(logins, forKey: .logins) - try container.encode(loginsFailed, forKey: .loginsFailed) - try container.encode(authorizations, forKey: .authorizations) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnection.swift deleted file mode 100644 index ebeb5e6..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnection.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// UserOAuthSourceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct UserOAuthSourceConnection: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var user: Int - public var source: Source - public var identifier: String - - public init(pk: Int, user: Int, source: Source, identifier: String) { - self.pk = pk - self.user = user - self.source = source - self.identifier = identifier - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case user - case source - case identifier - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(user, forKey: .user) - try container.encode(source, forKey: .source) - try container.encode(identifier, forKey: .identifier) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnectionRequest.swift deleted file mode 100644 index 546b899..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserOAuthSourceConnectionRequest.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// UserOAuthSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct UserOAuthSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var user: Int - public var identifier: String - public var accessToken: String? - - public init(user: Int, identifier: String, accessToken: String? = nil) { - self.user = user - self.identifier = identifier - self.accessToken = accessToken - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case identifier - case accessToken = "access_token" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(user, forKey: .user) - try container.encode(identifier, forKey: .identifier) - try container.encodeIfPresent(accessToken, forKey: .accessToken) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserObjectPermission.swift b/authentikClient/Classes/OpenAPIs/Models/UserObjectPermission.swift deleted file mode 100644 index 5f7ad3e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserObjectPermission.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// UserObjectPermission.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User-bound object level permission */ -public struct UserObjectPermission: Codable, JSONEncodable, Hashable { - - public var id: Int - public var codename: String - public var model: String - public var appLabel: String - public var objectPk: String - public var name: String - - public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String) { - self.id = id - self.codename = codename - self.model = model - self.appLabel = appLabel - self.objectPk = objectPk - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case id - case codename - case model - case appLabel = "app_label" - case objectPk = "object_pk" - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(codename, forKey: .codename) - try container.encode(model, forKey: .model) - try container.encode(appLabel, forKey: .appLabel) - try container.encode(objectPk, forKey: .objectPk) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserPasswordSetRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserPasswordSetRequest.swift deleted file mode 100644 index 86ed3fb..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserPasswordSetRequest.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// UserPasswordSetRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct UserPasswordSetRequest: Codable, JSONEncodable, Hashable { - - public var password: String - - public init(password: String) { - self.password = password - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(password, forKey: .password) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserPath.swift b/authentikClient/Classes/OpenAPIs/Models/UserPath.swift deleted file mode 100644 index f889726..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserPath.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// UserPath.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct UserPath: Codable, JSONEncodable, Hashable { - - public var paths: [String] - - public init(paths: [String]) { - self.paths = paths - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case paths - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(paths, forKey: .paths) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserRequest.swift deleted file mode 100644 index c750c9c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserRequest.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// UserRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User Serializer */ -public struct UserRequest: Codable, JSONEncodable, Hashable { - - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool? - public var lastLogin: Date? - public var groups: [UUID]? - public var email: String? - public var attributes: [String: AnyCodable]? - public var path: String? - public var type: UserTypeEnum? - - public init(username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, groups: [UUID]? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, path: String? = nil, type: UserTypeEnum? = nil) { - self.username = username - self.name = name - self.isActive = isActive - self.lastLogin = lastLogin - self.groups = groups - self.email = email - self.attributes = attributes - self.path = path - self.type = type - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case username - case name - case isActive = "is_active" - case lastLogin = "last_login" - case groups - case email - case attributes - case path - case type - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(isActive, forKey: .isActive) - try container.encodeIfPresent(lastLogin, forKey: .lastLogin) - try container.encodeIfPresent(groups, forKey: .groups) - try container.encodeIfPresent(email, forKey: .email) - try container.encodeIfPresent(attributes, forKey: .attributes) - try container.encodeIfPresent(path, forKey: .path) - try container.encodeIfPresent(type, forKey: .type) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnection.swift deleted file mode 100644 index f27886e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnection.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// UserSAMLSourceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAML Source Serializer */ -public struct UserSAMLSourceConnection: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var user: Int - public var source: Source - public var identifier: String - - public init(pk: Int, user: Int, source: Source, identifier: String) { - self.pk = pk - self.user = user - self.source = source - self.identifier = identifier - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case user - case source - case identifier - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(user, forKey: .user) - try container.encode(source, forKey: .source) - try container.encode(identifier, forKey: .identifier) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnectionRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnectionRequest.swift deleted file mode 100644 index 534755f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSAMLSourceConnectionRequest.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// UserSAMLSourceConnectionRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** SAML Source Serializer */ -public struct UserSAMLSourceConnectionRequest: Codable, JSONEncodable, Hashable { - - public var user: Int - public var identifier: String - - public init(user: Int, identifier: String) { - self.user = user - self.identifier = identifier - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case user - case identifier - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(user, forKey: .user) - try container.encode(identifier, forKey: .identifier) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSelf.swift b/authentikClient/Classes/OpenAPIs/Models/UserSelf.swift deleted file mode 100644 index 73d2858..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSelf.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// UserSelf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** User Serializer for information a user can retrieve about themselves */ -public struct UserSelf: Codable, JSONEncodable, Hashable { - - public var pk: Int - /** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - public var username: String - /** User's display name. */ - public var name: String - /** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */ - public var isActive: Bool - public var isSuperuser: Bool - public var groups: [UserSelfGroups] - public var email: String? - public var avatar: String - public var uid: String - /** Get user settings with tenant and group settings applied */ - public var settings: [String: AnyCodable] - public var type: UserTypeEnum? - /** Get all system permissions assigned to the user */ - public var systemPermissions: [String] - - public init(pk: Int, username: String, name: String, isActive: Bool, isSuperuser: Bool, groups: [UserSelfGroups], email: String? = nil, avatar: String, uid: String, settings: [String: AnyCodable], type: UserTypeEnum? = nil, systemPermissions: [String]) { - self.pk = pk - self.username = username - self.name = name - self.isActive = isActive - self.isSuperuser = isSuperuser - self.groups = groups - self.email = email - self.avatar = avatar - self.uid = uid - self.settings = settings - self.type = type - self.systemPermissions = systemPermissions - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case username - case name - case isActive = "is_active" - case isSuperuser = "is_superuser" - case groups - case email - case avatar - case uid - case settings - case type - case systemPermissions = "system_permissions" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(username, forKey: .username) - try container.encode(name, forKey: .name) - try container.encode(isActive, forKey: .isActive) - try container.encode(isSuperuser, forKey: .isSuperuser) - try container.encode(groups, forKey: .groups) - try container.encodeIfPresent(email, forKey: .email) - try container.encode(avatar, forKey: .avatar) - try container.encode(uid, forKey: .uid) - try container.encode(settings, forKey: .settings) - try container.encodeIfPresent(type, forKey: .type) - try container.encode(systemPermissions, forKey: .systemPermissions) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSelfGroups.swift b/authentikClient/Classes/OpenAPIs/Models/UserSelfGroups.swift deleted file mode 100644 index c700e96..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSelfGroups.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// UserSelfGroups.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct UserSelfGroups: Codable, JSONEncodable, Hashable { - - public var name: String - public var pk: String - - public init(name: String, pk: String) { - self.name = name - self.pk = pk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case pk - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(pk, forKey: .pk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountRequest.swift deleted file mode 100644 index 94bdb9c..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountRequest.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// UserServiceAccountRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct UserServiceAccountRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var createGroup: Bool? = false - public var expiring: Bool? = true - /** If not provided, valid for 360 days */ - public var expires: Date? - - public init(name: String, createGroup: Bool? = false, expiring: Bool? = true, expires: Date? = nil) { - self.name = name - self.createGroup = createGroup - self.expiring = expiring - self.expires = expires - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case createGroup = "create_group" - case expiring - case expires - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(createGroup, forKey: .createGroup) - try container.encodeIfPresent(expiring, forKey: .expiring) - try container.encodeIfPresent(expires, forKey: .expires) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountResponse.swift b/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountResponse.swift deleted file mode 100644 index de3b4ef..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserServiceAccountResponse.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// UserServiceAccountResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct UserServiceAccountResponse: Codable, JSONEncodable, Hashable { - - public var username: String - public var token: String - public var userUid: String - public var userPk: Int - public var groupPk: String? - - public init(username: String, token: String, userUid: String, userPk: Int, groupPk: String? = nil) { - self.username = username - self.token = token - self.userUid = userUid - self.userPk = userPk - self.groupPk = groupPk - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case username - case token - case userUid = "user_uid" - case userPk = "user_pk" - case groupPk = "group_pk" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(username, forKey: .username) - try container.encode(token, forKey: .token) - try container.encode(userUid, forKey: .userUid) - try container.encode(userPk, forKey: .userPk) - try container.encodeIfPresent(groupPk, forKey: .groupPk) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSetting.swift b/authentikClient/Classes/OpenAPIs/Models/UserSetting.swift deleted file mode 100644 index d2a1928..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSetting.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// UserSetting.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for User settings for stages and sources */ -public struct UserSetting: Codable, JSONEncodable, Hashable { - - public var objectUid: String - public var component: String - public var title: String - public var configureUrl: String? - public var iconUrl: String? - - public init(objectUid: String, component: String, title: String, configureUrl: String? = nil, iconUrl: String? = nil) { - self.objectUid = objectUid - self.component = component - self.title = title - self.configureUrl = configureUrl - self.iconUrl = iconUrl - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case objectUid = "object_uid" - case component - case title - case configureUrl = "configure_url" - case iconUrl = "icon_url" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(objectUid, forKey: .objectUid) - try container.encode(component, forKey: .component) - try container.encode(title, forKey: .title) - try container.encodeIfPresent(configureUrl, forKey: .configureUrl) - try container.encodeIfPresent(iconUrl, forKey: .iconUrl) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserSourceConnection.swift b/authentikClient/Classes/OpenAPIs/Models/UserSourceConnection.swift deleted file mode 100644 index 10be8d9..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserSourceConnection.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// UserSourceConnection.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** OAuth Source Serializer */ -public struct UserSourceConnection: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var user: Int - public var source: Source - public var created: Date - - public init(pk: Int, user: Int, source: Source, created: Date) { - self.pk = pk - self.user = user - self.source = source - self.created = created - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case user - case source - case created - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(user, forKey: .user) - try container.encode(source, forKey: .source) - try container.encode(created, forKey: .created) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserTypeEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UserTypeEnum.swift deleted file mode 100644 index d78a986..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserTypeEnum.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// UserTypeEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account */ -public enum UserTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _internal = "internal" - case external = "external" - case serviceAccount = "service_account" - case internalServiceAccount = "internal_service_account" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/UserVerificationEnum.swift b/authentikClient/Classes/OpenAPIs/Models/UserVerificationEnum.swift deleted file mode 100644 index 68e9a50..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserVerificationEnum.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// UserVerificationEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged */ -public enum UserVerificationEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { - case _required = "required" - case preferred = "preferred" - case discouraged = "discouraged" - case unknownDefaultOpenApi = "unknown_default_open_api" -} diff --git a/authentikClient/Classes/OpenAPIs/Models/UserWriteStage.swift b/authentikClient/Classes/OpenAPIs/Models/UserWriteStage.swift deleted file mode 100644 index 25132be..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserWriteStage.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// UserWriteStage.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserWriteStage Serializer */ -public struct UserWriteStage: Codable, JSONEncodable, Hashable { - - public var pk: UUID - public var name: String - /** Get object type so that we know how to edit the object */ - public var component: String - /** Return object's verbose_name */ - public var verboseName: String - /** Return object's plural verbose_name */ - public var verboseNamePlural: String - /** Return internal model name */ - public var metaModelName: String - public var flowSet: [FlowSet]? - public var userCreationMode: UserCreationModeEnum? - /** When set, newly created users are inactive and cannot login. */ - public var createUsersAsInactive: Bool? - /** Optionally add newly created users to this group. */ - public var createUsersGroup: UUID? - public var userType: UserTypeEnum? - public var userPathTemplate: String? - - public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { - self.pk = pk - self.name = name - self.component = component - self.verboseName = verboseName - self.verboseNamePlural = verboseNamePlural - self.metaModelName = metaModelName - self.flowSet = flowSet - self.userCreationMode = userCreationMode - self.createUsersAsInactive = createUsersAsInactive - self.createUsersGroup = createUsersGroup - self.userType = userType - self.userPathTemplate = userPathTemplate - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case component - case verboseName = "verbose_name" - case verboseNamePlural = "verbose_name_plural" - case metaModelName = "meta_model_name" - case flowSet = "flow_set" - case userCreationMode = "user_creation_mode" - case createUsersAsInactive = "create_users_as_inactive" - case createUsersGroup = "create_users_group" - case userType = "user_type" - case userPathTemplate = "user_path_template" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(component, forKey: .component) - try container.encode(verboseName, forKey: .verboseName) - try container.encode(verboseNamePlural, forKey: .verboseNamePlural) - try container.encode(metaModelName, forKey: .metaModelName) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) - try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) - try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) - try container.encodeIfPresent(userType, forKey: .userType) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/UserWriteStageRequest.swift b/authentikClient/Classes/OpenAPIs/Models/UserWriteStageRequest.swift deleted file mode 100644 index fa2fcce..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/UserWriteStageRequest.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// UserWriteStageRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** UserWriteStage Serializer */ -public struct UserWriteStageRequest: Codable, JSONEncodable, Hashable { - - public var name: String - public var flowSet: [FlowSetRequest]? - public var userCreationMode: UserCreationModeEnum? - /** When set, newly created users are inactive and cannot login. */ - public var createUsersAsInactive: Bool? - /** Optionally add newly created users to this group. */ - public var createUsersGroup: UUID? - public var userType: UserTypeEnum? - public var userPathTemplate: String? - - public init(name: String, flowSet: [FlowSetRequest]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { - self.name = name - self.flowSet = flowSet - self.userCreationMode = userCreationMode - self.createUsersAsInactive = createUsersAsInactive - self.createUsersGroup = createUsersGroup - self.userType = userType - self.userPathTemplate = userPathTemplate - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case flowSet = "flow_set" - case userCreationMode = "user_creation_mode" - case createUsersAsInactive = "create_users_as_inactive" - case createUsersGroup = "create_users_group" - case userType = "user_type" - case userPathTemplate = "user_path_template" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encodeIfPresent(flowSet, forKey: .flowSet) - try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) - try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) - try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) - try container.encodeIfPresent(userType, forKey: .userType) - try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/ValidationError.swift b/authentikClient/Classes/OpenAPIs/Models/ValidationError.swift deleted file mode 100644 index 85c9a3e..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/ValidationError.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// ValidationError.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Validation Error */ -public struct ValidationError: Codable, JSONEncodable, Hashable { - - public var nonFieldErrors: [String]? - public var code: String? - - public init(nonFieldErrors: [String]? = nil, code: String? = nil) { - self.nonFieldErrors = nonFieldErrors - self.code = code - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case nonFieldErrors = "non_field_errors" - case code - } - - public var additionalProperties: [String: AnyCodable] = [:] - - public subscript(key: String) -> AnyCodable? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(nonFieldErrors, forKey: .nonFieldErrors) - try container.encodeIfPresent(code, forKey: .code) - var additionalPropertiesContainer = encoder.container(keyedBy: String.self) - try additionalPropertiesContainer.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - nonFieldErrors = try container.decodeIfPresent([String].self, forKey: .nonFieldErrors) - code = try container.decodeIfPresent(String.self, forKey: .code) - var nonAdditionalPropertyKeys = Set() - nonAdditionalPropertyKeys.insert("non_field_errors") - nonAdditionalPropertyKeys.insert("code") - let additionalPropertiesContainer = try decoder.container(keyedBy: String.self) - additionalProperties = try additionalPropertiesContainer.decodeMap(AnyCodable.self, excludedKeys: nonAdditionalPropertyKeys) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Version.swift b/authentikClient/Classes/OpenAPIs/Models/Version.swift deleted file mode 100644 index 0643136..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Version.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Version.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Get running and latest version. */ -public struct Version: Codable, JSONEncodable, Hashable { - - /** Get current version */ - public var versionCurrent: String - /** Get latest version from cache */ - public var versionLatest: String - /** Get build hash, if version is not latest or released */ - public var buildHash: String - /** Check if we're running the latest version */ - public var outdated: Bool - - public init(versionCurrent: String, versionLatest: String, buildHash: String, outdated: Bool) { - self.versionCurrent = versionCurrent - self.versionLatest = versionLatest - self.buildHash = buildHash - self.outdated = outdated - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case versionCurrent = "version_current" - case versionLatest = "version_latest" - case buildHash = "build_hash" - case outdated - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(versionCurrent, forKey: .versionCurrent) - try container.encode(versionLatest, forKey: .versionLatest) - try container.encode(buildHash, forKey: .buildHash) - try container.encode(outdated, forKey: .outdated) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/WebAuthnDevice.swift b/authentikClient/Classes/OpenAPIs/Models/WebAuthnDevice.swift deleted file mode 100644 index d9b5f51..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/WebAuthnDevice.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// WebAuthnDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for WebAuthn authenticator devices */ -public struct WebAuthnDevice: Codable, JSONEncodable, Hashable { - - public var pk: Int - public var name: String - public var createdOn: Date - - public init(pk: Int, name: String, createdOn: Date) { - self.pk = pk - self.name = name - self.createdOn = createdOn - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case pk - case name - case createdOn = "created_on" - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pk, forKey: .pk) - try container.encode(name, forKey: .name) - try container.encode(createdOn, forKey: .createdOn) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/WebAuthnDeviceRequest.swift b/authentikClient/Classes/OpenAPIs/Models/WebAuthnDeviceRequest.swift deleted file mode 100644 index 24bf049..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/WebAuthnDeviceRequest.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// WebAuthnDeviceRequest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Serializer for WebAuthn authenticator devices */ -public struct WebAuthnDeviceRequest: Codable, JSONEncodable, Hashable { - - public var name: String - - public init(name: String) { - self.name = name - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/Models/Workers.swift b/authentikClient/Classes/OpenAPIs/Models/Workers.swift deleted file mode 100644 index 642e00f..0000000 --- a/authentikClient/Classes/OpenAPIs/Models/Workers.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Workers.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct Workers: Codable, JSONEncodable, Hashable { - - public var count: Int - - public init(count: Int) { - self.count = count - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case count - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(count, forKey: .count) - } -} - diff --git a/authentikClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/authentikClient/Classes/OpenAPIs/SynchronizedDictionary.swift deleted file mode 100644 index acf7ff4..0000000 --- a/authentikClient/Classes/OpenAPIs/SynchronizedDictionary.swift +++ /dev/null @@ -1,36 +0,0 @@ -// SynchronizedDictionary.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - internal subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } -} diff --git a/authentikClient/Classes/OpenAPIs/URLSessionImplementations.swift b/authentikClient/Classes/OpenAPIs/URLSessionImplementations.swift deleted file mode 100644 index 028fbb7..0000000 --- a/authentikClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ /dev/null @@ -1,641 +0,0 @@ -// URLSessionImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if !os(macOS) -import MobileCoreServices -#endif - -public protocol URLSessionProtocol { - func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask -} - -extension URLSession: URLSessionProtocol {} - -class URLSessionRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return URLSessionRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return URLSessionDecodableRequestBuilder.self - } -} - -public typealias authentikClientAPIChallengeHandler = ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?)) - -// Store the URLSession's delegate to retain its reference -private let sessionDelegate = SessionDelegate() - -// Store the URLSession to retain its reference -private let defaultURLSession = URLSession(configuration: .default, delegate: sessionDelegate, delegateQueue: nil) - -// Store current taskDidReceiveChallenge for every URLSessionTask -private var challengeHandlerStore = SynchronizedDictionary() - -// Store current URLCredential for every URLSessionTask -private var credentialStore = SynchronizedDictionary() - -open class URLSessionRequestBuilder: RequestBuilder { - - /** - May be assigned if you want to control the authentication challenges. - */ - public var taskDidReceiveChallenge: authentikClientAPIChallengeHandler? - - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { - super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) - } - - /** - May be overridden by a subclass if you want to control the URLSession - configuration. - */ - open func createURLSession() -> URLSessionProtocol { - return defaultURLSession - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the URLRequest - configuration (e.g. to override the cache policy). - */ - open func createURLRequest(urlSession: URLSessionProtocol, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - - guard let url = URL(string: URLString) else { - throw DownloadException.requestMissingURL - } - - var originalRequest = URLRequest(url: url) - - originalRequest.httpMethod = method.rawValue - - headers.forEach { key, value in - originalRequest.setValue(value, forHTTPHeaderField: key) - } - - buildHeaders().forEach { key, value in - originalRequest.setValue(value, forHTTPHeaderField: key) - } - - let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - - return modifiedRequest - } - - @discardableResult - override open func execute(_ apiResponseQueue: DispatchQueue = authentikClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { - let urlSession = createURLSession() - - guard let xMethod = HTTPMethod(rawValue: method) else { - fatalError("Unsupported Http method - \(method)") - } - - let encoding: ParameterEncoding - - switch xMethod { - case .get, .head: - encoding = URLEncoding() - - case .options, .post, .put, .patch, .delete, .trace, .connect: - let contentType = headers["Content-Type"] ?? "application/json" - - if contentType == "application/json" { - encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { - encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { - encoding = FormURLEncoding() - } else { - fatalError("Unsupported Media Type - \(contentType)") - } - } - - do { - let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - - var taskIdentifier: Int? - let cleanupRequest = { - if let taskIdentifier = taskIdentifier { - challengeHandlerStore[taskIdentifier] = nil - credentialStore[taskIdentifier] = nil - } - } - - let dataTask = urlSession.dataTask(with: request) { data, response, error in - - if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - - taskCompletionShouldRetry(data, response, error) { shouldRetry in - - if shouldRetry { - cleanupRequest() - self.execute(apiResponseQueue, completion) - } else { - apiResponseQueue.async { - self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) - cleanupRequest() - } - } - } - } else { - apiResponseQueue.async { - self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) - cleanupRequest() - } - } - } - - if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { - onProgressReady?(dataTask.progress) - } - - taskIdentifier = dataTask.taskIdentifier - challengeHandlerStore[dataTask.taskIdentifier] = taskDidReceiveChallenge - credentialStore[dataTask.taskIdentifier] = credential - - dataTask.resume() - - requestTask.set(task: dataTask) - } catch { - apiResponseQueue.async { - completion(.failure(ErrorResponse.error(415, nil, nil, error))) - } - } - - return requestTask - } - - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { - - if let error = error { - completion(.failure(ErrorResponse.error(-1, data, response, error))) - return - } - - guard let httpResponse = response as? HTTPURLResponse else { - completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse))) - return - } - - guard httpResponse.isStatusCodeSuccessful else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) - return - } - - switch T.self { - case is Void.Type: - - completion(.success(Response(response: httpResponse, body: () as! T))) - - default: - fatalError("Unsupported Response Body Type - \(String(describing: T.self))") - } - - } - - open func buildHeaders() -> [String: String] { - var httpHeaders: [String: String] = [:] - for (key, value) in headers { - httpHeaders[key] = value - } - for (key, value) in authentikClientAPI.customHeaders { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - continue - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { - - if let error = error { - completion(.failure(ErrorResponse.error(-1, data, response, error))) - return - } - - guard let httpResponse = response as? HTTPURLResponse else { - completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse))) - return - } - - guard httpResponse.isStatusCodeSuccessful else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) - return - } - - switch T.self { - case is String.Type: - - let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - - completion(.success(Response(response: httpResponse, body: body as! T))) - - case is URL.Type: - do { - - guard error == nil else { - throw DownloadException.responseFailed - } - - guard let data = data else { - throw DownloadException.responseDataMissing - } - - let fileManager = FileManager.default - let cachesDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask)[0] - let requestURL = try getURL(from: urlRequest) - - var requestPath = try getPath(from: requestURL) - - if let headerFileName = getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } else { - requestPath = requestPath.appending("/tmp.authentikClient.\(UUID().uuidString)") - } - - let filePath = cachesDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion(.success(Response(response: httpResponse, body: filePath as! T))) - - } catch let requestParserError as DownloadException { - completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) - } catch { - completion(.failure(ErrorResponse.error(400, data, response, error))) - } - - case is Void.Type: - - completion(.success(Response(response: httpResponse, body: () as! T))) - - case is Data.Type: - - completion(.success(Response(response: httpResponse, body: data as! T))) - - default: - - guard let data = data, !data.isEmpty else { - if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) - } else { - completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) - } - return - } - - let decodeResult = CodableHelper.decode(T.self, from: data) - - switch decodeResult { - case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) - case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) - } - } - } -} - -private class SessionDelegate: NSObject, URLSessionTaskDelegate { - func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - - var credential: URLCredential? - - if let taskDidReceiveChallenge = challengeHandlerStore[task.taskIdentifier] { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = credentialStore[task.taskIdentifier] ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } -} - -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -public protocol ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest -} - -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - - var urlRequest = urlRequest - - guard let parameters = parameters else { return urlRequest } - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) - urlRequest.url = urlComponents.url - } - - return urlRequest - } -} - -private class FormDataEncoding: ParameterEncoding { - - let contentTypeForFormPart: (_ fileURL: URL) -> String? - - init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { - self.contentTypeForFormPart = contentTypeForFormPart - } - - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - - var urlRequest = urlRequest - - guard let parameters = parameters, !parameters.isEmpty else { - return urlRequest - } - - let boundary = "Boundary-\(UUID().uuidString)" - - urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") - - for (key, value) in parameters { - for value in (value as? Array ?? [value]) { - switch value { - case let fileURL as URL: - - urlRequest = try configureFileUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - fileURL: fileURL - ) - - case let string as String: - - if let data = string.data(using: .utf8) { - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - } - - case let number as NSNumber: - - if let data = number.stringValue.data(using: .utf8) { - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - } - - case let data as Data: - - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - - case let uuid as UUID: - - if let data = uuid.uuidString.data(using: .utf8) { - urlRequest = configureDataUploadRequest( - urlRequest: urlRequest, - boundary: boundary, - name: key, - data: data - ) - } - - default: - fatalError("Unprocessable value \(value) with key \(key)") - } - } - } - - var body = urlRequest.httpBody.orEmpty - - body.append("\r\n--\(boundary)--\r\n") - - urlRequest.httpBody = body - - return urlRequest - } - - private func configureFileUploadRequest(urlRequest: URLRequest, boundary: String, name: String, fileURL: URL) throws -> URLRequest { - - var urlRequest = urlRequest - - var body = urlRequest.httpBody.orEmpty - - let fileData = try Data(contentsOf: fileURL) - - let mimetype = contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) - - let fileName = fileURL.lastPathComponent - - // If we already added something then we need an additional newline. - if body.count > 0 { - body.append("\r\n") - } - - // Value boundary. - body.append("--\(boundary)\r\n") - - // Value headers. - body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(fileName)\"\r\n") - body.append("Content-Type: \(mimetype)\r\n") - - // Separate headers and body. - body.append("\r\n") - - // The value data. - body.append(fileData) - - urlRequest.httpBody = body - - return urlRequest - } - - private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { - - var urlRequest = urlRequest - - var body = urlRequest.httpBody.orEmpty - - // If we already added something then we need an additional newline. - if body.count > 0 { - body.append("\r\n") - } - - // Value boundary. - body.append("--\(boundary)\r\n") - - // Value headers. - body.append("Content-Disposition: form-data; name=\"\(name)\"\r\n") - - // Separate headers and body. - body.append("\r\n") - - // The value data. - body.append(data) - - urlRequest.httpBody = body - - return urlRequest - - } - - func mimeType(for url: URL) -> String { - let pathExtension = url.pathExtension - - if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { - if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { - return mimetype as String - } - } - return "application/octet-stream" - } - -} - -private class FormURLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - - var urlRequest = urlRequest - - var requestBodyComponents = URLComponents() - requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:]) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8) - - return urlRequest - } -} - -private extension Data { - /// Append string to Data - /// - /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8. - /// - /// - parameter string: The string to be added to the `Data`. - - mutating func append(_ string: String) { - if let data = string.data(using: .utf8) { - append(data) - } - } -} - -private extension Optional where Wrapped == Data { - var orEmpty: Data { - self ?? Data() - } -} - -extension JSONDataEncoding: ParameterEncoding {} diff --git a/authentikClient/Package.swift b/authentikClient/Package.swift new file mode 100644 index 0000000..128829d --- /dev/null +++ b/authentikClient/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "authentikClient", + platforms: [ + .iOS(.v13), + .macOS(.v10_15) + ], + products: [ + .library( + name: "authentikClient", + targets: ["authentikClient"] + ), + ], + dependencies: [.package(path: "../OpenAPITransport")], + targets: [ + .target( + name: "authentikClient", + dependencies: [.byName(name: "OpenAPITransport")], + path: "Sources" + ), + ] +) diff --git a/authentikClient/Sources/APIs/AdminAPI.swift b/authentikClient/Sources/APIs/AdminAPI.swift new file mode 100644 index 0000000..0ee306b --- /dev/null +++ b/authentikClient/Sources/APIs/AdminAPI.swift @@ -0,0 +1,714 @@ +// +// AdminAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class AdminAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum AdminAppsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminAppsListError: : \(object)" + case .code403Error(let object): + return "AdminAppsListError: : \(object)" + } + } + } + + /// - GET /admin/apps/ + /// - Read-only view list all installed apps + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[App], Error> + open func adminAppsList() -> AnyPublisher<[App], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/apps/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[App], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminAppsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminAppsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([App].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminMetricsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminMetricsRetrieveError: : \(object)" + case .code403Error(let object): + return "AdminMetricsRetrieveError: : \(object)" + } + } + } + + /// - GET /admin/metrics/ + /// - Login Metrics per 1h + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func adminMetricsRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/metrics/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminMetricsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminMetricsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LoginMetrics.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminModelsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminModelsListError: : \(object)" + case .code403Error(let object): + return "AdminModelsListError: : \(object)" + } + } + } + + /// - GET /admin/models/ + /// - Read-only view list all installed models + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[App], Error> + open func adminModelsList() -> AnyPublisher<[App], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/models/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[App], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminModelsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminModelsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([App].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminSystemCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminSystemCreateError: : \(object)" + case .code403Error(let object): + return "AdminSystemCreateError: : \(object)" + } + } + } + + /// - POST /admin/system/ + /// - Get system information. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func adminSystemCreate() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/system/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminSystemCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminSystemCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SystemInfo.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminSystemRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminSystemRetrieveError: : \(object)" + case .code403Error(let object): + return "AdminSystemRetrieveError: : \(object)" + } + } + } + + /// - GET /admin/system/ + /// - Get system information. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func adminSystemRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/system/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminSystemRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminSystemRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SystemInfo.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminSystemTasksListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminSystemTasksListError: : \(object)" + case .code403Error(let object): + return "AdminSystemTasksListError: : \(object)" + } + } + } + + /// - GET /admin/system_tasks/ + /// - List system tasks + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[Task], Error> + open func adminSystemTasksList() -> AnyPublisher<[Task], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/system_tasks/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Task], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminSystemTasksListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminSystemTasksListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Task].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminSystemTasksRetrieveError: Error, CustomStringConvertible { + // Task not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "AdminSystemTasksRetrieveError: Task not found" + case .code400Error(let object): + return "AdminSystemTasksRetrieveError: : \(object)" + case .code403Error(let object): + return "AdminSystemTasksRetrieveError: : \(object)" + } + } + } + + /// - GET /admin/system_tasks/{id}/ + /// - Get a single system task + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) + /// - returns: AnyPublisher + open func adminSystemTasksRetrieve(id: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/admin/system_tasks/{id}/" + path = path.replacingOccurrences(of: "{id}", with: id) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return AdminSystemTasksRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminSystemTasksRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminSystemTasksRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Task.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminSystemTasksRetryCreateError: Error, CustomStringConvertible { + // Task not found + case code404Error + // Failed to retry task + case code500Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "AdminSystemTasksRetryCreateError: Task not found" + case .code500Error: + return "AdminSystemTasksRetryCreateError: Failed to retry task" + case .code400Error(let object): + return "AdminSystemTasksRetryCreateError: : \(object)" + case .code403Error(let object): + return "AdminSystemTasksRetryCreateError: : \(object)" + } + } + } + + /// - POST /admin/system_tasks/{id}/retry/ + /// - Retry task + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) + /// - returns: AnyPublisher + open func adminSystemTasksRetryCreate(id: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/admin/system_tasks/{id}/retry/" + path = path.replacingOccurrences(of: "{id}", with: id) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return AdminSystemTasksRetryCreateError.code404Error + } + if transportError.statusCode == 500 { + return AdminSystemTasksRetryCreateError.code500Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminSystemTasksRetryCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminSystemTasksRetryCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminVersionRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminVersionRetrieveError: : \(object)" + case .code403Error(let object): + return "AdminVersionRetrieveError: : \(object)" + } + } + } + + /// - GET /admin/version/ + /// - Get running and latest version. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func adminVersionRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/version/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminVersionRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminVersionRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Version.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AdminWorkersRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AdminWorkersRetrieveError: : \(object)" + case .code403Error(let object): + return "AdminWorkersRetrieveError: : \(object)" + } + } + } + + /// - GET /admin/workers/ + /// - Get currently connected worker count. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func adminWorkersRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/admin/workers/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AdminWorkersRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AdminWorkersRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Workers.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/AuthenticatorsAPI.swift b/authentikClient/Sources/APIs/AuthenticatorsAPI.swift new file mode 100644 index 0000000..46574f3 --- /dev/null +++ b/authentikClient/Sources/APIs/AuthenticatorsAPI.swift @@ -0,0 +1,5618 @@ +// +// AuthenticatorsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class AuthenticatorsAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum AuthenticatorsAdminAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminAllListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminAllListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/all/ + /// - Get all devices for current user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher<[Device], Error> + open func authenticatorsAdminAllList(user: Int? = nil) -> AnyPublisher<[Device], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Device], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Device].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/duo/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter duoDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminDuoCreate(duoDeviceRequest: DuoDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/duo/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(duoDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/duo/{id}/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - returns: AnyPublisher + open func authenticatorsAdminDuoDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/duo/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/duo/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDuoDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/duo/{id}/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - parameter patchedDuoDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDuoDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/duo/{id}/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - returns: AnyPublisher + open func authenticatorsAdminDuoRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminDuoUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminDuoUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminDuoUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/duo/{id}/ + /// - Viewset for Duo authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - parameter duoDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(duoDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminDuoUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminDuoUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobileCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobileCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobileCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/mobile/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter mobileDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminMobileCreate(mobileDeviceRequest: MobileDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/mobile/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(mobileDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobileCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobileCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobileDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobileDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobileDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher + open func authenticatorsAdminMobileDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobileDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobileDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobileListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobileListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobileListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/mobile/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminMobileList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/mobile/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobileListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobileListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedMobileDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobilePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobilePartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobilePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter patchedMobileDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminMobilePartialUpdate(uuid: UUID, patchedMobileDeviceRequest: PatchedMobileDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedMobileDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobilePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobilePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobileRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobileRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobileRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher + open func authenticatorsAdminMobileRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobileRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobileRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminMobileUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminMobileUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminMobileUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminMobileUpdate(uuid: UUID, mobileDeviceRequest: MobileDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(mobileDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminMobileUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminMobileUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/sms/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sMSDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminSmsCreate(sMSDeviceRequest: SMSDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/sms/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sMSDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/sms/{id}/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - returns: AnyPublisher + open func authenticatorsAdminSmsDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/sms/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/sms/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSMSDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/sms/{id}/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - parameter patchedSMSDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSMSDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/sms/{id}/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - returns: AnyPublisher + open func authenticatorsAdminSmsRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminSmsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminSmsUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminSmsUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/sms/{id}/ + /// - Viewset for sms authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - parameter sMSDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sMSDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminSmsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminSmsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/static/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter staticDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminStaticCreate(staticDeviceRequest: StaticDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/static/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(staticDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/static/{id}/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - returns: AnyPublisher + open func authenticatorsAdminStaticDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/static/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/static/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedStaticDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/static/{id}/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - parameter patchedStaticDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedStaticDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/static/{id}/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - returns: AnyPublisher + open func authenticatorsAdminStaticRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminStaticUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminStaticUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminStaticUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/static/{id}/ + /// - Viewset for static authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - parameter staticDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(staticDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminStaticUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminStaticUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/totp/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tOTPDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminTotpCreate(tOTPDeviceRequest: TOTPDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/totp/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(tOTPDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/totp/{id}/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - returns: AnyPublisher + open func authenticatorsAdminTotpDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/totp/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/totp/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTOTPDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/totp/{id}/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - parameter patchedTOTPDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedTOTPDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/totp/{id}/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - returns: AnyPublisher + open func authenticatorsAdminTotpRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminTotpUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminTotpUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminTotpUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/totp/{id}/ + /// - Viewset for totp authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - parameter tOTPDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(tOTPDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminTotpUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminTotpUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/admin/webauthn/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter webAuthnDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnCreate(webAuthnDeviceRequest: WebAuthnDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/webauthn/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(webAuthnDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/admin/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnListError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/webauthn/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/admin/webauthn/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedWebAuthnDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/admin/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - parameter patchedWebAuthnDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedWebAuthnDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/admin/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAdminWebauthnUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAdminWebauthnUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAdminWebauthnUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/admin/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices (for admins) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - parameter webAuthnDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsAdminWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/admin/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(webAuthnDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAdminWebauthnUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsAllListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsAllListError: : \(object)" + } + } + } + + /// - GET /authenticators/all/ + /// - Get all devices for current user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[Device], Error> + open func authenticatorsAllList() -> AnyPublisher<[Device], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/all/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Device], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Device].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/duo/{id}/ + /// - Viewset for Duo authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - returns: AnyPublisher + open func authenticatorsDuoDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoListError: : \(object)" + } + } + } + + /// - GET /authenticators/duo/ + /// - Viewset for Duo authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/duo/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDuoDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/duo/{id}/ + /// - Viewset for Duo authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - parameter patchedDuoDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDuoDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/duo/{id}/ + /// - Viewset for Duo authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - returns: AnyPublisher + open func authenticatorsDuoRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/duo/{id}/ + /// - Viewset for Duo authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - parameter duoDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/duo/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(duoDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsDuoUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsDuoUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsDuoUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/duo/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Duo Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsDuoUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/duo/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsDuoUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsDuoUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileCheckInCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileCheckInCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileCheckInCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/mobile/{uuid}/check_in/ + /// - Check in data about a device + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceInfoRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsMobileCheckInCreate(uuid: UUID, mobileDeviceInfoRequest: MobileDeviceInfoRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/check_in/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(mobileDeviceInfoRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileCheckInCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileCheckInCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher + open func authenticatorsMobileDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileEnrollmentCallbackCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileEnrollmentCallbackCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileEnrollmentCallbackCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/mobile/{uuid}/enrollment_callback/ + /// - Enrollment callback + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceEnrollmentRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsMobileEnrollmentCallbackCreate(uuid: UUID, mobileDeviceEnrollmentRequest: MobileDeviceEnrollmentRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/enrollment_callback/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(mobileDeviceEnrollmentRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileEnrollmentCallbackCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileEnrollmentCallbackCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDeviceEnrollmentCallback.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileEnrollmentStatusCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileEnrollmentStatusCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileEnrollmentStatusCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/mobile/{uuid}/enrollment_status/ + /// - Check device enrollment status + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher + open func authenticatorsMobileEnrollmentStatusCreate(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/enrollment_status/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileEnrollmentStatusCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileEnrollmentStatusCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDeviceEnrollmentStatus.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileListError: : \(object)" + } + } + } + + /// - GET /authenticators/mobile/ + /// - Viewset for Mobile authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsMobileList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/mobile/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedMobileDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobilePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobilePartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobilePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter patchedMobileDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsMobilePartialUpdate(uuid: UUID, patchedMobileDeviceRequest: PatchedMobileDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedMobileDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobilePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobilePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileReceiveResponseCreateError: Error, CustomStringConvertible { + // Transaction not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "AuthenticatorsMobileReceiveResponseCreateError: Transaction not found" + case .code400Error(let object): + return "AuthenticatorsMobileReceiveResponseCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileReceiveResponseCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/mobile/{uuid}/receive_response/ + /// - Get response from notification on phone + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceResponseRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsMobileReceiveResponseCreate(uuid: UUID, mobileDeviceResponseRequest: MobileDeviceResponseRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/receive_response/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(mobileDeviceResponseRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return AuthenticatorsMobileReceiveResponseCreateError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileReceiveResponseCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileReceiveResponseCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher + open func authenticatorsMobileRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileSetNotificationKeyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileSetNotificationKeyCreateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileSetNotificationKeyCreateError: : \(object)" + } + } + } + + /// - POST /authenticators/mobile/{uuid}/set_notification_key/ + /// - Called by the phone whenever the firebase key changes and we need to update it + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceSetPushKeyRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsMobileSetNotificationKeyCreate(uuid: UUID, mobileDeviceSetPushKeyRequest: MobileDeviceSetPushKeyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/set_notification_key/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(mobileDeviceSetPushKeyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileSetNotificationKeyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileSetNotificationKeyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/mobile/{uuid}/ + /// - Viewset for Mobile authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - parameter mobileDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsMobileUpdate(uuid: UUID, mobileDeviceRequest: MobileDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(mobileDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(MobileDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsMobileUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsMobileUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsMobileUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/mobile/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Mobile Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsMobileUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/mobile/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsMobileUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsMobileUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/sms/{id}/ + /// - Viewset for sms authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - returns: AnyPublisher + open func authenticatorsSmsDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsListError: : \(object)" + } + } + } + + /// - GET /authenticators/sms/ + /// - Viewset for sms authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/sms/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSMSDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/sms/{id}/ + /// - Viewset for sms authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - parameter patchedSMSDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSMSDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/sms/{id}/ + /// - Viewset for sms authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - returns: AnyPublisher + open func authenticatorsSmsRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/sms/{id}/ + /// - Viewset for sms authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - parameter sMSDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/sms/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sMSDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SMSDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsSmsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsSmsUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsSmsUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/sms/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SMS Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsSmsUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/sms/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsSmsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsSmsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/static/{id}/ + /// - Viewset for static authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - returns: AnyPublisher + open func authenticatorsStaticDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticListError: : \(object)" + } + } + } + + /// - GET /authenticators/static/ + /// - Viewset for static authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/static/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedStaticDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/static/{id}/ + /// - Viewset for static authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - parameter patchedStaticDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedStaticDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/static/{id}/ + /// - Viewset for static authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - returns: AnyPublisher + open func authenticatorsStaticRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/static/{id}/ + /// - Viewset for static authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - parameter staticDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/static/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(staticDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(StaticDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsStaticUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsStaticUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsStaticUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/static/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Static Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsStaticUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/static/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsStaticUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsStaticUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/totp/{id}/ + /// - Viewset for totp authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - returns: AnyPublisher + open func authenticatorsTotpDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpListError: : \(object)" + } + } + } + + /// - GET /authenticators/totp/ + /// - Viewset for totp authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/totp/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTOTPDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/totp/{id}/ + /// - Viewset for totp authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - parameter patchedTOTPDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedTOTPDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/totp/{id}/ + /// - Viewset for totp authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - returns: AnyPublisher + open func authenticatorsTotpRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/totp/{id}/ + /// - Viewset for totp authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - parameter tOTPDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/totp/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(tOTPDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TOTPDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsTotpUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsTotpUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsTotpUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/totp/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this TOTP Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsTotpUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/totp/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsTotpUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsTotpUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnDestroyError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnDestroyError: : \(object)" + } + } + } + + /// - DELETE /authenticators/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - returns: AnyPublisher + open func authenticatorsWebauthnDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnListError: : \(object)" + } + } + } + + /// - GET /authenticators/webauthn/ + /// - Viewset for WebAuthn authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func authenticatorsWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/authenticators/webauthn/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedWebAuthnDeviceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnPartialUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /authenticators/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - parameter patchedWebAuthnDeviceRequest: (body) (optional) + /// - returns: AnyPublisher + open func authenticatorsWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedWebAuthnDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnRetrieveError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnRetrieveError: : \(object)" + } + } + } + + /// - GET /authenticators/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - returns: AnyPublisher + open func authenticatorsWebauthnRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnUpdateError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnUpdateError: : \(object)" + } + } + } + + /// - PUT /authenticators/webauthn/{id}/ + /// - Viewset for WebAuthn authenticator devices + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - parameter webAuthnDeviceRequest: (body) + /// - returns: AnyPublisher + open func authenticatorsWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/webauthn/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(webAuthnDeviceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(WebAuthnDevice.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum AuthenticatorsWebauthnUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "AuthenticatorsWebauthnUsedByListError: : \(object)" + case .code403Error(let object): + return "AuthenticatorsWebauthnUsedByListError: : \(object)" + } + } + } + + /// - GET /authenticators/webauthn/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this WebAuthn Device. + /// - returns: AnyPublisher<[UsedBy], Error> + open func authenticatorsWebauthnUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/authenticators/webauthn/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return AuthenticatorsWebauthnUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return AuthenticatorsWebauthnUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/CoreAPI.swift b/authentikClient/Sources/APIs/CoreAPI.swift new file mode 100644 index 0000000..fe908f9 --- /dev/null +++ b/authentikClient/Sources/APIs/CoreAPI.swift @@ -0,0 +1,4546 @@ +// +// CoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class CoreAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum CoreApplicationsCheckAccessRetrieveError: Error, CustomStringConvertible { + // for_user user not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "CoreApplicationsCheckAccessRetrieveError: for_user user not found" + case .code400Error(let object): + return "CoreApplicationsCheckAccessRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsCheckAccessRetrieveError: : \(object)" + } + } + } + + /// - GET /core/applications/{slug}/check_access/ + /// - Check access to a single application by slug + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter forUser: (query) (optional) + /// - returns: AnyPublisher + open func coreApplicationsCheckAccessRetrieve(slug: String, forUser: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/check_access/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let forUser = forUser { queryItems.append(URLQueryItem(name: "for_user", value: "\(forUser)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return CoreApplicationsCheckAccessRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsCheckAccessRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsCheckAccessRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyTestResult.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsCreateError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsCreateError: : \(object)" + } + } + } + + /// - POST /core/applications/ + /// - Application Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter applicationRequest: (body) + /// - returns: AnyPublisher + open func coreApplicationsCreate(applicationRequest: ApplicationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/applications/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(applicationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Application.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsDestroyError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/applications/{slug}/ + /// - Application Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func coreApplicationsDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsListError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsListError: : \(object)" + } + } + } + + /// - GET /core/applications/ + /// - Custom list method that checks Policy based access instead of guardian + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter group: (query) (optional) + /// - parameter metaDescription: (query) (optional) + /// - parameter metaLaunchUrl: (query) (optional) + /// - parameter metaPublisher: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter slug: (query) (optional) + /// - parameter superuserFullList: (query) (optional) + /// - returns: AnyPublisher + open func coreApplicationsList(group: String? = nil, metaDescription: String? = nil, metaLaunchUrl: String? = nil, metaPublisher: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, superuserFullList: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/applications/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let group = group { queryItems.append(URLQueryItem(name: "group", value: group)) } + if let metaDescription = metaDescription { queryItems.append(URLQueryItem(name: "meta_description", value: metaDescription)) } + if let metaLaunchUrl = metaLaunchUrl { queryItems.append(URLQueryItem(name: "meta_launch_url", value: metaLaunchUrl)) } + if let metaPublisher = metaPublisher { queryItems.append(URLQueryItem(name: "meta_publisher", value: metaPublisher)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + if let superuserFullList = superuserFullList { queryItems.append(URLQueryItem(name: "superuser_full_list", value: superuserFullList ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedApplicationList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsMetricsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsMetricsListError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsMetricsListError: : \(object)" + } + } + } + + /// - GET /core/applications/{slug}/metrics/ + /// - Metrics for application logins + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[Coordinate], Error> + open func coreApplicationsMetricsList(slug: String) -> AnyPublisher<[Coordinate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/metrics/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Coordinate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsMetricsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsMetricsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Coordinate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /core/applications/{slug}/ + /// - Application Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedApplicationRequest: (body) (optional) + /// - returns: AnyPublisher + open func coreApplicationsPartialUpdate(slug: String, patchedApplicationRequest: PatchedApplicationRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedApplicationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Application.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/applications/{slug}/ + /// - Application Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func coreApplicationsRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Application.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsSetIconCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "CoreApplicationsSetIconCreateError: Bad request" + case .code403Error(let object): + return "CoreApplicationsSetIconCreateError: : \(object)" + } + } + } + + /// - POST /core/applications/{slug}/set_icon/ + /// - Set application icon + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter file: (form) (optional) + /// - parameter clear: (form) (optional, default to false) + /// - returns: AnyPublisher + open func coreApplicationsSetIconCreate(slug: String, file: Data? = nil, clear: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/set_icon/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + let multipartBoundary = String(format: "Boundary+%08X%08X", arc4random(), arc4random()) + var multipartData = Data() + if let file = file { + let fileHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"file\"; filename=\"file\"\r\n") + .appending("\r\n") + multipartData.append(fileHeader.data(using: .utf8) ?? Data()) + multipartData.append(file) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + } + + if let clear = clear { + let clearHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"clear\"\r\n") + .appending("\r\n") + multipartData.append(clearHeader.data(using: .utf8) ?? Data()) + multipartData.append() + } + + multipartData.append("\r\n--\(multipartBoundary)--\r\n".data(using: .utf8) ?? Data()) + request.httpBody = multipartData + request.setValue("\(multipartData.count)", forHTTPHeaderField: "Content-Length") + request.setValue("multipart/form-data; boundary=\(multipartBoundary)", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return CoreApplicationsSetIconCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsSetIconCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsSetIconUrlCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "CoreApplicationsSetIconUrlCreateError: Bad request" + case .code403Error(let object): + return "CoreApplicationsSetIconUrlCreateError: : \(object)" + } + } + } + + /// - POST /core/applications/{slug}/set_icon_url/ + /// - Set application icon (as URL) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter filePathRequest: (body) + /// - returns: AnyPublisher + open func coreApplicationsSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/set_icon_url/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(filePathRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return CoreApplicationsSetIconUrlCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsSetIconUrlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsUpdateError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsUpdateError: : \(object)" + } + } + } + + /// - PUT /core/applications/{slug}/ + /// - Application Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter applicationRequest: (body) + /// - returns: AnyPublisher + open func coreApplicationsUpdate(slug: String, applicationRequest: ApplicationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(applicationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Application.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreApplicationsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreApplicationsUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreApplicationsUsedByListError: : \(object)" + } + } + } + + /// - GET /core/applications/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreApplicationsUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/applications/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreApplicationsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreApplicationsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreAuthenticatedSessionsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreAuthenticatedSessionsDestroyError: : \(object)" + case .code403Error(let object): + return "CoreAuthenticatedSessionsDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/authenticated_sessions/{uuid}/ + /// - AuthenticatedSession Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Authenticated Session. + /// - returns: AnyPublisher + open func coreAuthenticatedSessionsDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/authenticated_sessions/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreAuthenticatedSessionsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreAuthenticatedSessionsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreAuthenticatedSessionsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreAuthenticatedSessionsListError: : \(object)" + case .code403Error(let object): + return "CoreAuthenticatedSessionsListError: : \(object)" + } + } + } + + /// - GET /core/authenticated_sessions/ + /// - AuthenticatedSession Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter lastIp: (query) (optional) + /// - parameter lastUserAgent: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter userUsername: (query) (optional) + /// - returns: AnyPublisher + open func coreAuthenticatedSessionsList(lastIp: String? = nil, lastUserAgent: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/authenticated_sessions/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let lastIp = lastIp { queryItems.append(URLQueryItem(name: "last_ip", value: lastIp)) } + if let lastUserAgent = lastUserAgent { queryItems.append(URLQueryItem(name: "last_user_agent", value: lastUserAgent)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let userUsername = userUsername { queryItems.append(URLQueryItem(name: "user__username", value: userUsername)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreAuthenticatedSessionsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreAuthenticatedSessionsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatedSessionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreAuthenticatedSessionsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreAuthenticatedSessionsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreAuthenticatedSessionsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/authenticated_sessions/{uuid}/ + /// - AuthenticatedSession Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Authenticated Session. + /// - returns: AnyPublisher + open func coreAuthenticatedSessionsRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/authenticated_sessions/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreAuthenticatedSessionsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreAuthenticatedSessionsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatedSession.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreAuthenticatedSessionsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreAuthenticatedSessionsUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreAuthenticatedSessionsUsedByListError: : \(object)" + } + } + } + + /// - GET /core/authenticated_sessions/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Authenticated Session. + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreAuthenticatedSessionsUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/authenticated_sessions/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreAuthenticatedSessionsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreAuthenticatedSessionsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsAddUserCreateError: Error, CustomStringConvertible { + // User not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "CoreGroupsAddUserCreateError: User not found" + case .code400Error(let object): + return "CoreGroupsAddUserCreateError: : \(object)" + case .code403Error(let object): + return "CoreGroupsAddUserCreateError: : \(object)" + } + } + } + + /// - POST /core/groups/{group_uuid}/add_user/ + /// - Add user to group + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - parameter userAccountRequest: (body) + /// - returns: AnyPublisher + open func coreGroupsAddUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/add_user/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userAccountRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return CoreGroupsAddUserCreateError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsAddUserCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsAddUserCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsCreateError: : \(object)" + case .code403Error(let object): + return "CoreGroupsCreateError: : \(object)" + } + } + } + + /// - POST /core/groups/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupRequest: (body) + /// - returns: AnyPublisher + open func coreGroupsCreate(groupRequest: GroupRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/groups/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(groupRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Group.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsDestroyError: : \(object)" + case .code403Error(let object): + return "CoreGroupsDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/groups/{group_uuid}/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - returns: AnyPublisher + open func coreGroupsDestroy(groupUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsListError: : \(object)" + case .code403Error(let object): + return "CoreGroupsListError: : \(object)" + } + } + } + + /// - GET /core/groups/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter attributes: (query) Attributes (optional) + /// - parameter isSuperuser: (query) (optional) + /// - parameter membersByPk: (query) (optional) + /// - parameter membersByUsername: (query) Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func coreGroupsList(attributes: String? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/groups/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let attributes = attributes { queryItems.append(URLQueryItem(name: "attributes", value: attributes)) } + if let isSuperuser = isSuperuser { queryItems.append(URLQueryItem(name: "is_superuser", value: isSuperuser ? "true" : "false")) } + if let membersByPk = membersByPk { queryItems.append(URLQueryItem(name: "members_by_pk", value: String(data: try self.encoder.encode(membersByPk), encoding: .utf8) ?? "")) } + if let membersByUsername = membersByUsername { queryItems.append(URLQueryItem(name: "members_by_username", value: membersByUsername.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedGroupList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CoreGroupsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /core/groups/{group_uuid}/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - parameter patchedGroupRequest: (body) (optional) + /// - returns: AnyPublisher + open func coreGroupsPartialUpdate(groupUuid: UUID, patchedGroupRequest: PatchedGroupRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedGroupRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Group.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsRemoveUserCreateError: Error, CustomStringConvertible { + // User not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "CoreGroupsRemoveUserCreateError: User not found" + case .code400Error(let object): + return "CoreGroupsRemoveUserCreateError: : \(object)" + case .code403Error(let object): + return "CoreGroupsRemoveUserCreateError: : \(object)" + } + } + } + + /// - POST /core/groups/{group_uuid}/remove_user/ + /// - Add user to group + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - parameter userAccountRequest: (body) + /// - returns: AnyPublisher + open func coreGroupsRemoveUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/remove_user/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userAccountRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return CoreGroupsRemoveUserCreateError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsRemoveUserCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsRemoveUserCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreGroupsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/groups/{group_uuid}/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - returns: AnyPublisher + open func coreGroupsRetrieve(groupUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Group.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsUpdateError: : \(object)" + case .code403Error(let object): + return "CoreGroupsUpdateError: : \(object)" + } + } + } + + /// - PUT /core/groups/{group_uuid}/ + /// - Group Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - parameter groupRequest: (body) + /// - returns: AnyPublisher + open func coreGroupsUpdate(groupUuid: UUID, groupRequest: GroupRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(groupRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Group.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreGroupsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreGroupsUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreGroupsUsedByListError: : \(object)" + } + } + } + + /// - GET /core/groups/{group_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupUuid: (path) A UUID string identifying this Group. + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreGroupsUsedByList(groupUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/groups/{group_uuid}/used_by/" + path = path.replacingOccurrences(of: "{group_uuid}", with: groupUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreGroupsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreGroupsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsCreateError: : \(object)" + case .code403Error(let object): + return "CoreTenantsCreateError: : \(object)" + } + } + } + + /// - POST /core/tenants/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantRequest: (body) + /// - returns: AnyPublisher + open func coreTenantsCreate(tenantRequest: TenantRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/tenants/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(tenantRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Tenant.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsCurrentRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsCurrentRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreTenantsCurrentRetrieveError: : \(object)" + } + } + } + + /// - GET /core/tenants/current/ + /// - Get current tenant + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func coreTenantsCurrentRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/tenants/current/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsCurrentRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsCurrentRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CurrentTenant.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsDestroyError: : \(object)" + case .code403Error(let object): + return "CoreTenantsDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/tenants/{tenant_uuid}/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantUuid: (path) A UUID string identifying this Tenant. + /// - returns: AnyPublisher + open func coreTenantsDestroy(tenantUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tenants/{tenant_uuid}/" + path = path.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsListError: : \(object)" + case .code403Error(let object): + return "CoreTenantsListError: : \(object)" + } + } + } + + /// - GET /core/tenants/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter brandingFavicon: (query) (optional) + /// - parameter brandingLogo: (query) (optional) + /// - parameter brandingTitle: (query) (optional) + /// - parameter _default: (query) (optional) + /// - parameter domain: (query) (optional) + /// - parameter eventRetention: (query) (optional) + /// - parameter flowAuthentication: (query) (optional) + /// - parameter flowDeviceCode: (query) (optional) + /// - parameter flowInvalidation: (query) (optional) + /// - parameter flowRecovery: (query) (optional) + /// - parameter flowUnenrollment: (query) (optional) + /// - parameter flowUserSettings: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter tenantUuid: (query) (optional) + /// - parameter webCertificate: (query) (optional) + /// - returns: AnyPublisher + open func coreTenantsList(brandingFavicon: String? = nil, brandingLogo: String? = nil, brandingTitle: String? = nil, _default: Bool? = nil, domain: String? = nil, eventRetention: String? = nil, flowAuthentication: UUID? = nil, flowDeviceCode: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantUuid: UUID? = nil, webCertificate: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/tenants/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let brandingFavicon = brandingFavicon { queryItems.append(URLQueryItem(name: "branding_favicon", value: brandingFavicon)) } + if let brandingLogo = brandingLogo { queryItems.append(URLQueryItem(name: "branding_logo", value: brandingLogo)) } + if let brandingTitle = brandingTitle { queryItems.append(URLQueryItem(name: "branding_title", value: brandingTitle)) } + if let _default = _default { queryItems.append(URLQueryItem(name: "default", value: _default ? "true" : "false")) } + if let domain = domain { queryItems.append(URLQueryItem(name: "domain", value: domain)) } + if let eventRetention = eventRetention { queryItems.append(URLQueryItem(name: "event_retention", value: eventRetention)) } + if let flowAuthentication = flowAuthentication { queryItems.append(URLQueryItem(name: "flow_authentication", value: flowAuthentication.uuidString)) } + if let flowDeviceCode = flowDeviceCode { queryItems.append(URLQueryItem(name: "flow_device_code", value: flowDeviceCode.uuidString)) } + if let flowInvalidation = flowInvalidation { queryItems.append(URLQueryItem(name: "flow_invalidation", value: flowInvalidation.uuidString)) } + if let flowRecovery = flowRecovery { queryItems.append(URLQueryItem(name: "flow_recovery", value: flowRecovery.uuidString)) } + if let flowUnenrollment = flowUnenrollment { queryItems.append(URLQueryItem(name: "flow_unenrollment", value: flowUnenrollment.uuidString)) } + if let flowUserSettings = flowUserSettings { queryItems.append(URLQueryItem(name: "flow_user_settings", value: flowUserSettings.uuidString)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let tenantUuid = tenantUuid { queryItems.append(URLQueryItem(name: "tenant_uuid", value: tenantUuid.uuidString)) } + if let webCertificate = webCertificate { queryItems.append(URLQueryItem(name: "web_certificate", value: webCertificate.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTenantList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CoreTenantsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /core/tenants/{tenant_uuid}/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantUuid: (path) A UUID string identifying this Tenant. + /// - parameter patchedTenantRequest: (body) (optional) + /// - returns: AnyPublisher + open func coreTenantsPartialUpdate(tenantUuid: UUID, patchedTenantRequest: PatchedTenantRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tenants/{tenant_uuid}/" + path = path.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedTenantRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Tenant.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreTenantsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/tenants/{tenant_uuid}/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantUuid: (path) A UUID string identifying this Tenant. + /// - returns: AnyPublisher + open func coreTenantsRetrieve(tenantUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tenants/{tenant_uuid}/" + path = path.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Tenant.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsUpdateError: : \(object)" + case .code403Error(let object): + return "CoreTenantsUpdateError: : \(object)" + } + } + } + + /// - PUT /core/tenants/{tenant_uuid}/ + /// - Tenant Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantUuid: (path) A UUID string identifying this Tenant. + /// - parameter tenantRequest: (body) + /// - returns: AnyPublisher + open func coreTenantsUpdate(tenantUuid: UUID, tenantRequest: TenantRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tenants/{tenant_uuid}/" + path = path.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(tenantRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Tenant.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTenantsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTenantsUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreTenantsUsedByListError: : \(object)" + } + } + } + + /// - GET /core/tenants/{tenant_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tenantUuid: (path) A UUID string identifying this Tenant. + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreTenantsUsedByList(tenantUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tenants/{tenant_uuid}/used_by/" + path = path.replacingOccurrences(of: "{tenant_uuid}", with: tenantUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTenantsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTenantsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensCreateError: : \(object)" + case .code403Error(let object): + return "CoreTokensCreateError: : \(object)" + } + } + } + + /// - POST /core/tokens/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter tokenRequest: (body) + /// - returns: AnyPublisher + open func coreTokensCreate(tokenRequest: TokenRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/tokens/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(tokenRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Token.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensDestroyError: : \(object)" + case .code403Error(let object): + return "CoreTokensDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/tokens/{identifier}/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - returns: AnyPublisher + open func coreTokensDestroy(identifier: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter intent + /// + public enum CoreTokensListIntent: String, Codable, CaseIterable { + case api = "api" + case appPassword = "app_password" + case recovery = "recovery" + case verification = "verification" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum CoreTokensListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensListError: : \(object)" + case .code403Error(let object): + return "CoreTokensListError: : \(object)" + } + } + } + + /// - GET /core/tokens/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter description: (query) (optional) + /// - parameter expires: (query) (optional) + /// - parameter expiring: (query) (optional) + /// - parameter identifier: (query) (optional) + /// - parameter intent: (query) * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password (optional) + /// - parameter managed: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter userUsername: (query) (optional) + /// - returns: AnyPublisher + open func coreTokensList(description: String? = nil, expires: Date? = nil, expiring: Bool? = nil, identifier: String? = nil, intent: CoreTokensListIntent? = nil, managed: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/tokens/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let description = description { queryItems.append(URLQueryItem(name: "description", value: description)) } + if let expires = expires { queryItems.append(URLQueryItem(name: "expires", value: OpenISO8601DateFormatter.shared.string(from: expires))) } + if let expiring = expiring { queryItems.append(URLQueryItem(name: "expiring", value: expiring ? "true" : "false")) } + if let identifier = identifier { queryItems.append(URLQueryItem(name: "identifier", value: identifier)) } + if let intent = intent { queryItems.append(URLQueryItem(name: "intent", value: intent.rawValue)) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let userUsername = userUsername { queryItems.append(URLQueryItem(name: "user__username", value: userUsername)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTokenList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CoreTokensPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /core/tokens/{identifier}/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - parameter patchedTokenRequest: (body) (optional) + /// - returns: AnyPublisher + open func coreTokensPartialUpdate(identifier: String, patchedTokenRequest: PatchedTokenRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedTokenRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Token.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreTokensRetrieveError: : \(object)" + } + } + } + + /// - GET /core/tokens/{identifier}/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - returns: AnyPublisher + open func coreTokensRetrieve(identifier: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Token.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensSetKeyCreateError: Error, CustomStringConvertible { + // Missing key + case code400Error + // Token not found or expired + case code404Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "CoreTokensSetKeyCreateError: Missing key" + case .code404Error: + return "CoreTokensSetKeyCreateError: Token not found or expired" + case .code403Error(let object): + return "CoreTokensSetKeyCreateError: : \(object)" + } + } + } + + /// - POST /core/tokens/{identifier}/set_key/ + /// - Set token key. Action is logged as event. `authentik_core.set_token_key` permission is required. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - parameter tokenSetKeyRequest: (body) + /// - returns: AnyPublisher + open func coreTokensSetKeyCreate(identifier: String, tokenSetKeyRequest: TokenSetKeyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/set_key/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(tokenSetKeyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return CoreTokensSetKeyCreateError.code400Error + } + if transportError.statusCode == 404 { + return CoreTokensSetKeyCreateError.code404Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensSetKeyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensUpdateError: : \(object)" + case .code403Error(let object): + return "CoreTokensUpdateError: : \(object)" + } + } + } + + /// - PUT /core/tokens/{identifier}/ + /// - Token Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - parameter tokenRequest: (body) + /// - returns: AnyPublisher + open func coreTokensUpdate(identifier: String, tokenRequest: TokenRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(tokenRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Token.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTokensUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreTokensUsedByListError: : \(object)" + } + } + } + + /// - GET /core/tokens/{identifier}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreTokensUsedByList(identifier: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/used_by/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTokensViewKeyRetrieveError: Error, CustomStringConvertible { + // Token not found or expired + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "CoreTokensViewKeyRetrieveError: Token not found or expired" + case .code400Error(let object): + return "CoreTokensViewKeyRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreTokensViewKeyRetrieveError: : \(object)" + } + } + } + + /// - GET /core/tokens/{identifier}/view_key/ + /// - Return token key and log access + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (path) + /// - returns: AnyPublisher + open func coreTokensViewKeyRetrieve(identifier: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/tokens/{identifier}/view_key/" + path = path.replacingOccurrences(of: "{identifier}", with: identifier) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return CoreTokensViewKeyRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTokensViewKeyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTokensViewKeyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TokenView.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreTransactionalApplicationsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreTransactionalApplicationsUpdateError: : \(object)" + case .code403Error(let object): + return "CoreTransactionalApplicationsUpdateError: : \(object)" + } + } + } + + /// - PUT /core/transactional/applications/ + /// - Convert data into a blueprint, validate it and apply it + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter transactionApplicationRequest: (body) + /// - returns: AnyPublisher + open func coreTransactionalApplicationsUpdate(transactionApplicationRequest: TransactionApplicationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/transactional/applications/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(transactionApplicationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreTransactionalApplicationsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreTransactionalApplicationsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TransactionApplicationResponse.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUserConsentDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUserConsentDestroyError: : \(object)" + case .code403Error(let object): + return "CoreUserConsentDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/user_consent/{id}/ + /// - UserConsent Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Consent. + /// - returns: AnyPublisher + open func coreUserConsentDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/user_consent/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUserConsentDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUserConsentDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUserConsentListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUserConsentListError: : \(object)" + case .code403Error(let object): + return "CoreUserConsentListError: : \(object)" + } + } + } + + /// - GET /core/user_consent/ + /// - UserConsent Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter application: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func coreUserConsentList(application: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/user_consent/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let application = application { queryItems.append(URLQueryItem(name: "application", value: application.uuidString)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUserConsentListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUserConsentListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserConsentList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUserConsentRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUserConsentRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUserConsentRetrieveError: : \(object)" + } + } + } + + /// - GET /core/user_consent/{id}/ + /// - UserConsent Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Consent. + /// - returns: AnyPublisher + open func coreUserConsentRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/user_consent/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUserConsentRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUserConsentRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserConsent.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUserConsentUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUserConsentUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreUserConsentUsedByListError: : \(object)" + } + } + } + + /// - GET /core/user_consent/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Consent. + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreUserConsentUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/user_consent/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUserConsentUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUserConsentUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersCreateError: : \(object)" + case .code403Error(let object): + return "CoreUsersCreateError: : \(object)" + } + } + } + + /// - POST /core/users/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userRequest: (body) + /// - returns: AnyPublisher + open func coreUsersCreate(userRequest: UserRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(User.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersDestroyError: : \(object)" + case .code403Error(let object): + return "CoreUsersDestroyError: : \(object)" + } + } + } + + /// - DELETE /core/users/{id}/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersImpersonateCreateError: Error, CustomStringConvertible { + // Access denied + case code401Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code401Error: + return "CoreUsersImpersonateCreateError: Access denied" + case .code400Error(let object): + return "CoreUsersImpersonateCreateError: : \(object)" + case .code403Error(let object): + return "CoreUsersImpersonateCreateError: : \(object)" + } + } + } + + /// - POST /core/users/{id}/impersonate/ + /// - Impersonate a user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersImpersonateCreate(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/impersonate/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 401 { + return CoreUsersImpersonateCreateError.code401Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersImpersonateCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersImpersonateCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersImpersonateEndRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersImpersonateEndRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersImpersonateEndRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/impersonate_end/ + /// - End Impersonation a user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func coreUsersImpersonateEndRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/impersonate_end/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersImpersonateEndRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersImpersonateEndRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter type + /// + public enum CoreUsersListModelType: String, Codable, CaseIterable { + case external = "external" + case _internal = "internal" + case internalServiceAccount = "internal_service_account" + case serviceAccount = "service_account" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum CoreUsersListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersListError: : \(object)" + case .code403Error(let object): + return "CoreUsersListError: : \(object)" + } + } + } + + /// - GET /core/users/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter attributes: (query) Attributes (optional) + /// - parameter email: (query) (optional) + /// - parameter groupsByName: (query) (optional) + /// - parameter groupsByPk: (query) (optional) + /// - parameter isActive: (query) (optional) + /// - parameter isSuperuser: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter path: (query) (optional) + /// - parameter pathStartswith: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter type: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) + /// - parameter username: (query) (optional) + /// - parameter uuid: (query) (optional) + /// - returns: AnyPublisher + open func coreUsersList(attributes: String? = nil, email: String? = nil, groupsByName: [String]? = nil, groupsByPk: [UUID]? = nil, isActive: Bool? = nil, isSuperuser: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, pathStartswith: String? = nil, search: String? = nil, type: [CoreUsersListModelType]? = nil, username: String? = nil, uuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let attributes = attributes { queryItems.append(URLQueryItem(name: "attributes", value: attributes)) } + if let email = email { queryItems.append(URLQueryItem(name: "email", value: email)) } + if let groupsByName = groupsByName { queryItems.append(URLQueryItem(name: "groups_by_name", value: groupsByName.joined(separator: ","))) } + if let groupsByPk = groupsByPk { queryItems.append(URLQueryItem(name: "groups_by_pk", value: groupsByPk.map { $0.uuidString }.joined(separator: ","))) } + if let isActive = isActive { queryItems.append(URLQueryItem(name: "is_active", value: isActive ? "true" : "false")) } + if let isSuperuser = isSuperuser { queryItems.append(URLQueryItem(name: "is_superuser", value: isSuperuser ? "true" : "false")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let path = path { queryItems.append(URLQueryItem(name: "path", value: path)) } + if let pathStartswith = pathStartswith { queryItems.append(URLQueryItem(name: "path_startswith", value: pathStartswith)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let type = type { queryItems.append(URLQueryItem(name: "type", value: type.map { $0.rawValue }.joined(separator: ","))) } + if let username = username { queryItems.append(URLQueryItem(name: "username", value: username)) } + if let uuid = uuid { queryItems.append(URLQueryItem(name: "uuid", value: uuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersMeRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersMeRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersMeRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/me/ + /// - Get information about current user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - API Key: + /// - type: apiKey Authorization + /// - name: mobile_device_token + /// - returns: AnyPublisher + open func coreUsersMeRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/me/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersMeRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersMeRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SessionUser.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersMetricsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersMetricsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersMetricsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/{id}/metrics/ + /// - User metrics per 1h + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersMetricsRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/metrics/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersMetricsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersMetricsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserMetrics.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CoreUsersPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /core/users/{id}/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - parameter patchedUserRequest: (body) (optional) + /// - returns: AnyPublisher + open func coreUsersPartialUpdate(id: Int, patchedUserRequest: PatchedUserRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(User.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersPathsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersPathsRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersPathsRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/paths/ + /// - Get all user paths + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter search: (query) (optional) + /// - returns: AnyPublisher + open func coreUsersPathsRetrieve(search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/paths/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersPathsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersPathsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserPath.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersRecoveryEmailRetrieveError: Error, CustomStringConvertible { + // Bad request + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "CoreUsersRecoveryEmailRetrieveError: Bad request" + case .code400Error(let object): + return "CoreUsersRecoveryEmailRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersRecoveryEmailRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/{id}/recovery_email/ + /// - Create a temporary link that a user can use to recover their accounts + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter emailStage: (query) + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersRecoveryEmailRetrieve(emailStage: String, id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/recovery_email/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "email_stage", value: emailStage)) + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return CoreUsersRecoveryEmailRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersRecoveryEmailRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersRecoveryEmailRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersRecoveryRetrieveError: Error, CustomStringConvertible { + // + case code404Error(Link) + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error(let object): + return "CoreUsersRecoveryRetrieveError: : \(object)" + case .code400Error(let object): + return "CoreUsersRecoveryRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersRecoveryRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/{id}/recovery/ + /// - Create a temporary link that a user can use to recover their accounts + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersRecoveryRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/recovery/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + do { + let error = try self.decoder.decode(Link.self, from: transportError.data) + return CoreUsersRecoveryRetrieveError.code404Error(error) + } catch { + return error + } + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersRecoveryRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersRecoveryRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Link.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersRetrieveError: : \(object)" + case .code403Error(let object): + return "CoreUsersRetrieveError: : \(object)" + } + } + } + + /// - GET /core/users/{id}/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher + open func coreUsersRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(User.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersServiceAccountCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersServiceAccountCreateError: : \(object)" + case .code403Error(let object): + return "CoreUsersServiceAccountCreateError: : \(object)" + } + } + } + + /// - POST /core/users/service_account/ + /// - Create a new user account that is marked as a service account + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userServiceAccountRequest: (body) + /// - returns: AnyPublisher + open func coreUsersServiceAccountCreate(userServiceAccountRequest: UserServiceAccountRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/core/users/service_account/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userServiceAccountRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersServiceAccountCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersServiceAccountCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserServiceAccountResponse.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersSetPasswordCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "CoreUsersSetPasswordCreateError: Bad request" + case .code403Error(let object): + return "CoreUsersSetPasswordCreateError: : \(object)" + } + } + } + + /// - POST /core/users/{id}/set_password/ + /// - Set password for user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - parameter userPasswordSetRequest: (body) + /// - returns: AnyPublisher + open func coreUsersSetPasswordCreate(id: Int, userPasswordSetRequest: UserPasswordSetRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/set_password/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userPasswordSetRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return CoreUsersSetPasswordCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersSetPasswordCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersUpdateError: : \(object)" + case .code403Error(let object): + return "CoreUsersUpdateError: : \(object)" + } + } + } + + /// - PUT /core/users/{id}/ + /// - User Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - parameter userRequest: (body) + /// - returns: AnyPublisher + open func coreUsersUpdate(id: Int, userRequest: UserRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(User.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CoreUsersUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CoreUsersUsedByListError: : \(object)" + case .code403Error(let object): + return "CoreUsersUsedByListError: : \(object)" + } + } + } + + /// - GET /core/users/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - returns: AnyPublisher<[UsedBy], Error> + open func coreUsersUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/core/users/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CoreUsersUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CoreUsersUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/CryptoAPI.swift b/authentikClient/Sources/APIs/CryptoAPI.swift new file mode 100644 index 0000000..47748ae --- /dev/null +++ b/authentikClient/Sources/APIs/CryptoAPI.swift @@ -0,0 +1,736 @@ +// +// CryptoAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class CryptoAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum CryptoCertificatekeypairsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsCreateError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsCreateError: : \(object)" + } + } + } + + /// - POST /crypto/certificatekeypairs/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter certificateKeyPairRequest: (body) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsCreate(certificateKeyPairRequest: CertificateKeyPairRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/crypto/certificatekeypairs/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(certificateKeyPairRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateKeyPair.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsDestroyError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsDestroyError: : \(object)" + } + } + } + + /// - DELETE /crypto/certificatekeypairs/{kp_uuid}/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsDestroy(kpUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsGenerateCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "CryptoCertificatekeypairsGenerateCreateError: Bad request" + case .code403Error(let object): + return "CryptoCertificatekeypairsGenerateCreateError: : \(object)" + } + } + } + + /// - POST /crypto/certificatekeypairs/generate/ + /// - Generate a new, self-signed certificate-key pair + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter certificateGenerationRequest: (body) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsGenerateCreate(certificateGenerationRequest: CertificateGenerationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/crypto/certificatekeypairs/generate/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(certificateGenerationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return CryptoCertificatekeypairsGenerateCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsGenerateCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateKeyPair.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsListError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsListError: : \(object)" + } + } + } + + /// - GET /crypto/certificatekeypairs/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter hasKey: (query) Only return certificate-key pairs with keys (optional) + /// - parameter includeDetails: (query) (optional, default to true) + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsList(hasKey: Bool? = nil, includeDetails: Bool? = nil, managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/crypto/certificatekeypairs/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let hasKey = hasKey { queryItems.append(URLQueryItem(name: "has_key", value: hasKey ? "true" : "false")) } + if let includeDetails = includeDetails { queryItems.append(URLQueryItem(name: "include_details", value: includeDetails ? "true" : "false")) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedCertificateKeyPairList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /crypto/certificatekeypairs/{kp_uuid}/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - parameter patchedCertificateKeyPairRequest: (body) (optional) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsPartialUpdate(kpUuid: UUID, patchedCertificateKeyPairRequest: PatchedCertificateKeyPairRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedCertificateKeyPairRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateKeyPair.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsRetrieveError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsRetrieveError: : \(object)" + } + } + } + + /// - GET /crypto/certificatekeypairs/{kp_uuid}/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsRetrieve(kpUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateKeyPair.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsUpdateError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsUpdateError: : \(object)" + } + } + } + + /// - PUT /crypto/certificatekeypairs/{kp_uuid}/ + /// - CertificateKeyPair Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - parameter certificateKeyPairRequest: (body) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsUpdate(kpUuid: UUID, certificateKeyPairRequest: CertificateKeyPairRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(certificateKeyPairRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateKeyPair.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsUsedByListError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsUsedByListError: : \(object)" + } + } + } + + /// - GET /crypto/certificatekeypairs/{kp_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - returns: AnyPublisher<[UsedBy], Error> + open func cryptoCertificatekeypairsUsedByList(kpUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/used_by/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsViewCertificateRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsViewCertificateRetrieveError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsViewCertificateRetrieveError: : \(object)" + } + } + } + + /// - GET /crypto/certificatekeypairs/{kp_uuid}/view_certificate/ + /// - Return certificate-key pairs certificate and log access + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - parameter download: (query) (optional) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsViewCertificateRetrieve(kpUuid: UUID, download: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/view_certificate/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let download = download { queryItems.append(URLQueryItem(name: "download", value: download ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsViewCertificateRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsViewCertificateRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateData.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum CryptoCertificatekeypairsViewPrivateKeyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "CryptoCertificatekeypairsViewPrivateKeyRetrieveError: : \(object)" + case .code403Error(let object): + return "CryptoCertificatekeypairsViewPrivateKeyRetrieveError: : \(object)" + } + } + } + + /// - GET /crypto/certificatekeypairs/{kp_uuid}/view_private_key/ + /// - Return certificate-key pairs private key and log access + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kpUuid: (path) A UUID string identifying this Certificate-Key Pair. + /// - parameter download: (query) (optional) + /// - returns: AnyPublisher + open func cryptoCertificatekeypairsViewPrivateKeyRetrieve(kpUuid: UUID, download: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/crypto/certificatekeypairs/{kp_uuid}/view_private_key/" + path = path.replacingOccurrences(of: "{kp_uuid}", with: kpUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let download = download { queryItems.append(URLQueryItem(name: "download", value: download ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return CryptoCertificatekeypairsViewPrivateKeyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return CryptoCertificatekeypairsViewPrivateKeyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CertificateData.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/EnterpriseAPI.swift b/authentikClient/Sources/APIs/EnterpriseAPI.swift new file mode 100644 index 0000000..8ac7ae7 --- /dev/null +++ b/authentikClient/Sources/APIs/EnterpriseAPI.swift @@ -0,0 +1,720 @@ +// +// EnterpriseAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class EnterpriseAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum EnterpriseLicenseCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseCreateError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseCreateError: : \(object)" + } + } + } + + /// - POST /enterprise/license/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseRequest: (body) + /// - returns: AnyPublisher + open func enterpriseLicenseCreate(licenseRequest: LicenseRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/enterprise/license/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(licenseRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(License.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseDestroyError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseDestroyError: : \(object)" + } + } + } + + /// - DELETE /enterprise/license/{license_uuid}/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseUuid: (path) A UUID string identifying this License. + /// - returns: AnyPublisher + open func enterpriseLicenseDestroy(licenseUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/enterprise/license/{license_uuid}/" + path = path.replacingOccurrences(of: "{license_uuid}", with: licenseUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseForecastRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseForecastRetrieveError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseForecastRetrieveError: : \(object)" + } + } + } + + /// - GET /enterprise/license/forecast/ + /// - Forecast how many users will be required in a year + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func enterpriseLicenseForecastRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/enterprise/license/forecast/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseForecastRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseForecastRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LicenseForecast.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseGetInstallIdRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseGetInstallIdRetrieveError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseGetInstallIdRetrieveError: : \(object)" + } + } + } + + /// - GET /enterprise/license/get_install_id/ + /// - Get install_id + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func enterpriseLicenseGetInstallIdRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/enterprise/license/get_install_id/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseGetInstallIdRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseGetInstallIdRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(InstallID.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseListError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseListError: : \(object)" + } + } + } + + /// - GET /enterprise/license/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func enterpriseLicenseList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/enterprise/license/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedLicenseList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicensePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicensePartialUpdateError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicensePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /enterprise/license/{license_uuid}/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseUuid: (path) A UUID string identifying this License. + /// - parameter patchedLicenseRequest: (body) (optional) + /// - returns: AnyPublisher + open func enterpriseLicensePartialUpdate(licenseUuid: UUID, patchedLicenseRequest: PatchedLicenseRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/enterprise/license/{license_uuid}/" + path = path.replacingOccurrences(of: "{license_uuid}", with: licenseUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedLicenseRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicensePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicensePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(License.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseRetrieveError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseRetrieveError: : \(object)" + } + } + } + + /// - GET /enterprise/license/{license_uuid}/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseUuid: (path) A UUID string identifying this License. + /// - returns: AnyPublisher + open func enterpriseLicenseRetrieve(licenseUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/enterprise/license/{license_uuid}/" + path = path.replacingOccurrences(of: "{license_uuid}", with: licenseUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(License.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseSummaryRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseSummaryRetrieveError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseSummaryRetrieveError: : \(object)" + } + } + } + + /// - GET /enterprise/license/summary/ + /// - Get the total license status + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func enterpriseLicenseSummaryRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/enterprise/license/summary/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseSummaryRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseSummaryRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LicenseSummary.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseUpdateError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseUpdateError: : \(object)" + } + } + } + + /// - PUT /enterprise/license/{license_uuid}/ + /// - License Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseUuid: (path) A UUID string identifying this License. + /// - parameter licenseRequest: (body) + /// - returns: AnyPublisher + open func enterpriseLicenseUpdate(licenseUuid: UUID, licenseRequest: LicenseRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/enterprise/license/{license_uuid}/" + path = path.replacingOccurrences(of: "{license_uuid}", with: licenseUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(licenseRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(License.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EnterpriseLicenseUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EnterpriseLicenseUsedByListError: : \(object)" + case .code403Error(let object): + return "EnterpriseLicenseUsedByListError: : \(object)" + } + } + } + + /// - GET /enterprise/license/{license_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter licenseUuid: (path) A UUID string identifying this License. + /// - returns: AnyPublisher<[UsedBy], Error> + open func enterpriseLicenseUsedByList(licenseUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/enterprise/license/{license_uuid}/used_by/" + path = path.replacingOccurrences(of: "{license_uuid}", with: licenseUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EnterpriseLicenseUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EnterpriseLicenseUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/EventsAPI.swift b/authentikClient/Sources/APIs/EventsAPI.swift new file mode 100644 index 0000000..d36b1ea --- /dev/null +++ b/authentikClient/Sources/APIs/EventsAPI.swift @@ -0,0 +1,2365 @@ +// +// EventsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class EventsAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum EventsEventsActionsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsActionsListError: : \(object)" + case .code403Error(let object): + return "EventsEventsActionsListError: : \(object)" + } + } + } + + /// - GET /events/events/actions/ + /// - Get all actions + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func eventsEventsActionsList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/actions/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsActionsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsActionsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsCreateError: : \(object)" + case .code403Error(let object): + return "EventsEventsCreateError: : \(object)" + } + } + } + + /// - POST /events/events/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventRequest: (body) + /// - returns: AnyPublisher + open func eventsEventsCreate(eventRequest: EventRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(eventRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Event.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsDestroyError: : \(object)" + case .code403Error(let object): + return "EventsEventsDestroyError: : \(object)" + } + } + } + + /// - DELETE /events/events/{event_uuid}/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventUuid: (path) A UUID string identifying this Event. + /// - returns: AnyPublisher + open func eventsEventsDestroy(eventUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/events/{event_uuid}/" + path = path.replacingOccurrences(of: "{event_uuid}", with: eventUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsListError: : \(object)" + case .code403Error(let object): + return "EventsEventsListError: : \(object)" + } + } + } + + /// - GET /events/events/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter action: (query) (optional) + /// - parameter clientIp: (query) (optional) + /// - parameter contextAuthorizedApp: (query) Context Authorized application (optional) + /// - parameter contextModelApp: (query) Context Model App (optional) + /// - parameter contextModelName: (query) Context Model Name (optional) + /// - parameter contextModelPk: (query) Context Model Primary Key (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter tenantName: (query) Tenant name (optional) + /// - parameter username: (query) Username (optional) + /// - returns: AnyPublisher + open func eventsEventsList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let action = action { queryItems.append(URLQueryItem(name: "action", value: action)) } + if let clientIp = clientIp { queryItems.append(URLQueryItem(name: "client_ip", value: clientIp)) } + if let contextAuthorizedApp = contextAuthorizedApp { queryItems.append(URLQueryItem(name: "context_authorized_app", value: contextAuthorizedApp)) } + if let contextModelApp = contextModelApp { queryItems.append(URLQueryItem(name: "context_model_app", value: contextModelApp)) } + if let contextModelName = contextModelName { queryItems.append(URLQueryItem(name: "context_model_name", value: contextModelName)) } + if let contextModelPk = contextModelPk { queryItems.append(URLQueryItem(name: "context_model_pk", value: contextModelPk)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let tenantName = tenantName { queryItems.append(URLQueryItem(name: "tenant_name", value: tenantName)) } + if let username = username { queryItems.append(URLQueryItem(name: "username", value: username)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedEventList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "EventsEventsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /events/events/{event_uuid}/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventUuid: (path) A UUID string identifying this Event. + /// - parameter patchedEventRequest: (body) (optional) + /// - returns: AnyPublisher + open func eventsEventsPartialUpdate(eventUuid: UUID, patchedEventRequest: PatchedEventRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/events/{event_uuid}/" + path = path.replacingOccurrences(of: "{event_uuid}", with: eventUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedEventRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Event.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsPerMonthListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsPerMonthListError: : \(object)" + case .code403Error(let object): + return "EventsEventsPerMonthListError: : \(object)" + } + } + } + + /// - GET /events/events/per_month/ + /// - Get the count of events per month + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter action: (query) (optional) + /// - parameter query: (query) (optional) + /// - returns: AnyPublisher<[Coordinate], Error> + open func eventsEventsPerMonthList(action: String? = nil, query: String? = nil) -> AnyPublisher<[Coordinate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/per_month/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let action = action { queryItems.append(URLQueryItem(name: "action", value: action)) } + if let query = query { queryItems.append(URLQueryItem(name: "query", value: query)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Coordinate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsPerMonthListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsPerMonthListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Coordinate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsRetrieveError: : \(object)" + case .code403Error(let object): + return "EventsEventsRetrieveError: : \(object)" + } + } + } + + /// - GET /events/events/{event_uuid}/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventUuid: (path) A UUID string identifying this Event. + /// - returns: AnyPublisher + open func eventsEventsRetrieve(eventUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/events/{event_uuid}/" + path = path.replacingOccurrences(of: "{event_uuid}", with: eventUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Event.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsTopPerUserListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsTopPerUserListError: : \(object)" + case .code403Error(let object): + return "EventsEventsTopPerUserListError: : \(object)" + } + } + } + + /// - GET /events/events/top_per_user/ + /// - Get the top_n events grouped by user count + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter action: (query) (optional) + /// - parameter topN: (query) (optional) + /// - returns: AnyPublisher<[EventTopPerUser], Error> + open func eventsEventsTopPerUserList(action: String? = nil, topN: Int? = nil) -> AnyPublisher<[EventTopPerUser], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/top_per_user/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let action = action { queryItems.append(URLQueryItem(name: "action", value: action)) } + if let topN = topN { queryItems.append(URLQueryItem(name: "top_n", value: "\(topN)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[EventTopPerUser], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsTopPerUserListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsTopPerUserListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([EventTopPerUser].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsUpdateError: : \(object)" + case .code403Error(let object): + return "EventsEventsUpdateError: : \(object)" + } + } + } + + /// - PUT /events/events/{event_uuid}/ + /// - Event Read-Only Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventUuid: (path) A UUID string identifying this Event. + /// - parameter eventRequest: (body) + /// - returns: AnyPublisher + open func eventsEventsUpdate(eventUuid: UUID, eventRequest: EventRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/events/{event_uuid}/" + path = path.replacingOccurrences(of: "{event_uuid}", with: eventUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(eventRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Event.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsEventsVolumeListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsEventsVolumeListError: : \(object)" + case .code403Error(let object): + return "EventsEventsVolumeListError: : \(object)" + } + } + } + + /// - GET /events/events/volume/ + /// - Get event volume for specified filters and timeframe + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter action: (query) (optional) + /// - parameter clientIp: (query) (optional) + /// - parameter contextAuthorizedApp: (query) Context Authorized application (optional) + /// - parameter contextModelApp: (query) Context Model App (optional) + /// - parameter contextModelName: (query) Context Model Name (optional) + /// - parameter contextModelPk: (query) Context Model Primary Key (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter tenantName: (query) Tenant name (optional) + /// - parameter username: (query) Username (optional) + /// - returns: AnyPublisher<[Coordinate], Error> + open func eventsEventsVolumeList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil) -> AnyPublisher<[Coordinate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/events/volume/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let action = action { queryItems.append(URLQueryItem(name: "action", value: action)) } + if let clientIp = clientIp { queryItems.append(URLQueryItem(name: "client_ip", value: clientIp)) } + if let contextAuthorizedApp = contextAuthorizedApp { queryItems.append(URLQueryItem(name: "context_authorized_app", value: contextAuthorizedApp)) } + if let contextModelApp = contextModelApp { queryItems.append(URLQueryItem(name: "context_model_app", value: contextModelApp)) } + if let contextModelName = contextModelName { queryItems.append(URLQueryItem(name: "context_model_name", value: contextModelName)) } + if let contextModelPk = contextModelPk { queryItems.append(URLQueryItem(name: "context_model_pk", value: contextModelPk)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let tenantName = tenantName { queryItems.append(URLQueryItem(name: "tenant_name", value: tenantName)) } + if let username = username { queryItems.append(URLQueryItem(name: "username", value: username)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[Coordinate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsEventsVolumeListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsEventsVolumeListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([Coordinate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsDestroyError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsDestroyError: : \(object)" + } + } + } + + /// - DELETE /events/notifications/{uuid}/ + /// - Notification Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification. + /// - returns: AnyPublisher + open func eventsNotificationsDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/notifications/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter severity + /// + public enum EventsNotificationsListSeverity: String, Codable, CaseIterable { + case alert = "alert" + case notice = "notice" + case warning = "warning" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum EventsNotificationsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsListError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsListError: : \(object)" + } + } + } + + /// - GET /events/notifications/ + /// - Notification Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter body: (query) (optional) + /// - parameter created: (query) (optional) + /// - parameter event: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter seen: (query) (optional) + /// - parameter severity: (query) * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func eventsNotificationsList(body: String? = nil, created: Date? = nil, event: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, seen: Bool? = nil, severity: EventsNotificationsListSeverity? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/notifications/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let body = body { queryItems.append(URLQueryItem(name: "body", value: body)) } + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let event = event { queryItems.append(URLQueryItem(name: "event", value: event.uuidString)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let seen = seen { queryItems.append(URLQueryItem(name: "seen", value: seen ? "true" : "false")) } + if let severity = severity { queryItems.append(URLQueryItem(name: "severity", value: severity.rawValue)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedNotificationList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsMarkAllSeenCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsMarkAllSeenCreateError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsMarkAllSeenCreateError: : \(object)" + } + } + } + + /// - POST /events/notifications/mark_all_seen/ + /// - Mark all the user's notifications as seen + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func eventsNotificationsMarkAllSeenCreate() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/notifications/mark_all_seen/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsMarkAllSeenCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsMarkAllSeenCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /events/notifications/{uuid}/ + /// - Notification Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification. + /// - parameter patchedNotificationRequest: (body) (optional) + /// - returns: AnyPublisher + open func eventsNotificationsPartialUpdate(uuid: UUID, patchedNotificationRequest: PatchedNotificationRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/notifications/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedNotificationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Notification.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsRetrieveError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsRetrieveError: : \(object)" + } + } + } + + /// - GET /events/notifications/{uuid}/ + /// - Notification Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification. + /// - returns: AnyPublisher + open func eventsNotificationsRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/notifications/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Notification.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsUpdateError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsUpdateError: : \(object)" + } + } + } + + /// - PUT /events/notifications/{uuid}/ + /// - Notification Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification. + /// - parameter notificationRequest: (body) (optional) + /// - returns: AnyPublisher + open func eventsNotificationsUpdate(uuid: UUID, notificationRequest: NotificationRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/notifications/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(notificationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Notification.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsNotificationsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsNotificationsUsedByListError: : \(object)" + case .code403Error(let object): + return "EventsNotificationsUsedByListError: : \(object)" + } + } + } + + /// - GET /events/notifications/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification. + /// - returns: AnyPublisher<[UsedBy], Error> + open func eventsNotificationsUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/notifications/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsNotificationsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsNotificationsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesCreateError: : \(object)" + case .code403Error(let object): + return "EventsRulesCreateError: : \(object)" + } + } + } + + /// - POST /events/rules/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter notificationRuleRequest: (body) + /// - returns: AnyPublisher + open func eventsRulesCreate(notificationRuleRequest: NotificationRuleRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/rules/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(notificationRuleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationRule.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesDestroyError: : \(object)" + case .code403Error(let object): + return "EventsRulesDestroyError: : \(object)" + } + } + } + + /// - DELETE /events/rules/{pbm_uuid}/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. + /// - returns: AnyPublisher + open func eventsRulesDestroy(pbmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/rules/{pbm_uuid}/" + path = path.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter severity + /// + public enum EventsRulesListSeverity: String, Codable, CaseIterable { + case alert = "alert" + case notice = "notice" + case warning = "warning" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum EventsRulesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesListError: : \(object)" + case .code403Error(let object): + return "EventsRulesListError: : \(object)" + } + } + } + + /// - GET /events/rules/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupName: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter severity: (query) Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) + /// - returns: AnyPublisher + open func eventsRulesList(groupName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, severity: EventsRulesListSeverity? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/rules/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let groupName = groupName { queryItems.append(URLQueryItem(name: "group__name", value: groupName)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let severity = severity { queryItems.append(URLQueryItem(name: "severity", value: severity.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedNotificationRuleList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "EventsRulesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /events/rules/{pbm_uuid}/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. + /// - parameter patchedNotificationRuleRequest: (body) (optional) + /// - returns: AnyPublisher + open func eventsRulesPartialUpdate(pbmUuid: UUID, patchedNotificationRuleRequest: PatchedNotificationRuleRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/rules/{pbm_uuid}/" + path = path.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedNotificationRuleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationRule.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesRetrieveError: : \(object)" + case .code403Error(let object): + return "EventsRulesRetrieveError: : \(object)" + } + } + } + + /// - GET /events/rules/{pbm_uuid}/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. + /// - returns: AnyPublisher + open func eventsRulesRetrieve(pbmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/rules/{pbm_uuid}/" + path = path.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationRule.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesUpdateError: : \(object)" + case .code403Error(let object): + return "EventsRulesUpdateError: : \(object)" + } + } + } + + /// - PUT /events/rules/{pbm_uuid}/ + /// - NotificationRule Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. + /// - parameter notificationRuleRequest: (body) + /// - returns: AnyPublisher + open func eventsRulesUpdate(pbmUuid: UUID, notificationRuleRequest: NotificationRuleRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/rules/{pbm_uuid}/" + path = path.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(notificationRuleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationRule.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsRulesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsRulesUsedByListError: : \(object)" + case .code403Error(let object): + return "EventsRulesUsedByListError: : \(object)" + } + } + } + + /// - GET /events/rules/{pbm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pbmUuid: (path) A UUID string identifying this Notification Rule. + /// - returns: AnyPublisher<[UsedBy], Error> + open func eventsRulesUsedByList(pbmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/rules/{pbm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pbm_uuid}", with: pbmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsRulesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsRulesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsCreateError: : \(object)" + case .code403Error(let object): + return "EventsTransportsCreateError: : \(object)" + } + } + } + + /// - POST /events/transports/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter notificationTransportRequest: (body) + /// - returns: AnyPublisher + open func eventsTransportsCreate(notificationTransportRequest: NotificationTransportRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/transports/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(notificationTransportRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationTransport.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsDestroyError: : \(object)" + case .code403Error(let object): + return "EventsTransportsDestroyError: : \(object)" + } + } + } + + /// - DELETE /events/transports/{uuid}/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - returns: AnyPublisher + open func eventsTransportsDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter mode + /// + public enum EventsTransportsListMode: String, Codable, CaseIterable { + case email = "email" + case local = "local" + case webhook = "webhook" + case webhookSlack = "webhook_slack" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum EventsTransportsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsListError: : \(object)" + case .code403Error(let object): + return "EventsTransportsListError: : \(object)" + } + } + } + + /// - GET /events/transports/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter mode: (query) * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sendOnce: (query) (optional) + /// - parameter webhookUrl: (query) (optional) + /// - returns: AnyPublisher + open func eventsTransportsList(mode: EventsTransportsListMode? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sendOnce: Bool? = nil, webhookUrl: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/events/transports/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let mode = mode { queryItems.append(URLQueryItem(name: "mode", value: mode.rawValue)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sendOnce = sendOnce { queryItems.append(URLQueryItem(name: "send_once", value: sendOnce ? "true" : "false")) } + if let webhookUrl = webhookUrl { queryItems.append(URLQueryItem(name: "webhook_url", value: webhookUrl)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedNotificationTransportList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "EventsTransportsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /events/transports/{uuid}/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - parameter patchedNotificationTransportRequest: (body) (optional) + /// - returns: AnyPublisher + open func eventsTransportsPartialUpdate(uuid: UUID, patchedNotificationTransportRequest: PatchedNotificationTransportRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedNotificationTransportRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationTransport.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsRetrieveError: : \(object)" + case .code403Error(let object): + return "EventsTransportsRetrieveError: : \(object)" + } + } + } + + /// - GET /events/transports/{uuid}/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - returns: AnyPublisher + open func eventsTransportsRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationTransport.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsTestCreateError: Error, CustomStringConvertible { + // Failed to test transport + case code500Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code500Error: + return "EventsTransportsTestCreateError: Failed to test transport" + case .code400Error(let object): + return "EventsTransportsTestCreateError: : \(object)" + case .code403Error(let object): + return "EventsTransportsTestCreateError: : \(object)" + } + } + } + + /// - POST /events/transports/{uuid}/test/ + /// - Send example notification using selected transport. Requires Modify permissions. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - returns: AnyPublisher + open func eventsTransportsTestCreate(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/test/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 500 { + return EventsTransportsTestCreateError.code500Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsTestCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsTestCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationTransportTest.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsUpdateError: : \(object)" + case .code403Error(let object): + return "EventsTransportsUpdateError: : \(object)" + } + } + } + + /// - PUT /events/transports/{uuid}/ + /// - NotificationTransport Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - parameter notificationTransportRequest: (body) + /// - returns: AnyPublisher + open func eventsTransportsUpdate(uuid: UUID, notificationTransportRequest: NotificationTransportRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(notificationTransportRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationTransport.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum EventsTransportsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "EventsTransportsUsedByListError: : \(object)" + case .code403Error(let object): + return "EventsTransportsUsedByListError: : \(object)" + } + } + } + + /// - GET /events/transports/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Notification Transport. + /// - returns: AnyPublisher<[UsedBy], Error> + open func eventsTransportsUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/events/transports/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return EventsTransportsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return EventsTransportsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/FlowsAPI.swift b/authentikClient/Sources/APIs/FlowsAPI.swift new file mode 100644 index 0000000..5587f6a --- /dev/null +++ b/authentikClient/Sources/APIs/FlowsAPI.swift @@ -0,0 +1,1861 @@ +// +// FlowsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class FlowsAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum FlowsBindingsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsCreateError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsCreateError: : \(object)" + } + } + } + + /// - POST /flows/bindings/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter flowStageBindingRequest: (body) + /// - returns: AnyPublisher + open func flowsBindingsCreate(flowStageBindingRequest: FlowStageBindingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/bindings/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(flowStageBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowStageBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsBindingsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsDestroyError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsDestroyError: : \(object)" + } + } + } + + /// - DELETE /flows/bindings/{fsb_uuid}/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. + /// - returns: AnyPublisher + open func flowsBindingsDestroy(fsbUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/bindings/{fsb_uuid}/" + path = path.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter invalidResponseAction + /// + public enum FlowsBindingsListInvalidResponseAction: String, Codable, CaseIterable { + case restart = "restart" + case restartWithContext = "restart_with_context" + case retry = "retry" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter policyEngineMode + /// + public enum FlowsBindingsListPolicyEngineMode: String, Codable, CaseIterable { + case all = "all" + case any = "any" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum FlowsBindingsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsListError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsListError: : \(object)" + } + } + } + + /// - GET /flows/bindings/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter evaluateOnPlan: (query) (optional) + /// - parameter fsbUuid: (query) (optional) + /// - parameter invalidResponseAction: (query) Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context (optional) + /// - parameter order: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter pbmUuid: (query) (optional) + /// - parameter policies: (query) (optional) + /// - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) + /// - parameter reEvaluatePolicies: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stage: (query) (optional) + /// - parameter target: (query) (optional) + /// - returns: AnyPublisher + open func flowsBindingsList(evaluateOnPlan: Bool? = nil, fsbUuid: UUID? = nil, invalidResponseAction: FlowsBindingsListInvalidResponseAction? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pbmUuid: UUID? = nil, policies: [UUID]? = nil, policyEngineMode: FlowsBindingsListPolicyEngineMode? = nil, reEvaluatePolicies: Bool? = nil, search: String? = nil, stage: UUID? = nil, target: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/bindings/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let evaluateOnPlan = evaluateOnPlan { queryItems.append(URLQueryItem(name: "evaluate_on_plan", value: evaluateOnPlan ? "true" : "false")) } + if let fsbUuid = fsbUuid { queryItems.append(URLQueryItem(name: "fsb_uuid", value: fsbUuid.uuidString)) } + if let invalidResponseAction = invalidResponseAction { queryItems.append(URLQueryItem(name: "invalid_response_action", value: invalidResponseAction.rawValue)) } + if let order = order { queryItems.append(URLQueryItem(name: "order", value: "\(order)")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let pbmUuid = pbmUuid { queryItems.append(URLQueryItem(name: "pbm_uuid", value: pbmUuid.uuidString)) } + if let policies = policies { queryItems.append(URLQueryItem(name: "policies", value: policies.map { $0.uuidString }.joined(separator: ","))) } + if let policyEngineMode = policyEngineMode { queryItems.append(URLQueryItem(name: "policy_engine_mode", value: policyEngineMode.rawValue)) } + if let reEvaluatePolicies = reEvaluatePolicies { queryItems.append(URLQueryItem(name: "re_evaluate_policies", value: reEvaluatePolicies ? "true" : "false")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stage = stage { queryItems.append(URLQueryItem(name: "stage", value: stage.uuidString)) } + if let target = target { queryItems.append(URLQueryItem(name: "target", value: target.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedFlowStageBindingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsBindingsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /flows/bindings/{fsb_uuid}/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. + /// - parameter patchedFlowStageBindingRequest: (body) (optional) + /// - returns: AnyPublisher + open func flowsBindingsPartialUpdate(fsbUuid: UUID, patchedFlowStageBindingRequest: PatchedFlowStageBindingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/bindings/{fsb_uuid}/" + path = path.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedFlowStageBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowStageBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsBindingsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsRetrieveError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/bindings/{fsb_uuid}/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. + /// - returns: AnyPublisher + open func flowsBindingsRetrieve(fsbUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/bindings/{fsb_uuid}/" + path = path.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowStageBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsBindingsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsUpdateError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsUpdateError: : \(object)" + } + } + } + + /// - PUT /flows/bindings/{fsb_uuid}/ + /// - FlowStageBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. + /// - parameter flowStageBindingRequest: (body) + /// - returns: AnyPublisher + open func flowsBindingsUpdate(fsbUuid: UUID, flowStageBindingRequest: FlowStageBindingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/bindings/{fsb_uuid}/" + path = path.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(flowStageBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowStageBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsBindingsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsBindingsUsedByListError: : \(object)" + case .code403Error(let object): + return "FlowsBindingsUsedByListError: : \(object)" + } + } + } + + /// - GET /flows/bindings/{fsb_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fsbUuid: (path) A UUID string identifying this Flow Stage Binding. + /// - returns: AnyPublisher<[UsedBy], Error> + open func flowsBindingsUsedByList(fsbUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/bindings/{fsb_uuid}/used_by/" + path = path.replacingOccurrences(of: "{fsb_uuid}", with: fsbUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsBindingsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsBindingsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsExecutorGetError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsExecutorGetError: : \(object)" + case .code403Error(let object): + return "FlowsExecutorGetError: : \(object)" + } + } + } + + /// - GET /flows/executor/{flow_slug}/ + /// - Get the next pending challenge from the currently active flow. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter flowSlug: (path) + /// - parameter query: (query) Querystring as received + /// - returns: AnyPublisher + open func flowsExecutorGet(flowSlug: String, query: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/executor/{flow_slug}/" + path = path.replacingOccurrences(of: "{flow_slug}", with: flowSlug) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "query", value: query)) + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsExecutorGetError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsExecutorGetError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ChallengeTypes.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsExecutorSolveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsExecutorSolveError: : \(object)" + case .code403Error(let object): + return "FlowsExecutorSolveError: : \(object)" + } + } + } + + /// - POST /flows/executor/{flow_slug}/ + /// - Solve the previously retrieved challenge and advanced to the next stage. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter flowSlug: (path) + /// - parameter query: (query) Querystring as received + /// - parameter flowChallengeResponseRequest: (body) (optional) + /// - returns: AnyPublisher + open func flowsExecutorSolve(flowSlug: String, query: String, flowChallengeResponseRequest: FlowChallengeResponseRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/executor/{flow_slug}/" + path = path.replacingOccurrences(of: "{flow_slug}", with: flowSlug) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "query", value: query)) + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(flowChallengeResponseRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsExecutorSolveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsExecutorSolveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ChallengeTypes.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInspectorGetError: Error, CustomStringConvertible { + // No flow plan in session. + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "FlowsInspectorGetError: No flow plan in session." + case .code403Error(let object): + return "FlowsInspectorGetError: : \(object)" + } + } + } + + /// - GET /flows/inspector/{flow_slug}/ + /// - Get current flow state and record it + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter flowSlug: (path) + /// - returns: AnyPublisher + open func flowsInspectorGet(flowSlug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/inspector/{flow_slug}/" + path = path.replacingOccurrences(of: "{flow_slug}", with: flowSlug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return FlowsInspectorGetError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInspectorGetError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowInspection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesCacheClearCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "FlowsInstancesCacheClearCreateError: Bad request" + case .code403Error(let object): + return "FlowsInstancesCacheClearCreateError: : \(object)" + } + } + } + + /// - POST /flows/instances/cache_clear/ + /// - Clear flow cache + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func flowsInstancesCacheClearCreate() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/instances/cache_clear/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return FlowsInstancesCacheClearCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesCacheClearCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesCacheInfoRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesCacheInfoRetrieveError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesCacheInfoRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/instances/cache_info/ + /// - Info about cached flows + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func flowsInstancesCacheInfoRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/instances/cache_info/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesCacheInfoRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesCacheInfoRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Cache.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesCreateError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesCreateError: : \(object)" + } + } + } + + /// - POST /flows/instances/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter flowRequest: (body) + /// - returns: AnyPublisher + open func flowsInstancesCreate(flowRequest: FlowRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/instances/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(flowRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Flow.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesDestroyError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesDestroyError: : \(object)" + } + } + } + + /// - DELETE /flows/instances/{slug}/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func flowsInstancesDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesDiagramRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesDiagramRetrieveError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesDiagramRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/instances/{slug}/diagram/ + /// - Return diagram for flow with slug `slug`, in the format used by flowchart.js + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func flowsInstancesDiagramRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/diagram/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesDiagramRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesDiagramRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowDiagram.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesExecuteRetrieveError: Error, CustomStringConvertible { + // Flow not applicable + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "FlowsInstancesExecuteRetrieveError: Flow not applicable" + case .code403Error(let object): + return "FlowsInstancesExecuteRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/instances/{slug}/execute/ + /// - Execute flow for current user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func flowsInstancesExecuteRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/execute/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return FlowsInstancesExecuteRetrieveError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesExecuteRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Link.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesExportRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesExportRetrieveError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesExportRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/instances/{slug}/export/ + /// - Export flow to .yaml file + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func flowsInstancesExportRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/export/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesExportRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesExportRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Data.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesImportCreateError: Error, CustomStringConvertible { + // + case code400Error(FlowImportResult) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesImportCreateError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesImportCreateError: : \(object)" + } + } + } + + /// - POST /flows/instances/import/ + /// - Import flow from .yaml file + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter file: (form) (optional) + /// - parameter clear: (form) (optional, default to false) + /// - returns: AnyPublisher + open func flowsInstancesImportCreate(file: Data? = nil, clear: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/instances/import/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + let multipartBoundary = String(format: "Boundary+%08X%08X", arc4random(), arc4random()) + var multipartData = Data() + if let file = file { + let fileHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"file\"; filename=\"file\"\r\n") + .appending("\r\n") + multipartData.append(fileHeader.data(using: .utf8) ?? Data()) + multipartData.append(file) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + } + + if let clear = clear { + let clearHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"clear\"\r\n") + .appending("\r\n") + multipartData.append(clearHeader.data(using: .utf8) ?? Data()) + multipartData.append() + } + + multipartData.append("\r\n--\(multipartBoundary)--\r\n".data(using: .utf8) ?? Data()) + request.httpBody = multipartData + request.setValue("\(multipartData.count)", forHTTPHeaderField: "Content-Length") + request.setValue("multipart/form-data; boundary=\(multipartBoundary)", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(FlowImportResult.self, from: transportError.data) + return FlowsInstancesImportCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesImportCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(FlowImportResult.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter deniedAction + /// + public enum FlowsInstancesListDeniedAction: String, Codable, CaseIterable { + case _continue = "continue" + case message = "message" + case messageContinue = "message_continue" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter designation + /// + public enum FlowsInstancesListDesignation: String, Codable, CaseIterable { + case authentication = "authentication" + case authorization = "authorization" + case enrollment = "enrollment" + case invalidation = "invalidation" + case recovery = "recovery" + case stageConfiguration = "stage_configuration" + case unenrollment = "unenrollment" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum FlowsInstancesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesListError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesListError: : \(object)" + } + } + } + + /// - GET /flows/instances/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter deniedAction: (query) Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue (optional) + /// - parameter designation: (query) Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration (optional) + /// - parameter flowUuid: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter slug: (query) (optional) + /// - returns: AnyPublisher + open func flowsInstancesList(deniedAction: FlowsInstancesListDeniedAction? = nil, designation: FlowsInstancesListDesignation? = nil, flowUuid: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/flows/instances/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let deniedAction = deniedAction { queryItems.append(URLQueryItem(name: "denied_action", value: deniedAction.rawValue)) } + if let designation = designation { queryItems.append(URLQueryItem(name: "designation", value: designation.rawValue)) } + if let flowUuid = flowUuid { queryItems.append(URLQueryItem(name: "flow_uuid", value: flowUuid.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedFlowList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /flows/instances/{slug}/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedFlowRequest: (body) (optional) + /// - returns: AnyPublisher + open func flowsInstancesPartialUpdate(slug: String, patchedFlowRequest: PatchedFlowRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedFlowRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Flow.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesRetrieveError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesRetrieveError: : \(object)" + } + } + } + + /// - GET /flows/instances/{slug}/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func flowsInstancesRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Flow.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesSetBackgroundCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "FlowsInstancesSetBackgroundCreateError: Bad request" + case .code403Error(let object): + return "FlowsInstancesSetBackgroundCreateError: : \(object)" + } + } + } + + /// - POST /flows/instances/{slug}/set_background/ + /// - Set Flow background + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter file: (form) (optional) + /// - parameter clear: (form) (optional, default to false) + /// - returns: AnyPublisher + open func flowsInstancesSetBackgroundCreate(slug: String, file: Data? = nil, clear: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/set_background/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + let multipartBoundary = String(format: "Boundary+%08X%08X", arc4random(), arc4random()) + var multipartData = Data() + if let file = file { + let fileHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"file\"; filename=\"file\"\r\n") + .appending("\r\n") + multipartData.append(fileHeader.data(using: .utf8) ?? Data()) + multipartData.append(file) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + } + + if let clear = clear { + let clearHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"clear\"\r\n") + .appending("\r\n") + multipartData.append(clearHeader.data(using: .utf8) ?? Data()) + multipartData.append() + } + + multipartData.append("\r\n--\(multipartBoundary)--\r\n".data(using: .utf8) ?? Data()) + request.httpBody = multipartData + request.setValue("\(multipartData.count)", forHTTPHeaderField: "Content-Length") + request.setValue("multipart/form-data; boundary=\(multipartBoundary)", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return FlowsInstancesSetBackgroundCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesSetBackgroundCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesSetBackgroundUrlCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "FlowsInstancesSetBackgroundUrlCreateError: Bad request" + case .code403Error(let object): + return "FlowsInstancesSetBackgroundUrlCreateError: : \(object)" + } + } + } + + /// - POST /flows/instances/{slug}/set_background_url/ + /// - Set Flow background (as URL) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter filePathRequest: (body) + /// - returns: AnyPublisher + open func flowsInstancesSetBackgroundUrlCreate(slug: String, filePathRequest: FilePathRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/set_background_url/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(filePathRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return FlowsInstancesSetBackgroundUrlCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesSetBackgroundUrlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesUpdateError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesUpdateError: : \(object)" + } + } + } + + /// - PUT /flows/instances/{slug}/ + /// - Flow Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter flowRequest: (body) + /// - returns: AnyPublisher + open func flowsInstancesUpdate(slug: String, flowRequest: FlowRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(flowRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Flow.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum FlowsInstancesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "FlowsInstancesUsedByListError: : \(object)" + case .code403Error(let object): + return "FlowsInstancesUsedByListError: : \(object)" + } + } + } + + /// - GET /flows/instances/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func flowsInstancesUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/flows/instances/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return FlowsInstancesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return FlowsInstancesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/ManagedAPI.swift b/authentikClient/Sources/APIs/ManagedAPI.swift new file mode 100644 index 0000000..66bc601 --- /dev/null +++ b/authentikClient/Sources/APIs/ManagedAPI.swift @@ -0,0 +1,658 @@ +// +// ManagedAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class ManagedAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum ManagedBlueprintsApplyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsApplyCreateError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsApplyCreateError: : \(object)" + } + } + } + + /// - POST /managed/blueprints/{instance_uuid}/apply/ + /// - Apply a blueprint + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - returns: AnyPublisher + open func managedBlueprintsApplyCreate(instanceUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/apply/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsApplyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsApplyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(BlueprintInstance.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsAvailableListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsAvailableListError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsAvailableListError: : \(object)" + } + } + } + + /// - GET /managed/blueprints/available/ + /// - Get blueprints + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[BlueprintFile], Error> + open func managedBlueprintsAvailableList() -> AnyPublisher<[BlueprintFile], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/managed/blueprints/available/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[BlueprintFile], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsAvailableListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsAvailableListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([BlueprintFile].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsCreateError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsCreateError: : \(object)" + } + } + } + + /// - POST /managed/blueprints/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter blueprintInstanceRequest: (body) + /// - returns: AnyPublisher + open func managedBlueprintsCreate(blueprintInstanceRequest: BlueprintInstanceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/managed/blueprints/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(blueprintInstanceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(BlueprintInstance.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsDestroyError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsDestroyError: : \(object)" + } + } + } + + /// - DELETE /managed/blueprints/{instance_uuid}/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - returns: AnyPublisher + open func managedBlueprintsDestroy(instanceUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsListError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsListError: : \(object)" + } + } + } + + /// - GET /managed/blueprints/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter path: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func managedBlueprintsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/managed/blueprints/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let path = path { queryItems.append(URLQueryItem(name: "path", value: path)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedBlueprintInstanceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /managed/blueprints/{instance_uuid}/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - parameter patchedBlueprintInstanceRequest: (body) (optional) + /// - returns: AnyPublisher + open func managedBlueprintsPartialUpdate(instanceUuid: UUID, patchedBlueprintInstanceRequest: PatchedBlueprintInstanceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedBlueprintInstanceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(BlueprintInstance.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsRetrieveError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsRetrieveError: : \(object)" + } + } + } + + /// - GET /managed/blueprints/{instance_uuid}/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - returns: AnyPublisher + open func managedBlueprintsRetrieve(instanceUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(BlueprintInstance.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsUpdateError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsUpdateError: : \(object)" + } + } + } + + /// - PUT /managed/blueprints/{instance_uuid}/ + /// - Blueprint instances + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - parameter blueprintInstanceRequest: (body) + /// - returns: AnyPublisher + open func managedBlueprintsUpdate(instanceUuid: UUID, blueprintInstanceRequest: BlueprintInstanceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(blueprintInstanceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(BlueprintInstance.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ManagedBlueprintsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ManagedBlueprintsUsedByListError: : \(object)" + case .code403Error(let object): + return "ManagedBlueprintsUsedByListError: : \(object)" + } + } + } + + /// - GET /managed/blueprints/{instance_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter instanceUuid: (path) A UUID string identifying this Blueprint Instance. + /// - returns: AnyPublisher<[UsedBy], Error> + open func managedBlueprintsUsedByList(instanceUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/managed/blueprints/{instance_uuid}/used_by/" + path = path.replacingOccurrences(of: "{instance_uuid}", with: instanceUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ManagedBlueprintsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ManagedBlueprintsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/Oauth2API.swift b/authentikClient/Sources/APIs/Oauth2API.swift new file mode 100644 index 0000000..e57ccd9 --- /dev/null +++ b/authentikClient/Sources/APIs/Oauth2API.swift @@ -0,0 +1,881 @@ +// +// Oauth2API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class Oauth2API { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum Oauth2AccessTokensDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AccessTokensDestroyError: : \(object)" + case .code403Error(let object): + return "Oauth2AccessTokensDestroyError: : \(object)" + } + } + } + + /// - DELETE /oauth2/access_tokens/{id}/ + /// - AccessToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. + /// - returns: AnyPublisher + open func oauth2AccessTokensDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/access_tokens/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AccessTokensDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AccessTokensDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AccessTokensListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AccessTokensListError: : \(object)" + case .code403Error(let object): + return "Oauth2AccessTokensListError: : \(object)" + } + } + } + + /// - GET /oauth2/access_tokens/ + /// - AccessToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter provider: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func oauth2AccessTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/oauth2/access_tokens/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let provider = provider { queryItems.append(URLQueryItem(name: "provider", value: "\(provider)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AccessTokensListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AccessTokensListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTokenModelList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AccessTokensRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AccessTokensRetrieveError: : \(object)" + case .code403Error(let object): + return "Oauth2AccessTokensRetrieveError: : \(object)" + } + } + } + + /// - GET /oauth2/access_tokens/{id}/ + /// - AccessToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. + /// - returns: AnyPublisher + open func oauth2AccessTokensRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/access_tokens/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AccessTokensRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AccessTokensRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TokenModel.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AccessTokensUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AccessTokensUsedByListError: : \(object)" + case .code403Error(let object): + return "Oauth2AccessTokensUsedByListError: : \(object)" + } + } + } + + /// - GET /oauth2/access_tokens/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Access Token. + /// - returns: AnyPublisher<[UsedBy], Error> + open func oauth2AccessTokensUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/access_tokens/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AccessTokensUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AccessTokensUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AuthorizationCodesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AuthorizationCodesDestroyError: : \(object)" + case .code403Error(let object): + return "Oauth2AuthorizationCodesDestroyError: : \(object)" + } + } + } + + /// - DELETE /oauth2/authorization_codes/{id}/ + /// - AuthorizationCode Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Authorization Code. + /// - returns: AnyPublisher + open func oauth2AuthorizationCodesDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/authorization_codes/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AuthorizationCodesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AuthorizationCodesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AuthorizationCodesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AuthorizationCodesListError: : \(object)" + case .code403Error(let object): + return "Oauth2AuthorizationCodesListError: : \(object)" + } + } + } + + /// - GET /oauth2/authorization_codes/ + /// - AuthorizationCode Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter provider: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func oauth2AuthorizationCodesList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/oauth2/authorization_codes/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let provider = provider { queryItems.append(URLQueryItem(name: "provider", value: "\(provider)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AuthorizationCodesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AuthorizationCodesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedExpiringBaseGrantModelList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AuthorizationCodesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AuthorizationCodesRetrieveError: : \(object)" + case .code403Error(let object): + return "Oauth2AuthorizationCodesRetrieveError: : \(object)" + } + } + } + + /// - GET /oauth2/authorization_codes/{id}/ + /// - AuthorizationCode Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Authorization Code. + /// - returns: AnyPublisher + open func oauth2AuthorizationCodesRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/authorization_codes/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AuthorizationCodesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AuthorizationCodesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ExpiringBaseGrantModel.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2AuthorizationCodesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2AuthorizationCodesUsedByListError: : \(object)" + case .code403Error(let object): + return "Oauth2AuthorizationCodesUsedByListError: : \(object)" + } + } + } + + /// - GET /oauth2/authorization_codes/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Authorization Code. + /// - returns: AnyPublisher<[UsedBy], Error> + open func oauth2AuthorizationCodesUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/authorization_codes/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2AuthorizationCodesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2AuthorizationCodesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2RefreshTokensDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2RefreshTokensDestroyError: : \(object)" + case .code403Error(let object): + return "Oauth2RefreshTokensDestroyError: : \(object)" + } + } + } + + /// - DELETE /oauth2/refresh_tokens/{id}/ + /// - RefreshToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. + /// - returns: AnyPublisher + open func oauth2RefreshTokensDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/refresh_tokens/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2RefreshTokensDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2RefreshTokensDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2RefreshTokensListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2RefreshTokensListError: : \(object)" + case .code403Error(let object): + return "Oauth2RefreshTokensListError: : \(object)" + } + } + } + + /// - GET /oauth2/refresh_tokens/ + /// - RefreshToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter provider: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func oauth2RefreshTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/oauth2/refresh_tokens/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let provider = provider { queryItems.append(URLQueryItem(name: "provider", value: "\(provider)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2RefreshTokensListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2RefreshTokensListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedTokenModelList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2RefreshTokensRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2RefreshTokensRetrieveError: : \(object)" + case .code403Error(let object): + return "Oauth2RefreshTokensRetrieveError: : \(object)" + } + } + } + + /// - GET /oauth2/refresh_tokens/{id}/ + /// - RefreshToken Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. + /// - returns: AnyPublisher + open func oauth2RefreshTokensRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/refresh_tokens/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2RefreshTokensRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2RefreshTokensRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(TokenModel.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum Oauth2RefreshTokensUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "Oauth2RefreshTokensUsedByListError: : \(object)" + case .code403Error(let object): + return "Oauth2RefreshTokensUsedByListError: : \(object)" + } + } + } + + /// - GET /oauth2/refresh_tokens/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2 Refresh Token. + /// - returns: AnyPublisher<[UsedBy], Error> + open func oauth2RefreshTokensUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/oauth2/refresh_tokens/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return Oauth2RefreshTokensUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return Oauth2RefreshTokensUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/OutpostsAPI.swift b/authentikClient/Sources/APIs/OutpostsAPI.swift new file mode 100644 index 0000000..fca6423 --- /dev/null +++ b/authentikClient/Sources/APIs/OutpostsAPI.swift @@ -0,0 +1,2542 @@ +// +// OutpostsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class OutpostsAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum OutpostsInstancesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesCreateError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesCreateError: : \(object)" + } + } + } + + /// - POST /outposts/instances/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter outpostRequest: (body) + /// - returns: AnyPublisher + open func outpostsInstancesCreate(outpostRequest: OutpostRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/instances/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(outpostRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Outpost.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesDefaultSettingsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesDefaultSettingsRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesDefaultSettingsRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/instances/default_settings/ + /// - Global default outpost config + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func outpostsInstancesDefaultSettingsRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/instances/default_settings/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesDefaultSettingsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesDefaultSettingsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OutpostDefaultConfig.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesDestroyError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesDestroyError: : \(object)" + } + } + } + + /// - DELETE /outposts/instances/{uuid}/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - returns: AnyPublisher + open func outpostsInstancesDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesHealthListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesHealthListError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesHealthListError: : \(object)" + } + } + } + + /// - GET /outposts/instances/{uuid}/health/ + /// - Get outposts current health + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - parameter managedIcontains: (query) (optional) + /// - parameter managedIexact: (query) (optional) + /// - parameter nameIcontains: (query) (optional) + /// - parameter nameIexact: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter providersIsnull: (query) (optional) + /// - parameter providersByPk: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter serviceConnectionNameIcontains: (query) (optional) + /// - parameter serviceConnectionNameIexact: (query) (optional) + /// - returns: AnyPublisher<[OutpostHealth], Error> + open func outpostsInstancesHealthList(uuid: UUID, managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil) -> AnyPublisher<[OutpostHealth], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/health/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let managedIcontains = managedIcontains { queryItems.append(URLQueryItem(name: "managed__icontains", value: managedIcontains)) } + if let managedIexact = managedIexact { queryItems.append(URLQueryItem(name: "managed__iexact", value: managedIexact)) } + if let nameIcontains = nameIcontains { queryItems.append(URLQueryItem(name: "name__icontains", value: nameIcontains)) } + if let nameIexact = nameIexact { queryItems.append(URLQueryItem(name: "name__iexact", value: nameIexact)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let providersIsnull = providersIsnull { queryItems.append(URLQueryItem(name: "providers__isnull", value: providersIsnull ? "true" : "false")) } + if let providersByPk = providersByPk { queryItems.append(URLQueryItem(name: "providers_by_pk", value: String(data: try self.encoder.encode(providersByPk), encoding: .utf8) ?? "")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let serviceConnectionNameIcontains = serviceConnectionNameIcontains { queryItems.append(URLQueryItem(name: "service_connection__name__icontains", value: serviceConnectionNameIcontains)) } + if let serviceConnectionNameIexact = serviceConnectionNameIexact { queryItems.append(URLQueryItem(name: "service_connection__name__iexact", value: serviceConnectionNameIexact)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[OutpostHealth], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesHealthListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesHealthListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([OutpostHealth].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesListError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesListError: : \(object)" + } + } + } + + /// - GET /outposts/instances/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter managedIcontains: (query) (optional) + /// - parameter managedIexact: (query) (optional) + /// - parameter nameIcontains: (query) (optional) + /// - parameter nameIexact: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter providersIsnull: (query) (optional) + /// - parameter providersByPk: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter serviceConnectionNameIcontains: (query) (optional) + /// - parameter serviceConnectionNameIexact: (query) (optional) + /// - returns: AnyPublisher + open func outpostsInstancesList(managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/instances/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let managedIcontains = managedIcontains { queryItems.append(URLQueryItem(name: "managed__icontains", value: managedIcontains)) } + if let managedIexact = managedIexact { queryItems.append(URLQueryItem(name: "managed__iexact", value: managedIexact)) } + if let nameIcontains = nameIcontains { queryItems.append(URLQueryItem(name: "name__icontains", value: nameIcontains)) } + if let nameIexact = nameIexact { queryItems.append(URLQueryItem(name: "name__iexact", value: nameIexact)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let providersIsnull = providersIsnull { queryItems.append(URLQueryItem(name: "providers__isnull", value: providersIsnull ? "true" : "false")) } + if let providersByPk = providersByPk { queryItems.append(URLQueryItem(name: "providers_by_pk", value: String(data: try self.encoder.encode(providersByPk), encoding: .utf8) ?? "")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let serviceConnectionNameIcontains = serviceConnectionNameIcontains { queryItems.append(URLQueryItem(name: "service_connection__name__icontains", value: serviceConnectionNameIcontains)) } + if let serviceConnectionNameIexact = serviceConnectionNameIexact { queryItems.append(URLQueryItem(name: "service_connection__name__iexact", value: serviceConnectionNameIexact)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedOutpostList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /outposts/instances/{uuid}/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - parameter patchedOutpostRequest: (body) (optional) + /// - returns: AnyPublisher + open func outpostsInstancesPartialUpdate(uuid: UUID, patchedOutpostRequest: PatchedOutpostRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedOutpostRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Outpost.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/instances/{uuid}/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - returns: AnyPublisher + open func outpostsInstancesRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Outpost.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesUpdateError: : \(object)" + } + } + } + + /// - PUT /outposts/instances/{uuid}/ + /// - Outpost Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - parameter outpostRequest: (body) + /// - returns: AnyPublisher + open func outpostsInstancesUpdate(uuid: UUID, outpostRequest: OutpostRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(outpostRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Outpost.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsInstancesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsInstancesUsedByListError: : \(object)" + case .code403Error(let object): + return "OutpostsInstancesUsedByListError: : \(object)" + } + } + } + + /// - GET /outposts/instances/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost. + /// - returns: AnyPublisher<[UsedBy], Error> + open func outpostsInstancesUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/instances/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsInstancesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsInstancesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsLdapListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsLdapListError: : \(object)" + case .code403Error(let object): + return "OutpostsLdapListError: : \(object)" + } + } + } + + /// - GET /outposts/ldap/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func outpostsLdapList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/ldap/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsLdapListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsLdapListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedLDAPOutpostConfigList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsLdapRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsLdapRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsLdapRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/ldap/{id}/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - returns: AnyPublisher + open func outpostsLdapRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/ldap/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsLdapRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsLdapRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPOutpostConfig.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsProxyListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsProxyListError: : \(object)" + case .code403Error(let object): + return "OutpostsProxyListError: : \(object)" + } + } + } + + /// - GET /outposts/proxy/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func outpostsProxyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/proxy/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsProxyListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsProxyListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedProxyOutpostConfigList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsProxyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsProxyRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsProxyRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/proxy/{id}/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - returns: AnyPublisher + open func outpostsProxyRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/proxy/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsProxyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsProxyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ProxyOutpostConfig.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsRadiusListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsRadiusListError: : \(object)" + case .code403Error(let object): + return "OutpostsRadiusListError: : \(object)" + } + } + } + + /// - GET /outposts/radius/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func outpostsRadiusList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/radius/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsRadiusListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsRadiusListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedRadiusOutpostConfigList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsRadiusRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsRadiusRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsRadiusRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/radius/{id}/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - returns: AnyPublisher + open func outpostsRadiusRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/radius/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsRadiusRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsRadiusRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RadiusOutpostConfig.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllDestroyError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /outposts/service_connections/all/{uuid}/ + /// - ServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsAllDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/all/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/all/ + /// - ServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedServiceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/all/{uuid}/ + /// - ServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsAllRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/all/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllStateRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllStateRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllStateRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/all/{uuid}/state/ + /// - Get the service connection's state + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsAllStateRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/all/{uuid}/state/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllStateRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllStateRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ServiceConnectionState.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllTypesListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllTypesListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/all/types/ + /// - Get all creatable service connection types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func outpostsServiceConnectionsAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsAllUsedByListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsAllUsedByListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/all/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Outpost Service-Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func outpostsServiceConnectionsAllUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/all/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerCreateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerCreateError: : \(object)" + } + } + } + + /// - POST /outposts/service_connections/docker/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter dockerServiceConnectionRequest: (body) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerCreate(dockerServiceConnectionRequest: DockerServiceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/docker/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(dockerServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DockerServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerDestroyError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerDestroyError: : \(object)" + } + } + } + + /// - DELETE /outposts/service_connections/docker/{uuid}/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/docker/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/docker/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter local: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter tlsAuthentication: (query) (optional) + /// - parameter tlsVerification: (query) (optional) + /// - parameter url: (query) (optional) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tlsAuthentication: UUID? = nil, tlsVerification: UUID? = nil, url: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/docker/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let local = local { queryItems.append(URLQueryItem(name: "local", value: local ? "true" : "false")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let tlsAuthentication = tlsAuthentication { queryItems.append(URLQueryItem(name: "tls_authentication", value: tlsAuthentication.uuidString)) } + if let tlsVerification = tlsVerification { queryItems.append(URLQueryItem(name: "tls_verification", value: tlsVerification.uuidString)) } + if let url = url { queryItems.append(URLQueryItem(name: "url", value: url)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDockerServiceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerPartialUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /outposts/service_connections/docker/{uuid}/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. + /// - parameter patchedDockerServiceConnectionRequest: (body) (optional) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerPartialUpdate(uuid: UUID, patchedDockerServiceConnectionRequest: PatchedDockerServiceConnectionRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/docker/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDockerServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DockerServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/docker/{uuid}/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/docker/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DockerServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerUpdateError: : \(object)" + } + } + } + + /// - PUT /outposts/service_connections/docker/{uuid}/ + /// - DockerServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. + /// - parameter dockerServiceConnectionRequest: (body) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsDockerUpdate(uuid: UUID, dockerServiceConnectionRequest: DockerServiceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/docker/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(dockerServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DockerServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsDockerUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsDockerUsedByListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsDockerUsedByListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/docker/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Docker Service-Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func outpostsServiceConnectionsDockerUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/docker/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsDockerUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesCreateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesCreateError: : \(object)" + } + } + } + + /// - POST /outposts/service_connections/kubernetes/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter kubernetesServiceConnectionRequest: (body) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesCreate(kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/kubernetes/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(kubernetesServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(KubernetesServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesDestroyError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesDestroyError: : \(object)" + } + } + } + + /// - DELETE /outposts/service_connections/kubernetes/{uuid}/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/kubernetes/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/kubernetes/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter local: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/outposts/service_connections/kubernetes/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let local = local { queryItems.append(URLQueryItem(name: "local", value: local ? "true" : "false")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedKubernetesServiceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /outposts/service_connections/kubernetes/{uuid}/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. + /// - parameter patchedKubernetesServiceConnectionRequest: (body) (optional) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesPartialUpdate(uuid: UUID, patchedKubernetesServiceConnectionRequest: PatchedKubernetesServiceConnectionRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/kubernetes/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedKubernetesServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(KubernetesServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesRetrieveError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesRetrieveError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/kubernetes/{uuid}/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/kubernetes/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(KubernetesServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesUpdateError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesUpdateError: : \(object)" + } + } + } + + /// - PUT /outposts/service_connections/kubernetes/{uuid}/ + /// - KubernetesServiceConnection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. + /// - parameter kubernetesServiceConnectionRequest: (body) + /// - returns: AnyPublisher + open func outpostsServiceConnectionsKubernetesUpdate(uuid: UUID, kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/kubernetes/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(kubernetesServiceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(KubernetesServiceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum OutpostsServiceConnectionsKubernetesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "OutpostsServiceConnectionsKubernetesUsedByListError: : \(object)" + case .code403Error(let object): + return "OutpostsServiceConnectionsKubernetesUsedByListError: : \(object)" + } + } + } + + /// - GET /outposts/service_connections/kubernetes/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Kubernetes Service-Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func outpostsServiceConnectionsKubernetesUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/outposts/service_connections/kubernetes/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return OutpostsServiceConnectionsKubernetesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/PoliciesAPI.swift b/authentikClient/Sources/APIs/PoliciesAPI.swift new file mode 100644 index 0000000..29121f4 --- /dev/null +++ b/authentikClient/Sources/APIs/PoliciesAPI.swift @@ -0,0 +1,4454 @@ +// +// PoliciesAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class PoliciesAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum PoliciesAllCacheClearCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "PoliciesAllCacheClearCreateError: Bad request" + case .code403Error(let object): + return "PoliciesAllCacheClearCreateError: : \(object)" + } + } + } + + /// - POST /policies/all/cache_clear/ + /// - Clear policy cache + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func policiesAllCacheClearCreate() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/all/cache_clear/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return PoliciesAllCacheClearCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllCacheClearCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllCacheInfoRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllCacheInfoRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesAllCacheInfoRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/all/cache_info/ + /// - Info about cached policies + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func policiesAllCacheInfoRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/all/cache_info/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllCacheInfoRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllCacheInfoRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Cache.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/all/{policy_uuid}/ + /// - Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Policy. + /// - returns: AnyPublisher + open func policiesAllDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/all/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllListError: : \(object)" + case .code403Error(let object): + return "PoliciesAllListError: : \(object)" + } + } + } + + /// - GET /policies/all/ + /// - Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter bindingsIsnull: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter promptstageIsnull: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func policiesAllList(bindingsIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, promptstageIsnull: Bool? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let bindingsIsnull = bindingsIsnull { queryItems.append(URLQueryItem(name: "bindings__isnull", value: bindingsIsnull ? "true" : "false")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let promptstageIsnull = promptstageIsnull { queryItems.append(URLQueryItem(name: "promptstage__isnull", value: promptstageIsnull ? "true" : "false")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesAllRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/all/{policy_uuid}/ + /// - Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Policy. + /// - returns: AnyPublisher + open func policiesAllRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/all/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Policy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllTestCreateError: Error, CustomStringConvertible { + // Invalid parameters + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "PoliciesAllTestCreateError: Invalid parameters" + case .code403Error(let object): + return "PoliciesAllTestCreateError: : \(object)" + } + } + } + + /// - POST /policies/all/{policy_uuid}/test/ + /// - Test policy + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Policy. + /// - parameter policyTestRequest: (body) + /// - returns: AnyPublisher + open func policiesAllTestCreate(policyUuid: UUID, policyTestRequest: PolicyTestRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/all/{policy_uuid}/test/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(policyTestRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return PoliciesAllTestCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllTestCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyTestResult.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllTypesListError: : \(object)" + case .code403Error(let object): + return "PoliciesAllTypesListError: : \(object)" + } + } + } + + /// - GET /policies/all/types/ + /// - Get all creatable policy types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func policiesAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesAllUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesAllUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/all/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesAllUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/all/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsCreateError: : \(object)" + } + } + } + + /// - POST /policies/bindings/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingRequest: (body) + /// - returns: AnyPublisher + open func policiesBindingsCreate(policyBindingRequest: PolicyBindingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/bindings/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(policyBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/bindings/{policy_binding_uuid}/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. + /// - returns: AnyPublisher + open func policiesBindingsDestroy(policyBindingUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/bindings/{policy_binding_uuid}/" + path = path.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsListError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsListError: : \(object)" + } + } + } + + /// - GET /policies/bindings/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter enabled: (query) (optional) + /// - parameter order: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policy: (query) (optional) + /// - parameter policyIsnull: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter target: (query) (optional) + /// - parameter targetIn: (query) (optional) + /// - parameter timeout: (query) (optional) + /// - returns: AnyPublisher + open func policiesBindingsList(enabled: Bool? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policy: UUID? = nil, policyIsnull: Bool? = nil, search: String? = nil, target: UUID? = nil, targetIn: [UUID]? = nil, timeout: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/bindings/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let enabled = enabled { queryItems.append(URLQueryItem(name: "enabled", value: enabled ? "true" : "false")) } + if let order = order { queryItems.append(URLQueryItem(name: "order", value: "\(order)")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policy = policy { queryItems.append(URLQueryItem(name: "policy", value: policy.uuidString)) } + if let policyIsnull = policyIsnull { queryItems.append(URLQueryItem(name: "policy__isnull", value: policyIsnull ? "true" : "false")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let target = target { queryItems.append(URLQueryItem(name: "target", value: target.uuidString)) } + if let targetIn = targetIn { queryItems.append(URLQueryItem(name: "target_in", value: targetIn.map { $0.uuidString }.joined(separator: ","))) } + if let timeout = timeout { queryItems.append(URLQueryItem(name: "timeout", value: "\(timeout)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPolicyBindingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/bindings/{policy_binding_uuid}/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. + /// - parameter patchedPolicyBindingRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesBindingsPartialUpdate(policyBindingUuid: UUID, patchedPolicyBindingRequest: PatchedPolicyBindingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/bindings/{policy_binding_uuid}/" + path = path.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPolicyBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/bindings/{policy_binding_uuid}/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. + /// - returns: AnyPublisher + open func policiesBindingsRetrieve(policyBindingUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/bindings/{policy_binding_uuid}/" + path = path.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/bindings/{policy_binding_uuid}/ + /// - PolicyBinding Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. + /// - parameter policyBindingRequest: (body) + /// - returns: AnyPublisher + open func policiesBindingsUpdate(policyBindingUuid: UUID, policyBindingRequest: PolicyBindingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/bindings/{policy_binding_uuid}/" + path = path.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(policyBindingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PolicyBinding.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesBindingsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesBindingsUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesBindingsUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/bindings/{policy_binding_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyBindingUuid: (path) A UUID string identifying this Policy Binding. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesBindingsUsedByList(policyBindingUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/bindings/{policy_binding_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_binding_uuid}", with: policyBindingUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesBindingsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesBindingsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyCreateError: : \(object)" + } + } + } + + /// - POST /policies/dummy/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter dummyPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesDummyCreate(dummyPolicyRequest: DummyPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/dummy/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(dummyPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/dummy/{policy_uuid}/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. + /// - returns: AnyPublisher + open func policiesDummyDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/dummy/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyListError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyListError: : \(object)" + } + } + } + + /// - GET /policies/dummy/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter created: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter result: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter waitMax: (query) (optional) + /// - parameter waitMin: (query) (optional) + /// - returns: AnyPublisher + open func policiesDummyList(created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, result: Bool? = nil, search: String? = nil, waitMax: Int? = nil, waitMin: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/dummy/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let result = result { queryItems.append(URLQueryItem(name: "result", value: result ? "true" : "false")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let waitMax = waitMax { queryItems.append(URLQueryItem(name: "wait_max", value: "\(waitMax)")) } + if let waitMin = waitMin { queryItems.append(URLQueryItem(name: "wait_min", value: "\(waitMin)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDummyPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/dummy/{policy_uuid}/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. + /// - parameter patchedDummyPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesDummyPartialUpdate(policyUuid: UUID, patchedDummyPolicyRequest: PatchedDummyPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/dummy/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDummyPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/dummy/{policy_uuid}/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. + /// - returns: AnyPublisher + open func policiesDummyRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/dummy/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/dummy/{policy_uuid}/ + /// - Dummy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. + /// - parameter dummyPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesDummyUpdate(policyUuid: UUID, dummyPolicyRequest: DummyPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/dummy/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(dummyPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesDummyUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesDummyUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesDummyUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/dummy/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Dummy Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesDummyUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/dummy/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesDummyUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesDummyUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherCreateError: : \(object)" + } + } + } + + /// - POST /policies/event_matcher/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter eventMatcherPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesEventMatcherCreate(eventMatcherPolicyRequest: EventMatcherPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/event_matcher/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(eventMatcherPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EventMatcherPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/event_matcher/{policy_uuid}/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. + /// - returns: AnyPublisher + open func policiesEventMatcherDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/event_matcher/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter action + /// + public enum PoliciesEventMatcherListAction: String, Codable, CaseIterable { + case authorizeApplication = "authorize_application" + case configurationError = "configuration_error" + case custom = "custom_" + case emailSent = "email_sent" + case flowExecution = "flow_execution" + case impersonationEnded = "impersonation_ended" + case impersonationStarted = "impersonation_started" + case invitationUsed = "invitation_used" + case login = "login" + case loginFailed = "login_failed" + case logout = "logout" + case modelCreated = "model_created" + case modelDeleted = "model_deleted" + case modelUpdated = "model_updated" + case passwordSet = "password_set" + case policyException = "policy_exception" + case policyExecution = "policy_execution" + case propertyMappingException = "property_mapping_exception" + case secretRotate = "secret_rotate" + case secretView = "secret_view" + case sourceLinked = "source_linked" + case suspiciousRequest = "suspicious_request" + case systemException = "system_exception" + case systemTaskException = "system_task_exception" + case systemTaskExecution = "system_task_execution" + case updateAvailable = "update_available" + case userWrite = "user_write" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum PoliciesEventMatcherListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherListError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherListError: : \(object)" + } + } + } + + /// - GET /policies/event_matcher/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter action: (query) Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix (optional) + /// - parameter app: (query) (optional) + /// - parameter clientIp: (query) (optional) + /// - parameter created: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter model: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func policiesEventMatcherList(action: PoliciesEventMatcherListAction? = nil, app: String? = nil, clientIp: String? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, model: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/event_matcher/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let action = action { queryItems.append(URLQueryItem(name: "action", value: action.rawValue)) } + if let app = app { queryItems.append(URLQueryItem(name: "app", value: app)) } + if let clientIp = clientIp { queryItems.append(URLQueryItem(name: "client_ip", value: clientIp)) } + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let model = model { queryItems.append(URLQueryItem(name: "model", value: model)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedEventMatcherPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/event_matcher/{policy_uuid}/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. + /// - parameter patchedEventMatcherPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesEventMatcherPartialUpdate(policyUuid: UUID, patchedEventMatcherPolicyRequest: PatchedEventMatcherPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/event_matcher/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedEventMatcherPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EventMatcherPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/event_matcher/{policy_uuid}/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. + /// - returns: AnyPublisher + open func policiesEventMatcherRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/event_matcher/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EventMatcherPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/event_matcher/{policy_uuid}/ + /// - Event Matcher Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. + /// - parameter eventMatcherPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesEventMatcherUpdate(policyUuid: UUID, eventMatcherPolicyRequest: EventMatcherPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/event_matcher/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(eventMatcherPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EventMatcherPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesEventMatcherUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesEventMatcherUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesEventMatcherUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/event_matcher/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Event Matcher Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesEventMatcherUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/event_matcher/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesEventMatcherUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesEventMatcherUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionCreateError: : \(object)" + } + } + } + + /// - POST /policies/expression/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter expressionPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesExpressionCreate(expressionPolicyRequest: ExpressionPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/expression/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(expressionPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ExpressionPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/expression/{policy_uuid}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Expression Policy. + /// - returns: AnyPublisher + open func policiesExpressionDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/expression/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionListError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionListError: : \(object)" + } + } + } + + /// - GET /policies/expression/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter created: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter expression: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func policiesExpressionList(created: Date? = nil, executionLogging: Bool? = nil, expression: String? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/expression/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let expression = expression { queryItems.append(URLQueryItem(name: "expression", value: expression)) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedExpressionPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/expression/{policy_uuid}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Expression Policy. + /// - parameter patchedExpressionPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesExpressionPartialUpdate(policyUuid: UUID, patchedExpressionPolicyRequest: PatchedExpressionPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/expression/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedExpressionPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ExpressionPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/expression/{policy_uuid}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Expression Policy. + /// - returns: AnyPublisher + open func policiesExpressionRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/expression/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ExpressionPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/expression/{policy_uuid}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Expression Policy. + /// - parameter expressionPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesExpressionUpdate(policyUuid: UUID, expressionPolicyRequest: ExpressionPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/expression/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(expressionPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ExpressionPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesExpressionUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesExpressionUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesExpressionUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/expression/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Expression Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesExpressionUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/expression/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesExpressionUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesExpressionUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordCreateError: : \(object)" + } + } + } + + /// - POST /policies/password/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter passwordPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesPasswordCreate(passwordPolicyRequest: PasswordPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/password/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(passwordPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/password/{policy_uuid}/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Policy. + /// - returns: AnyPublisher + open func policiesPasswordDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryCreateError: : \(object)" + } + } + } + + /// - POST /policies/password_expiry/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter passwordExpiryPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesPasswordExpiryCreate(passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/password_expiry/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(passwordExpiryPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordExpiryPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/password_expiry/{policy_uuid}/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. + /// - returns: AnyPublisher + open func policiesPasswordExpiryDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password_expiry/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryListError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryListError: : \(object)" + } + } + } + + /// - GET /policies/password_expiry/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter created: (query) (optional) + /// - parameter days: (query) (optional) + /// - parameter denyOnly: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func policiesPasswordExpiryList(created: Date? = nil, days: Int? = nil, denyOnly: Bool? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/password_expiry/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let days = days { queryItems.append(URLQueryItem(name: "days", value: "\(days)")) } + if let denyOnly = denyOnly { queryItems.append(URLQueryItem(name: "deny_only", value: denyOnly ? "true" : "false")) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPasswordExpiryPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/password_expiry/{policy_uuid}/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. + /// - parameter patchedPasswordExpiryPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesPasswordExpiryPartialUpdate(policyUuid: UUID, patchedPasswordExpiryPolicyRequest: PatchedPasswordExpiryPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password_expiry/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPasswordExpiryPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordExpiryPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/password_expiry/{policy_uuid}/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. + /// - returns: AnyPublisher + open func policiesPasswordExpiryRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password_expiry/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordExpiryPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/password_expiry/{policy_uuid}/ + /// - Password Expiry Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. + /// - parameter passwordExpiryPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesPasswordExpiryUpdate(policyUuid: UUID, passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password_expiry/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(passwordExpiryPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordExpiryPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordExpiryUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordExpiryUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordExpiryUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/password_expiry/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Expiry Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesPasswordExpiryUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password_expiry/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordExpiryUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordExpiryUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordListError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordListError: : \(object)" + } + } + } + + /// - GET /policies/password/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter amountDigits: (query) (optional) + /// - parameter amountLowercase: (query) (optional) + /// - parameter amountSymbols: (query) (optional) + /// - parameter amountUppercase: (query) (optional) + /// - parameter checkHaveIBeenPwned: (query) (optional) + /// - parameter checkStaticRules: (query) (optional) + /// - parameter checkZxcvbn: (query) (optional) + /// - parameter created: (query) (optional) + /// - parameter errorMessage: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter hibpAllowedCount: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter lengthMin: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter passwordField: (query) (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter symbolCharset: (query) (optional) + /// - parameter zxcvbnScoreThreshold: (query) (optional) + /// - returns: AnyPublisher + open func policiesPasswordList(amountDigits: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, amountUppercase: Int? = nil, checkHaveIBeenPwned: Bool? = nil, checkStaticRules: Bool? = nil, checkZxcvbn: Bool? = nil, created: Date? = nil, errorMessage: String? = nil, executionLogging: Bool? = nil, hibpAllowedCount: Int? = nil, lastUpdated: Date? = nil, lengthMin: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordField: String? = nil, policyUuid: UUID? = nil, search: String? = nil, symbolCharset: String? = nil, zxcvbnScoreThreshold: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/password/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let amountDigits = amountDigits { queryItems.append(URLQueryItem(name: "amount_digits", value: "\(amountDigits)")) } + if let amountLowercase = amountLowercase { queryItems.append(URLQueryItem(name: "amount_lowercase", value: "\(amountLowercase)")) } + if let amountSymbols = amountSymbols { queryItems.append(URLQueryItem(name: "amount_symbols", value: "\(amountSymbols)")) } + if let amountUppercase = amountUppercase { queryItems.append(URLQueryItem(name: "amount_uppercase", value: "\(amountUppercase)")) } + if let checkHaveIBeenPwned = checkHaveIBeenPwned { queryItems.append(URLQueryItem(name: "check_have_i_been_pwned", value: checkHaveIBeenPwned ? "true" : "false")) } + if let checkStaticRules = checkStaticRules { queryItems.append(URLQueryItem(name: "check_static_rules", value: checkStaticRules ? "true" : "false")) } + if let checkZxcvbn = checkZxcvbn { queryItems.append(URLQueryItem(name: "check_zxcvbn", value: checkZxcvbn ? "true" : "false")) } + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let errorMessage = errorMessage { queryItems.append(URLQueryItem(name: "error_message", value: errorMessage)) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let hibpAllowedCount = hibpAllowedCount { queryItems.append(URLQueryItem(name: "hibp_allowed_count", value: "\(hibpAllowedCount)")) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let lengthMin = lengthMin { queryItems.append(URLQueryItem(name: "length_min", value: "\(lengthMin)")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let passwordField = passwordField { queryItems.append(URLQueryItem(name: "password_field", value: passwordField)) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let symbolCharset = symbolCharset { queryItems.append(URLQueryItem(name: "symbol_charset", value: symbolCharset)) } + if let zxcvbnScoreThreshold = zxcvbnScoreThreshold { queryItems.append(URLQueryItem(name: "zxcvbn_score_threshold", value: "\(zxcvbnScoreThreshold)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPasswordPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/password/{policy_uuid}/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Policy. + /// - parameter patchedPasswordPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesPasswordPartialUpdate(policyUuid: UUID, patchedPasswordPolicyRequest: PatchedPasswordPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPasswordPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/password/{policy_uuid}/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Policy. + /// - returns: AnyPublisher + open func policiesPasswordRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/password/{policy_uuid}/ + /// - Password Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Policy. + /// - parameter passwordPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesPasswordUpdate(policyUuid: UUID, passwordPolicyRequest: PasswordPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(passwordPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesPasswordUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesPasswordUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesPasswordUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/password/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Password Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesPasswordUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/password/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesPasswordUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesPasswordUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationCreateError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationCreateError: : \(object)" + } + } + } + + /// - POST /policies/reputation/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter reputationPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesReputationCreate(reputationPolicyRequest: ReputationPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/reputation/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(reputationPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ReputationPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/reputation/{policy_uuid}/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. + /// - returns: AnyPublisher + open func policiesReputationDestroy(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationListError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationListError: : \(object)" + } + } + } + + /// - GET /policies/reputation/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter checkIp: (query) (optional) + /// - parameter checkUsername: (query) (optional) + /// - parameter created: (query) (optional) + /// - parameter executionLogging: (query) (optional) + /// - parameter lastUpdated: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter threshold: (query) (optional) + /// - returns: AnyPublisher + open func policiesReputationList(checkIp: Bool? = nil, checkUsername: Bool? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, threshold: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/reputation/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let checkIp = checkIp { queryItems.append(URLQueryItem(name: "check_ip", value: checkIp ? "true" : "false")) } + if let checkUsername = checkUsername { queryItems.append(URLQueryItem(name: "check_username", value: checkUsername ? "true" : "false")) } + if let created = created { queryItems.append(URLQueryItem(name: "created", value: OpenISO8601DateFormatter.shared.string(from: created))) } + if let executionLogging = executionLogging { queryItems.append(URLQueryItem(name: "execution_logging", value: executionLogging ? "true" : "false")) } + if let lastUpdated = lastUpdated { queryItems.append(URLQueryItem(name: "last_updated", value: OpenISO8601DateFormatter.shared.string(from: lastUpdated))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyUuid = policyUuid { queryItems.append(URLQueryItem(name: "policy_uuid", value: policyUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let threshold = threshold { queryItems.append(URLQueryItem(name: "threshold", value: "\(threshold)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedReputationPolicyList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /policies/reputation/{policy_uuid}/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. + /// - parameter patchedReputationPolicyRequest: (body) (optional) + /// - returns: AnyPublisher + open func policiesReputationPartialUpdate(policyUuid: UUID, patchedReputationPolicyRequest: PatchedReputationPolicyRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedReputationPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ReputationPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/reputation/{policy_uuid}/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. + /// - returns: AnyPublisher + open func policiesReputationRetrieve(policyUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ReputationPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationScoresDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationScoresDestroyError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationScoresDestroyError: : \(object)" + } + } + } + + /// - DELETE /policies/reputation/scores/{reputation_uuid}/ + /// - Reputation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. + /// - returns: AnyPublisher + open func policiesReputationScoresDestroy(reputationUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/scores/{reputation_uuid}/" + path = path.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationScoresDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationScoresDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationScoresListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationScoresListError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationScoresListError: : \(object)" + } + } + } + + /// - GET /policies/reputation/scores/ + /// - Reputation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identifier: (query) (optional) + /// - parameter ip: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter score: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func policiesReputationScoresList(identifier: String? = nil, ip: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, score: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/policies/reputation/scores/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let identifier = identifier { queryItems.append(URLQueryItem(name: "identifier", value: identifier)) } + if let ip = ip { queryItems.append(URLQueryItem(name: "ip", value: ip)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let score = score { queryItems.append(URLQueryItem(name: "score", value: "\(score)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationScoresListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationScoresListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedReputationList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationScoresRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationScoresRetrieveError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationScoresRetrieveError: : \(object)" + } + } + } + + /// - GET /policies/reputation/scores/{reputation_uuid}/ + /// - Reputation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. + /// - returns: AnyPublisher + open func policiesReputationScoresRetrieve(reputationUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/scores/{reputation_uuid}/" + path = path.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationScoresRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationScoresRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Reputation.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationScoresUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationScoresUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationScoresUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/reputation/scores/{reputation_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter reputationUuid: (path) A UUID string identifying this Reputation Score. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesReputationScoresUsedByList(reputationUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/scores/{reputation_uuid}/used_by/" + path = path.replacingOccurrences(of: "{reputation_uuid}", with: reputationUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationScoresUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationScoresUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationUpdateError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationUpdateError: : \(object)" + } + } + } + + /// - PUT /policies/reputation/{policy_uuid}/ + /// - Reputation Policy Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. + /// - parameter reputationPolicyRequest: (body) + /// - returns: AnyPublisher + open func policiesReputationUpdate(policyUuid: UUID, reputationPolicyRequest: ReputationPolicyRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/{policy_uuid}/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(reputationPolicyRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ReputationPolicy.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PoliciesReputationUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PoliciesReputationUsedByListError: : \(object)" + case .code403Error(let object): + return "PoliciesReputationUsedByListError: : \(object)" + } + } + } + + /// - GET /policies/reputation/{policy_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter policyUuid: (path) A UUID string identifying this Reputation Policy. + /// - returns: AnyPublisher<[UsedBy], Error> + open func policiesReputationUsedByList(policyUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/policies/reputation/{policy_uuid}/used_by/" + path = path.replacingOccurrences(of: "{policy_uuid}", with: policyUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PoliciesReputationUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PoliciesReputationUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/PropertymappingsAPI.swift b/authentikClient/Sources/APIs/PropertymappingsAPI.swift new file mode 100644 index 0000000..4ed594c --- /dev/null +++ b/authentikClient/Sources/APIs/PropertymappingsAPI.swift @@ -0,0 +1,2940 @@ +// +// PropertymappingsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class PropertymappingsAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum PropertymappingsAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsAllDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/all/{pm_uuid}/ + /// - PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsAllDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/all/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsAllListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsAllListError: : \(object)" + } + } + } + + /// - GET /propertymappings/all/ + /// - PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter managedIsnull: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsAllList(managedIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let managedIsnull = managedIsnull { queryItems.append(URLQueryItem(name: "managed__isnull", value: managedIsnull ? "true" : "false")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPropertyMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsAllRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsAllRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/all/{pm_uuid}/ + /// - PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsAllRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/all/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsAllTestCreateError: Error, CustomStringConvertible { + // Invalid parameters + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "PropertymappingsAllTestCreateError: Invalid parameters" + case .code403Error(let object): + return "PropertymappingsAllTestCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/all/{pm_uuid}/test/ + /// - Test Property Mapping + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Property Mapping. + /// - parameter policyTestRequest: (body) + /// - parameter formatResult: (query) (optional) + /// - returns: AnyPublisher + open func propertymappingsAllTestCreate(pmUuid: UUID, policyTestRequest: PolicyTestRequest, formatResult: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/all/{pm_uuid}/test/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let formatResult = formatResult { queryItems.append(URLQueryItem(name: "format_result", value: formatResult ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(policyTestRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return PropertymappingsAllTestCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllTestCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PropertyMappingTestResult.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsAllTypesListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsAllTypesListError: : \(object)" + } + } + } + + /// - GET /propertymappings/all/types/ + /// - Get all creatable property-mapping types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func propertymappingsAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsAllUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsAllUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/all/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Property Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsAllUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/all/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapCreateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/ldap/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter lDAPPropertyMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsLdapCreate(lDAPPropertyMappingRequest: LDAPPropertyMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/ldap/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(lDAPPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/ldap/{pm_uuid}/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsLdapDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/ldap/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapListError: : \(object)" + } + } + } + + /// - GET /propertymappings/ldap/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter expression: (query) (optional) + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter objectField: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter pmUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsLdapList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, objectField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/ldap/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let expression = expression { queryItems.append(URLQueryItem(name: "expression", value: expression)) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let objectField = objectField { queryItems.append(URLQueryItem(name: "object_field", value: objectField)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let pmUuid = pmUuid { queryItems.append(URLQueryItem(name: "pm_uuid", value: pmUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedLDAPPropertyMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /propertymappings/ldap/{pm_uuid}/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. + /// - parameter patchedLDAPPropertyMappingRequest: (body) (optional) + /// - returns: AnyPublisher + open func propertymappingsLdapPartialUpdate(pmUuid: UUID, patchedLDAPPropertyMappingRequest: PatchedLDAPPropertyMappingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/ldap/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedLDAPPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/ldap/{pm_uuid}/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsLdapRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/ldap/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapUpdateError: : \(object)" + } + } + } + + /// - PUT /propertymappings/ldap/{pm_uuid}/ + /// - LDAP PropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. + /// - parameter lDAPPropertyMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsLdapUpdate(pmUuid: UUID, lDAPPropertyMappingRequest: LDAPPropertyMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/ldap/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(lDAPPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsLdapUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsLdapUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsLdapUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/ldap/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this LDAP Property Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsLdapUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/ldap/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsLdapUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsLdapUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationCreateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/notification/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter notificationWebhookMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsNotificationCreate(notificationWebhookMappingRequest: NotificationWebhookMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/notification/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(notificationWebhookMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationWebhookMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/notification/{pm_uuid}/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. + /// - returns: AnyPublisher + open func propertymappingsNotificationDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/notification/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationListError: : \(object)" + } + } + } + + /// - GET /propertymappings/notification/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsNotificationList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/notification/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedNotificationWebhookMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /propertymappings/notification/{pm_uuid}/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. + /// - parameter patchedNotificationWebhookMappingRequest: (body) (optional) + /// - returns: AnyPublisher + open func propertymappingsNotificationPartialUpdate(pmUuid: UUID, patchedNotificationWebhookMappingRequest: PatchedNotificationWebhookMappingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/notification/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedNotificationWebhookMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationWebhookMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/notification/{pm_uuid}/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. + /// - returns: AnyPublisher + open func propertymappingsNotificationRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/notification/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationWebhookMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationUpdateError: : \(object)" + } + } + } + + /// - PUT /propertymappings/notification/{pm_uuid}/ + /// - NotificationWebhookMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. + /// - parameter notificationWebhookMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsNotificationUpdate(pmUuid: UUID, notificationWebhookMappingRequest: NotificationWebhookMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/notification/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(notificationWebhookMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(NotificationWebhookMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsNotificationUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsNotificationUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsNotificationUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/notification/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Webhook Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsNotificationUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/notification/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsNotificationUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsNotificationUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlCreateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/saml/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sAMLPropertyMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsSamlCreate(sAMLPropertyMappingRequest: SAMLPropertyMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/saml/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sAMLPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/saml/{pm_uuid}/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsSamlDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/saml/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlListError: : \(object)" + } + } + } + + /// - GET /propertymappings/saml/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter expression: (query) (optional) + /// - parameter friendlyName: (query) (optional) + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter pmUuid: (query) (optional) + /// - parameter samlName: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsSamlList(expression: String? = nil, friendlyName: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, samlName: String? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/saml/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let expression = expression { queryItems.append(URLQueryItem(name: "expression", value: expression)) } + if let friendlyName = friendlyName { queryItems.append(URLQueryItem(name: "friendly_name", value: friendlyName)) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let pmUuid = pmUuid { queryItems.append(URLQueryItem(name: "pm_uuid", value: pmUuid.uuidString)) } + if let samlName = samlName { queryItems.append(URLQueryItem(name: "saml_name", value: samlName)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSAMLPropertyMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /propertymappings/saml/{pm_uuid}/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. + /// - parameter patchedSAMLPropertyMappingRequest: (body) (optional) + /// - returns: AnyPublisher + open func propertymappingsSamlPartialUpdate(pmUuid: UUID, patchedSAMLPropertyMappingRequest: PatchedSAMLPropertyMappingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/saml/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSAMLPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/saml/{pm_uuid}/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. + /// - returns: AnyPublisher + open func propertymappingsSamlRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/saml/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlUpdateError: : \(object)" + } + } + } + + /// - PUT /propertymappings/saml/{pm_uuid}/ + /// - SAMLPropertyMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. + /// - parameter sAMLPropertyMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsSamlUpdate(pmUuid: UUID, sAMLPropertyMappingRequest: SAMLPropertyMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/saml/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sAMLPropertyMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLPropertyMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsSamlUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsSamlUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsSamlUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/saml/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SAML Property Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsSamlUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/saml/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsSamlUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsSamlUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimCreateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/scim/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sCIMMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsScimCreate(sCIMMappingRequest: SCIMMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/scim/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sCIMMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/scim/{pm_uuid}/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. + /// - returns: AnyPublisher + open func propertymappingsScimDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scim/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimListError: : \(object)" + } + } + } + + /// - GET /propertymappings/scim/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter expression: (query) (optional) + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter pmUuid: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsScimList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/scim/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let expression = expression { queryItems.append(URLQueryItem(name: "expression", value: expression)) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let pmUuid = pmUuid { queryItems.append(URLQueryItem(name: "pm_uuid", value: pmUuid.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSCIMMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimPartialUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /propertymappings/scim/{pm_uuid}/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. + /// - parameter patchedSCIMMappingRequest: (body) (optional) + /// - returns: AnyPublisher + open func propertymappingsScimPartialUpdate(pmUuid: UUID, patchedSCIMMappingRequest: PatchedSCIMMappingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scim/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSCIMMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/scim/{pm_uuid}/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. + /// - returns: AnyPublisher + open func propertymappingsScimRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scim/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimUpdateError: : \(object)" + } + } + } + + /// - PUT /propertymappings/scim/{pm_uuid}/ + /// - SCIMMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. + /// - parameter sCIMMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsScimUpdate(pmUuid: UUID, sCIMMappingRequest: SCIMMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scim/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sCIMMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScimUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScimUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScimUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/scim/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this SCIM Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsScimUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scim/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScimUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScimUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeCreateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeCreateError: : \(object)" + } + } + } + + /// - POST /propertymappings/scope/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter scopeMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsScopeCreate(scopeMappingRequest: ScopeMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/scope/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(scopeMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ScopeMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeDestroyError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeDestroyError: : \(object)" + } + } + } + + /// - DELETE /propertymappings/scope/{pm_uuid}/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. + /// - returns: AnyPublisher + open func propertymappingsScopeDestroy(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scope/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeListError: : \(object)" + } + } + } + + /// - GET /propertymappings/scope/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter scopeName: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func propertymappingsScopeList(managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, scopeName: String? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/propertymappings/scope/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let scopeName = scopeName { queryItems.append(URLQueryItem(name: "scope_name", value: scopeName)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedScopeMappingList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopePartialUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /propertymappings/scope/{pm_uuid}/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. + /// - parameter patchedScopeMappingRequest: (body) (optional) + /// - returns: AnyPublisher + open func propertymappingsScopePartialUpdate(pmUuid: UUID, patchedScopeMappingRequest: PatchedScopeMappingRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scope/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedScopeMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ScopeMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeRetrieveError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeRetrieveError: : \(object)" + } + } + } + + /// - GET /propertymappings/scope/{pm_uuid}/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. + /// - returns: AnyPublisher + open func propertymappingsScopeRetrieve(pmUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scope/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ScopeMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeUpdateError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeUpdateError: : \(object)" + } + } + } + + /// - PUT /propertymappings/scope/{pm_uuid}/ + /// - ScopeMapping Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. + /// - parameter scopeMappingRequest: (body) + /// - returns: AnyPublisher + open func propertymappingsScopeUpdate(pmUuid: UUID, scopeMappingRequest: ScopeMappingRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scope/{pm_uuid}/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(scopeMappingRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ScopeMapping.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum PropertymappingsScopeUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "PropertymappingsScopeUsedByListError: : \(object)" + case .code403Error(let object): + return "PropertymappingsScopeUsedByListError: : \(object)" + } + } + } + + /// - GET /propertymappings/scope/{pm_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter pmUuid: (path) A UUID string identifying this Scope Mapping. + /// - returns: AnyPublisher<[UsedBy], Error> + open func propertymappingsScopeUsedByList(pmUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/propertymappings/scope/{pm_uuid}/used_by/" + path = path.replacingOccurrences(of: "{pm_uuid}", with: pmUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return PropertymappingsScopeUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return PropertymappingsScopeUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/ProvidersAPI.swift b/authentikClient/Sources/APIs/ProvidersAPI.swift new file mode 100644 index 0000000..4ec2d40 --- /dev/null +++ b/authentikClient/Sources/APIs/ProvidersAPI.swift @@ -0,0 +1,3973 @@ +// +// ProvidersAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class ProvidersAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum ProvidersAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersAllDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/all/{id}/ + /// - Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this provider. + /// - returns: AnyPublisher + open func providersAllDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersAllListError: : \(object)" + case .code403Error(let object): + return "ProvidersAllListError: : \(object)" + } + } + } + + /// - GET /providers/all/ + /// - Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter applicationIsnull: (query) (optional) + /// - parameter backchannelOnly: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func providersAllList(applicationIsnull: Bool? = nil, backchannelOnly: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let applicationIsnull = applicationIsnull { queryItems.append(URLQueryItem(name: "application__isnull", value: applicationIsnull ? "true" : "false")) } + if let backchannelOnly = backchannelOnly { queryItems.append(URLQueryItem(name: "backchannel_only", value: backchannelOnly ? "true" : "false")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersAllRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersAllRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/all/{id}/ + /// - Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this provider. + /// - returns: AnyPublisher + open func providersAllRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Provider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersAllTypesListError: : \(object)" + case .code403Error(let object): + return "ProvidersAllTypesListError: : \(object)" + } + } + } + + /// - GET /providers/all/types/ + /// - Get all creatable provider types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func providersAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersAllUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersAllUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/all/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersAllUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/all/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapCreateError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapCreateError: : \(object)" + } + } + } + + /// - POST /providers/ldap/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter lDAPProviderRequest: (body) + /// - returns: AnyPublisher + open func providersLdapCreate(lDAPProviderRequest: LDAPProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/ldap/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(lDAPProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/ldap/{id}/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - returns: AnyPublisher + open func providersLdapDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/ldap/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapListError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapListError: : \(object)" + } + } + } + + /// - GET /providers/ldap/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter applicationIsnull: (query) (optional) + /// - parameter authorizationFlowSlugIexact: (query) (optional) + /// - parameter baseDnIexact: (query) (optional) + /// - parameter certificateKpUuidIexact: (query) (optional) + /// - parameter certificateNameIexact: (query) (optional) + /// - parameter gidStartNumberIexact: (query) (optional) + /// - parameter nameIexact: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter searchGroupGroupUuidIexact: (query) (optional) + /// - parameter searchGroupNameIexact: (query) (optional) + /// - parameter tlsServerNameIexact: (query) (optional) + /// - parameter uidStartNumberIexact: (query) (optional) + /// - returns: AnyPublisher + open func providersLdapList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, baseDnIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, gidStartNumberIexact: Int? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, searchGroupGroupUuidIexact: UUID? = nil, searchGroupNameIexact: String? = nil, tlsServerNameIexact: String? = nil, uidStartNumberIexact: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/ldap/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let applicationIsnull = applicationIsnull { queryItems.append(URLQueryItem(name: "application__isnull", value: applicationIsnull ? "true" : "false")) } + if let authorizationFlowSlugIexact = authorizationFlowSlugIexact { queryItems.append(URLQueryItem(name: "authorization_flow__slug__iexact", value: authorizationFlowSlugIexact)) } + if let baseDnIexact = baseDnIexact { queryItems.append(URLQueryItem(name: "base_dn__iexact", value: baseDnIexact)) } + if let certificateKpUuidIexact = certificateKpUuidIexact { queryItems.append(URLQueryItem(name: "certificate__kp_uuid__iexact", value: certificateKpUuidIexact.uuidString)) } + if let certificateNameIexact = certificateNameIexact { queryItems.append(URLQueryItem(name: "certificate__name__iexact", value: certificateNameIexact)) } + if let gidStartNumberIexact = gidStartNumberIexact { queryItems.append(URLQueryItem(name: "gid_start_number__iexact", value: "\(gidStartNumberIexact)")) } + if let nameIexact = nameIexact { queryItems.append(URLQueryItem(name: "name__iexact", value: nameIexact)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let searchGroupGroupUuidIexact = searchGroupGroupUuidIexact { queryItems.append(URLQueryItem(name: "search_group__group_uuid__iexact", value: searchGroupGroupUuidIexact.uuidString)) } + if let searchGroupNameIexact = searchGroupNameIexact { queryItems.append(URLQueryItem(name: "search_group__name__iexact", value: searchGroupNameIexact)) } + if let tlsServerNameIexact = tlsServerNameIexact { queryItems.append(URLQueryItem(name: "tls_server_name__iexact", value: tlsServerNameIexact)) } + if let uidStartNumberIexact = uidStartNumberIexact { queryItems.append(URLQueryItem(name: "uid_start_number__iexact", value: "\(uidStartNumberIexact)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedLDAPProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/ldap/{id}/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - parameter patchedLDAPProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersLdapPartialUpdate(id: Int, patchedLDAPProviderRequest: PatchedLDAPProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/ldap/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedLDAPProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/ldap/{id}/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - returns: AnyPublisher + open func providersLdapRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/ldap/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapUpdateError: : \(object)" + } + } + } + + /// - PUT /providers/ldap/{id}/ + /// - LDAPProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - parameter lDAPProviderRequest: (body) + /// - returns: AnyPublisher + open func providersLdapUpdate(id: Int, lDAPProviderRequest: LDAPProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/ldap/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(lDAPProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersLdapUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersLdapUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersLdapUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/ldap/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this LDAP Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersLdapUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/ldap/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersLdapUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersLdapUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2CreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2CreateError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2CreateError: : \(object)" + } + } + } + + /// - POST /providers/oauth2/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter oAuth2ProviderRequest: (body) + /// - returns: AnyPublisher + open func providersOauth2Create(oAuth2ProviderRequest: OAuth2ProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/oauth2/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(oAuth2ProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2CreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2CreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuth2Provider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2DestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2DestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2DestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/oauth2/{id}/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - returns: AnyPublisher + open func providersOauth2Destroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2DestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2DestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter clientType + /// + public enum ProvidersOauth2ListClientType: String, Codable, CaseIterable { + case confidential = "confidential" + case _public = "public" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter issuerMode + /// + public enum ProvidersOauth2ListIssuerMode: String, Codable, CaseIterable { + case global = "global" + case perProvider = "per_provider" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter subMode + /// + public enum ProvidersOauth2ListSubMode: String, Codable, CaseIterable { + case hashedUserId = "hashed_user_id" + case userEmail = "user_email" + case userId = "user_id" + case userUpn = "user_upn" + case userUsername = "user_username" + case userUuid = "user_uuid" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum ProvidersOauth2ListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2ListError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2ListError: : \(object)" + } + } + } + + /// - GET /providers/oauth2/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter accessCodeValidity: (query) (optional) + /// - parameter accessTokenValidity: (query) (optional) + /// - parameter application: (query) (optional) + /// - parameter authorizationFlow: (query) (optional) + /// - parameter clientId: (query) (optional) + /// - parameter clientType: (query) Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public (optional) + /// - parameter includeClaimsInIdToken: (query) (optional) + /// - parameter issuerMode: (query) Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter propertyMappings: (query) (optional) + /// - parameter redirectUris: (query) (optional) + /// - parameter refreshTokenValidity: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter signingKey: (query) (optional) + /// - parameter subMode: (query) Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. (optional) + /// - returns: AnyPublisher + open func providersOauth2List(accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, application: UUID? = nil, authorizationFlow: UUID? = nil, clientId: String? = nil, clientType: ProvidersOauth2ListClientType? = nil, includeClaimsInIdToken: Bool? = nil, issuerMode: ProvidersOauth2ListIssuerMode? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, redirectUris: String? = nil, refreshTokenValidity: String? = nil, search: String? = nil, signingKey: UUID? = nil, subMode: ProvidersOauth2ListSubMode? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/oauth2/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let accessCodeValidity = accessCodeValidity { queryItems.append(URLQueryItem(name: "access_code_validity", value: accessCodeValidity)) } + if let accessTokenValidity = accessTokenValidity { queryItems.append(URLQueryItem(name: "access_token_validity", value: accessTokenValidity)) } + if let application = application { queryItems.append(URLQueryItem(name: "application", value: application.uuidString)) } + if let authorizationFlow = authorizationFlow { queryItems.append(URLQueryItem(name: "authorization_flow", value: authorizationFlow.uuidString)) } + if let clientId = clientId { queryItems.append(URLQueryItem(name: "client_id", value: clientId)) } + if let clientType = clientType { queryItems.append(URLQueryItem(name: "client_type", value: clientType.rawValue)) } + if let includeClaimsInIdToken = includeClaimsInIdToken { queryItems.append(URLQueryItem(name: "include_claims_in_id_token", value: includeClaimsInIdToken ? "true" : "false")) } + if let issuerMode = issuerMode { queryItems.append(URLQueryItem(name: "issuer_mode", value: issuerMode.rawValue)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let propertyMappings = propertyMappings { queryItems.append(URLQueryItem(name: "property_mappings", value: propertyMappings.map { $0.uuidString }.joined(separator: ","))) } + if let redirectUris = redirectUris { queryItems.append(URLQueryItem(name: "redirect_uris", value: redirectUris)) } + if let refreshTokenValidity = refreshTokenValidity { queryItems.append(URLQueryItem(name: "refresh_token_validity", value: refreshTokenValidity)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let signingKey = signingKey { queryItems.append(URLQueryItem(name: "signing_key", value: signingKey.uuidString)) } + if let subMode = subMode { queryItems.append(URLQueryItem(name: "sub_mode", value: subMode.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2ListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2ListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedOAuth2ProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2PartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2PartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2PartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/oauth2/{id}/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - parameter patchedOAuth2ProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersOauth2PartialUpdate(id: Int, patchedOAuth2ProviderRequest: PatchedOAuth2ProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedOAuth2ProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2PartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2PartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuth2Provider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2PreviewUserRetrieveError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "ProvidersOauth2PreviewUserRetrieveError: Bad request" + case .code403Error(let object): + return "ProvidersOauth2PreviewUserRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/oauth2/{id}/preview_user/ + /// - Preview user data for provider + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - returns: AnyPublisher + open func providersOauth2PreviewUserRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/preview_user/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return ProvidersOauth2PreviewUserRetrieveError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2PreviewUserRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PropertyMappingPreview.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2RetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2RetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2RetrieveError: : \(object)" + } + } + } + + /// - GET /providers/oauth2/{id}/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - returns: AnyPublisher + open func providersOauth2Retrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2RetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2RetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuth2Provider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2SetupUrlsRetrieveError: Error, CustomStringConvertible { + // Provider has no application assigned + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "ProvidersOauth2SetupUrlsRetrieveError: Provider has no application assigned" + case .code400Error(let object): + return "ProvidersOauth2SetupUrlsRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2SetupUrlsRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/oauth2/{id}/setup_urls/ + /// - Get Providers setup URLs + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - returns: AnyPublisher + open func providersOauth2SetupUrlsRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/setup_urls/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return ProvidersOauth2SetupUrlsRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2SetupUrlsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2SetupUrlsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuth2ProviderSetupURLs.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2UpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2UpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2UpdateError: : \(object)" + } + } + } + + /// - PUT /providers/oauth2/{id}/ + /// - OAuth2Provider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - parameter oAuth2ProviderRequest: (body) + /// - returns: AnyPublisher + open func providersOauth2Update(id: Int, oAuth2ProviderRequest: OAuth2ProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(oAuth2ProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2UpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2UpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuth2Provider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersOauth2UsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersOauth2UsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersOauth2UsedByListError: : \(object)" + } + } + } + + /// - GET /providers/oauth2/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this OAuth2/OpenID Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersOauth2UsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/oauth2/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersOauth2UsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersOauth2UsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyCreateError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyCreateError: : \(object)" + } + } + } + + /// - POST /providers/proxy/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter proxyProviderRequest: (body) + /// - returns: AnyPublisher + open func providersProxyCreate(proxyProviderRequest: ProxyProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/proxy/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(proxyProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ProxyProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/proxy/{id}/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - returns: AnyPublisher + open func providersProxyDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/proxy/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyListError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyListError: : \(object)" + } + } + } + + /// - GET /providers/proxy/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter applicationIsnull: (query) (optional) + /// - parameter authorizationFlowSlugIexact: (query) (optional) + /// - parameter basicAuthEnabledIexact: (query) (optional) + /// - parameter basicAuthPasswordAttributeIexact: (query) (optional) + /// - parameter basicAuthUserAttributeIexact: (query) (optional) + /// - parameter certificateKpUuidIexact: (query) (optional) + /// - parameter certificateNameIexact: (query) (optional) + /// - parameter cookieDomainIexact: (query) (optional) + /// - parameter externalHostIexact: (query) (optional) + /// - parameter internalHostIexact: (query) (optional) + /// - parameter internalHostSslValidationIexact: (query) (optional) + /// - parameter modeIexact: (query) (optional) + /// - parameter nameIexact: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter propertyMappingsIexact: (query) (optional) + /// - parameter redirectUrisIexact: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter skipPathRegexIexact: (query) (optional) + /// - returns: AnyPublisher + open func providersProxyList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, basicAuthEnabledIexact: Bool? = nil, basicAuthPasswordAttributeIexact: String? = nil, basicAuthUserAttributeIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, cookieDomainIexact: String? = nil, externalHostIexact: String? = nil, internalHostIexact: String? = nil, internalHostSslValidationIexact: Bool? = nil, modeIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappingsIexact: [UUID]? = nil, redirectUrisIexact: String? = nil, search: String? = nil, skipPathRegexIexact: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/proxy/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let applicationIsnull = applicationIsnull { queryItems.append(URLQueryItem(name: "application__isnull", value: applicationIsnull ? "true" : "false")) } + if let authorizationFlowSlugIexact = authorizationFlowSlugIexact { queryItems.append(URLQueryItem(name: "authorization_flow__slug__iexact", value: authorizationFlowSlugIexact)) } + if let basicAuthEnabledIexact = basicAuthEnabledIexact { queryItems.append(URLQueryItem(name: "basic_auth_enabled__iexact", value: basicAuthEnabledIexact ? "true" : "false")) } + if let basicAuthPasswordAttributeIexact = basicAuthPasswordAttributeIexact { queryItems.append(URLQueryItem(name: "basic_auth_password_attribute__iexact", value: basicAuthPasswordAttributeIexact)) } + if let basicAuthUserAttributeIexact = basicAuthUserAttributeIexact { queryItems.append(URLQueryItem(name: "basic_auth_user_attribute__iexact", value: basicAuthUserAttributeIexact)) } + if let certificateKpUuidIexact = certificateKpUuidIexact { queryItems.append(URLQueryItem(name: "certificate__kp_uuid__iexact", value: certificateKpUuidIexact.uuidString)) } + if let certificateNameIexact = certificateNameIexact { queryItems.append(URLQueryItem(name: "certificate__name__iexact", value: certificateNameIexact)) } + if let cookieDomainIexact = cookieDomainIexact { queryItems.append(URLQueryItem(name: "cookie_domain__iexact", value: cookieDomainIexact)) } + if let externalHostIexact = externalHostIexact { queryItems.append(URLQueryItem(name: "external_host__iexact", value: externalHostIexact)) } + if let internalHostIexact = internalHostIexact { queryItems.append(URLQueryItem(name: "internal_host__iexact", value: internalHostIexact)) } + if let internalHostSslValidationIexact = internalHostSslValidationIexact { queryItems.append(URLQueryItem(name: "internal_host_ssl_validation__iexact", value: internalHostSslValidationIexact ? "true" : "false")) } + if let modeIexact = modeIexact { queryItems.append(URLQueryItem(name: "mode__iexact", value: modeIexact)) } + if let nameIexact = nameIexact { queryItems.append(URLQueryItem(name: "name__iexact", value: nameIexact)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let propertyMappingsIexact = propertyMappingsIexact { queryItems.append(URLQueryItem(name: "property_mappings__iexact", value: propertyMappingsIexact.map { $0.uuidString }.joined(separator: ","))) } + if let redirectUrisIexact = redirectUrisIexact { queryItems.append(URLQueryItem(name: "redirect_uris__iexact", value: redirectUrisIexact)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let skipPathRegexIexact = skipPathRegexIexact { queryItems.append(URLQueryItem(name: "skip_path_regex__iexact", value: skipPathRegexIexact)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedProxyProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/proxy/{id}/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - parameter patchedProxyProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersProxyPartialUpdate(id: Int, patchedProxyProviderRequest: PatchedProxyProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/proxy/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedProxyProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ProxyProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/proxy/{id}/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - returns: AnyPublisher + open func providersProxyRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/proxy/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ProxyProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyUpdateError: : \(object)" + } + } + } + + /// - PUT /providers/proxy/{id}/ + /// - ProxyProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - parameter proxyProviderRequest: (body) + /// - returns: AnyPublisher + open func providersProxyUpdate(id: Int, proxyProviderRequest: ProxyProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/proxy/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(proxyProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ProxyProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersProxyUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersProxyUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersProxyUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/proxy/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Proxy Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersProxyUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/proxy/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersProxyUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersProxyUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusCreateError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusCreateError: : \(object)" + } + } + } + + /// - POST /providers/radius/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter radiusProviderRequest: (body) + /// - returns: AnyPublisher + open func providersRadiusCreate(radiusProviderRequest: RadiusProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/radius/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(radiusProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RadiusProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/radius/{id}/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - returns: AnyPublisher + open func providersRadiusDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/radius/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusListError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusListError: : \(object)" + } + } + } + + /// - GET /providers/radius/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter applicationIsnull: (query) (optional) + /// - parameter authorizationFlowSlugIexact: (query) (optional) + /// - parameter clientNetworksIexact: (query) (optional) + /// - parameter nameIexact: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func providersRadiusList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, clientNetworksIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/radius/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let applicationIsnull = applicationIsnull { queryItems.append(URLQueryItem(name: "application__isnull", value: applicationIsnull ? "true" : "false")) } + if let authorizationFlowSlugIexact = authorizationFlowSlugIexact { queryItems.append(URLQueryItem(name: "authorization_flow__slug__iexact", value: authorizationFlowSlugIexact)) } + if let clientNetworksIexact = clientNetworksIexact { queryItems.append(URLQueryItem(name: "client_networks__iexact", value: clientNetworksIexact)) } + if let nameIexact = nameIexact { queryItems.append(URLQueryItem(name: "name__iexact", value: nameIexact)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedRadiusProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/radius/{id}/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - parameter patchedRadiusProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersRadiusPartialUpdate(id: Int, patchedRadiusProviderRequest: PatchedRadiusProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/radius/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedRadiusProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RadiusProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/radius/{id}/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - returns: AnyPublisher + open func providersRadiusRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/radius/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RadiusProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusUpdateError: : \(object)" + } + } + } + + /// - PUT /providers/radius/{id}/ + /// - RadiusProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - parameter radiusProviderRequest: (body) + /// - returns: AnyPublisher + open func providersRadiusUpdate(id: Int, radiusProviderRequest: RadiusProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/radius/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(radiusProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RadiusProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersRadiusUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersRadiusUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersRadiusUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/radius/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this Radius Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersRadiusUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/radius/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersRadiusUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersRadiusUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlCreateError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlCreateError: : \(object)" + } + } + } + + /// - POST /providers/saml/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sAMLProviderRequest: (body) + /// - returns: AnyPublisher + open func providersSamlCreate(sAMLProviderRequest: SAMLProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/saml/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sAMLProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/saml/{id}/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - returns: AnyPublisher + open func providersSamlDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlImportMetadataCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "ProvidersSamlImportMetadataCreateError: Bad request" + case .code403Error(let object): + return "ProvidersSamlImportMetadataCreateError: : \(object)" + } + } + } + + /// - POST /providers/saml/import_metadata/ + /// - Create provider from SAML Metadata + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (form) + /// - parameter authorizationFlow: (form) + /// - parameter file: (form) + /// - returns: AnyPublisher + open func providersSamlImportMetadataCreate(name: String, authorizationFlow: UUID, file: Data) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/saml/import_metadata/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + let multipartBoundary = String(format: "Boundary+%08X%08X", arc4random(), arc4random()) + var multipartData = Data() + let nameHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"name\"\r\n") + .appending("\r\n") + multipartData.append(nameHeader.data(using: .utf8) ?? Data()) + multipartData.append(name.data(using: .utf8) ?? Data()) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + + let authorizationFlowHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"authorizationFlow\"\r\n") + .appending("\r\n") + multipartData.append(authorizationFlowHeader.data(using: .utf8) ?? Data()) + multipartData.append(authorizationFlow.data(using: .utf8) ?? Data()) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + + let fileHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"file\"; filename=\"file\"\r\n") + .appending("\r\n") + multipartData.append(fileHeader.data(using: .utf8) ?? Data()) + multipartData.append(file) + + multipartData.append("\r\n--\(multipartBoundary)--\r\n".data(using: .utf8) ?? Data()) + request.httpBody = multipartData + request.setValue("\(multipartData.count)", forHTTPHeaderField: "Content-Length") + request.setValue("multipart/form-data; boundary=\(multipartBoundary)", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return ProvidersSamlImportMetadataCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlImportMetadataCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter digestAlgorithm + /// + public enum ProvidersSamlListDigestAlgorithm: String, Codable, CaseIterable { + case _2000_09_xmldsig_sha1 = "http://www.w3.org/2000/09/xmldsig#sha1" + case _2001_04_xmldsig_more_sha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" + case _2001_04_xmlenc_sha256 = "http://www.w3.org/2001/04/xmlenc#sha256" + case _2001_04_xmlenc_sha512 = "http://www.w3.org/2001/04/xmlenc#sha512" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter signatureAlgorithm + /// + public enum ProvidersSamlListSignatureAlgorithm: String, Codable, CaseIterable { + case _2000_09_xmldsig_dsa_sha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" + case _2000_09_xmldsig_rsa_sha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" + case _2001_04_xmldsig_more_rsa_sha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" + case _2001_04_xmldsig_more_rsa_sha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" + case _2001_04_xmldsig_more_rsa_sha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter spBinding + /// + public enum ProvidersSamlListSpBinding: String, Codable, CaseIterable { + case post = "post" + case redirect = "redirect" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum ProvidersSamlListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlListError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlListError: : \(object)" + } + } + } + + /// - GET /providers/saml/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter acsUrl: (query) (optional) + /// - parameter assertionValidNotBefore: (query) (optional) + /// - parameter assertionValidNotOnOrAfter: (query) (optional) + /// - parameter audience: (query) (optional) + /// - parameter authenticationFlow: (query) (optional) + /// - parameter authorizationFlow: (query) (optional) + /// - parameter backchannelApplication: (query) (optional) + /// - parameter defaultRelayState: (query) (optional) + /// - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) + /// - parameter isBackchannel: (query) (optional) + /// - parameter issuer: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter nameIdMapping: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter propertyMappings: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sessionValidNotOnOrAfter: (query) (optional) + /// - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) + /// - parameter signingKp: (query) (optional) + /// - parameter spBinding: (query) This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post (optional) + /// - parameter verificationKp: (query) (optional) + /// - returns: AnyPublisher + open func providersSamlList(acsUrl: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, audience: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, backchannelApplication: UUID? = nil, defaultRelayState: String? = nil, digestAlgorithm: ProvidersSamlListDigestAlgorithm? = nil, isBackchannel: Bool? = nil, issuer: String? = nil, name: String? = nil, nameIdMapping: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, search: String? = nil, sessionValidNotOnOrAfter: String? = nil, signatureAlgorithm: ProvidersSamlListSignatureAlgorithm? = nil, signingKp: UUID? = nil, spBinding: ProvidersSamlListSpBinding? = nil, verificationKp: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/saml/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let acsUrl = acsUrl { queryItems.append(URLQueryItem(name: "acs_url", value: acsUrl)) } + if let assertionValidNotBefore = assertionValidNotBefore { queryItems.append(URLQueryItem(name: "assertion_valid_not_before", value: assertionValidNotBefore)) } + if let assertionValidNotOnOrAfter = assertionValidNotOnOrAfter { queryItems.append(URLQueryItem(name: "assertion_valid_not_on_or_after", value: assertionValidNotOnOrAfter)) } + if let audience = audience { queryItems.append(URLQueryItem(name: "audience", value: audience)) } + if let authenticationFlow = authenticationFlow { queryItems.append(URLQueryItem(name: "authentication_flow", value: authenticationFlow.uuidString)) } + if let authorizationFlow = authorizationFlow { queryItems.append(URLQueryItem(name: "authorization_flow", value: authorizationFlow.uuidString)) } + if let backchannelApplication = backchannelApplication { queryItems.append(URLQueryItem(name: "backchannel_application", value: backchannelApplication.uuidString)) } + if let defaultRelayState = defaultRelayState { queryItems.append(URLQueryItem(name: "default_relay_state", value: defaultRelayState)) } + if let digestAlgorithm = digestAlgorithm { queryItems.append(URLQueryItem(name: "digest_algorithm", value: digestAlgorithm.rawValue)) } + if let isBackchannel = isBackchannel { queryItems.append(URLQueryItem(name: "is_backchannel", value: isBackchannel ? "true" : "false")) } + if let issuer = issuer { queryItems.append(URLQueryItem(name: "issuer", value: issuer)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let nameIdMapping = nameIdMapping { queryItems.append(URLQueryItem(name: "name_id_mapping", value: nameIdMapping.uuidString)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let propertyMappings = propertyMappings { queryItems.append(URLQueryItem(name: "property_mappings", value: propertyMappings.map { $0.uuidString }.joined(separator: ","))) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sessionValidNotOnOrAfter = sessionValidNotOnOrAfter { queryItems.append(URLQueryItem(name: "session_valid_not_on_or_after", value: sessionValidNotOnOrAfter)) } + if let signatureAlgorithm = signatureAlgorithm { queryItems.append(URLQueryItem(name: "signature_algorithm", value: signatureAlgorithm.rawValue)) } + if let signingKp = signingKp { queryItems.append(URLQueryItem(name: "signing_kp", value: signingKp.uuidString)) } + if let spBinding = spBinding { queryItems.append(URLQueryItem(name: "sp_binding", value: spBinding.rawValue)) } + if let verificationKp = verificationKp { queryItems.append(URLQueryItem(name: "verification_kp", value: verificationKp.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSAMLProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter forceBinding + /// + public enum ProvidersSamlMetadataRetrieveForceBinding: String, Codable, CaseIterable { + case post = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + case redirect = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum ProvidersSamlMetadataRetrieveError: Error, CustomStringConvertible { + // Provider has no application assigned + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "ProvidersSamlMetadataRetrieveError: Provider has no application assigned" + case .code400Error(let object): + return "ProvidersSamlMetadataRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlMetadataRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/saml/{id}/metadata/ + /// - Return metadata as XML string + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - parameter download: (query) (optional) + /// - parameter forceBinding: (query) Optionally force the metadata to only include one binding. (optional) + /// - returns: AnyPublisher + open func providersSamlMetadataRetrieve(id: Int, download: Bool? = nil, forceBinding: ProvidersSamlMetadataRetrieveForceBinding? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/metadata/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let download = download { queryItems.append(URLQueryItem(name: "download", value: download ? "true" : "false")) } + if let forceBinding = forceBinding { queryItems.append(URLQueryItem(name: "force_binding", value: forceBinding.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return ProvidersSamlMetadataRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlMetadataRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlMetadataRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLMetadata.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/saml/{id}/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - parameter patchedSAMLProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersSamlPartialUpdate(id: Int, patchedSAMLProviderRequest: PatchedSAMLProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSAMLProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlPreviewUserRetrieveError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "ProvidersSamlPreviewUserRetrieveError: Bad request" + case .code403Error(let object): + return "ProvidersSamlPreviewUserRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/saml/{id}/preview_user/ + /// - Preview user data for provider + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - returns: AnyPublisher + open func providersSamlPreviewUserRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/preview_user/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return ProvidersSamlPreviewUserRetrieveError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlPreviewUserRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PropertyMappingPreview.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/saml/{id}/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - returns: AnyPublisher + open func providersSamlRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlUpdateError: : \(object)" + } + } + } + + /// - PUT /providers/saml/{id}/ + /// - SAMLProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - parameter sAMLProviderRequest: (body) + /// - returns: AnyPublisher + open func providersSamlUpdate(id: Int, sAMLProviderRequest: SAMLProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sAMLProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersSamlUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersSamlUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersSamlUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/saml/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SAML Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersSamlUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/saml/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersSamlUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersSamlUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimCreateError: : \(object)" + case .code403Error(let object): + return "ProvidersScimCreateError: : \(object)" + } + } + } + + /// - POST /providers/scim/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sCIMProviderRequest: (body) + /// - returns: AnyPublisher + open func providersScimCreate(sCIMProviderRequest: SCIMProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/scim/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sCIMProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimDestroyError: : \(object)" + case .code403Error(let object): + return "ProvidersScimDestroyError: : \(object)" + } + } + } + + /// - DELETE /providers/scim/{id}/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - returns: AnyPublisher + open func providersScimDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimListError: : \(object)" + case .code403Error(let object): + return "ProvidersScimListError: : \(object)" + } + } + } + + /// - GET /providers/scim/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter excludeUsersServiceAccount: (query) (optional) + /// - parameter filterGroup: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter url: (query) (optional) + /// - returns: AnyPublisher + open func providersScimList(excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, url: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/providers/scim/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let excludeUsersServiceAccount = excludeUsersServiceAccount { queryItems.append(URLQueryItem(name: "exclude_users_service_account", value: excludeUsersServiceAccount ? "true" : "false")) } + if let filterGroup = filterGroup { queryItems.append(URLQueryItem(name: "filter_group", value: filterGroup.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let url = url { queryItems.append(URLQueryItem(name: "url", value: url)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSCIMProviderList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimPartialUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersScimPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /providers/scim/{id}/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - parameter patchedSCIMProviderRequest: (body) (optional) + /// - returns: AnyPublisher + open func providersScimPartialUpdate(id: Int, patchedSCIMProviderRequest: PatchedSCIMProviderRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSCIMProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersScimRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/scim/{id}/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - returns: AnyPublisher + open func providersScimRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimSyncStatusRetrieveError: Error, CustomStringConvertible { + // Task not found + case code404Error + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code404Error: + return "ProvidersScimSyncStatusRetrieveError: Task not found" + case .code400Error(let object): + return "ProvidersScimSyncStatusRetrieveError: : \(object)" + case .code403Error(let object): + return "ProvidersScimSyncStatusRetrieveError: : \(object)" + } + } + } + + /// - GET /providers/scim/{id}/sync_status/ + /// - Get provider's sync status + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - returns: AnyPublisher + open func providersScimSyncStatusRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/sync_status/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 404 { + return ProvidersScimSyncStatusRetrieveError.code404Error + } + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimSyncStatusRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimSyncStatusRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Task.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimUpdateError: : \(object)" + case .code403Error(let object): + return "ProvidersScimUpdateError: : \(object)" + } + } + } + + /// - PUT /providers/scim/{id}/ + /// - SCIMProvider Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - parameter sCIMProviderRequest: (body) + /// - returns: AnyPublisher + open func providersScimUpdate(id: Int, sCIMProviderRequest: SCIMProviderRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sCIMProviderRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SCIMProvider.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum ProvidersScimUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "ProvidersScimUsedByListError: : \(object)" + case .code403Error(let object): + return "ProvidersScimUsedByListError: : \(object)" + } + } + } + + /// - GET /providers/scim/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this SCIM Provider. + /// - returns: AnyPublisher<[UsedBy], Error> + open func providersScimUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/providers/scim/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return ProvidersScimUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return ProvidersScimUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/RbacAPI.swift b/authentikClient/Sources/APIs/RbacAPI.swift new file mode 100644 index 0000000..ef5075d --- /dev/null +++ b/authentikClient/Sources/APIs/RbacAPI.swift @@ -0,0 +1,1440 @@ +// +// RbacAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class RbacAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum RbacPermissionsAssignedByRolesAssignCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByRolesAssignCreateError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByRolesAssignCreateError: : \(object)" + } + } + } + + /// - POST /rbac/permissions/assigned_by_roles/{uuid}/assign/ + /// - Assign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - parameter permissionAssignRequest: (body) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByRolesAssignCreate(uuid: UUID, permissionAssignRequest: PermissionAssignRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/permissions/assigned_by_roles/{uuid}/assign/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(permissionAssignRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesAssignCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesAssignCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter model + /// + public enum RbacPermissionsAssignedByRolesListModel: String, Codable, CaseIterable { + case blueprintsBlueprintinstance = "authentik_blueprints.blueprintinstance" + case coreApplication = "authentik_core.application" + case coreGroup = "authentik_core.group" + case coreToken = "authentik_core.token" + case coreUser = "authentik_core.user" + case cryptoCertificatekeypair = "authentik_crypto.certificatekeypair" + case enterpriseLicense = "authentik_enterprise.license" + case eventsEvent = "authentik_events.event" + case eventsNotification = "authentik_events.notification" + case eventsNotificationrule = "authentik_events.notificationrule" + case eventsNotificationtransport = "authentik_events.notificationtransport" + case eventsNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" + case flowsFlow = "authentik_flows.flow" + case flowsFlowstagebinding = "authentik_flows.flowstagebinding" + case outpostsDockerserviceconnection = "authentik_outposts.dockerserviceconnection" + case outpostsKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" + case outpostsOutpost = "authentik_outposts.outpost" + case policiesPolicybinding = "authentik_policies.policybinding" + case policiesDummyDummypolicy = "authentik_policies_dummy.dummypolicy" + case policiesEventMatcherEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" + case policiesExpiryPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" + case policiesExpressionExpressionpolicy = "authentik_policies_expression.expressionpolicy" + case policiesPasswordPasswordpolicy = "authentik_policies_password.passwordpolicy" + case policiesReputationReputation = "authentik_policies_reputation.reputation" + case policiesReputationReputationpolicy = "authentik_policies_reputation.reputationpolicy" + case providersLdapLdapprovider = "authentik_providers_ldap.ldapprovider" + case providersOauth2Accesstoken = "authentik_providers_oauth2.accesstoken" + case providersOauth2Authorizationcode = "authentik_providers_oauth2.authorizationcode" + case providersOauth2Oauth2provider = "authentik_providers_oauth2.oauth2provider" + case providersOauth2Refreshtoken = "authentik_providers_oauth2.refreshtoken" + case providersOauth2Scopemapping = "authentik_providers_oauth2.scopemapping" + case providersProxyProxyprovider = "authentik_providers_proxy.proxyprovider" + case providersRadiusRadiusprovider = "authentik_providers_radius.radiusprovider" + case providersSamlSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" + case providersSamlSamlprovider = "authentik_providers_saml.samlprovider" + case providersScimScimmapping = "authentik_providers_scim.scimmapping" + case providersScimScimprovider = "authentik_providers_scim.scimprovider" + case rbacRole = "authentik_rbac.role" + case sourcesLdapLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" + case sourcesLdapLdapsource = "authentik_sources_ldap.ldapsource" + case sourcesOauthOauthsource = "authentik_sources_oauth.oauthsource" + case sourcesOauthUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" + case sourcesPlexPlexsource = "authentik_sources_plex.plexsource" + case sourcesPlexPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" + case sourcesSamlSamlsource = "authentik_sources_saml.samlsource" + case sourcesSamlUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" + case stagesAuthenticatorDuoAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" + case stagesAuthenticatorDuoDuodevice = "authentik_stages_authenticator_duo.duodevice" + case stagesAuthenticatorMobileAuthenticatormobilestage = "authentik_stages_authenticator_mobile.authenticatormobilestage" + case stagesAuthenticatorMobileMobiledevice = "authentik_stages_authenticator_mobile.mobiledevice" + case stagesAuthenticatorSmsAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" + case stagesAuthenticatorSmsSmsdevice = "authentik_stages_authenticator_sms.smsdevice" + case stagesAuthenticatorStaticAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" + case stagesAuthenticatorStaticStaticdevice = "authentik_stages_authenticator_static.staticdevice" + case stagesAuthenticatorTotpAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" + case stagesAuthenticatorTotpTotpdevice = "authentik_stages_authenticator_totp.totpdevice" + case stagesAuthenticatorValidateAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" + case stagesAuthenticatorWebauthnAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" + case stagesAuthenticatorWebauthnWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" + case stagesCaptchaCaptchastage = "authentik_stages_captcha.captchastage" + case stagesConsentConsentstage = "authentik_stages_consent.consentstage" + case stagesConsentUserconsent = "authentik_stages_consent.userconsent" + case stagesDenyDenystage = "authentik_stages_deny.denystage" + case stagesDummyDummystage = "authentik_stages_dummy.dummystage" + case stagesEmailEmailstage = "authentik_stages_email.emailstage" + case stagesIdentificationIdentificationstage = "authentik_stages_identification.identificationstage" + case stagesInvitationInvitation = "authentik_stages_invitation.invitation" + case stagesInvitationInvitationstage = "authentik_stages_invitation.invitationstage" + case stagesPasswordPasswordstage = "authentik_stages_password.passwordstage" + case stagesPromptPrompt = "authentik_stages_prompt.prompt" + case stagesPromptPromptstage = "authentik_stages_prompt.promptstage" + case stagesUserDeleteUserdeletestage = "authentik_stages_user_delete.userdeletestage" + case stagesUserLoginUserloginstage = "authentik_stages_user_login.userloginstage" + case stagesUserLogoutUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" + case stagesUserWriteUserwritestage = "authentik_stages_user_write.userwritestage" + case tenantsTenant = "authentik_tenants.tenant" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum RbacPermissionsAssignedByRolesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByRolesListError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByRolesListError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/assigned_by_roles/ + /// - Get assigned object permissions for a single object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License + /// - parameter objectPk: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByRolesList(model: RbacPermissionsAssignedByRolesListModel, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/permissions/assigned_by_roles/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "model", value: model.rawValue)) + if let objectPk = objectPk { queryItems.append(URLQueryItem(name: "object_pk", value: objectPk)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedRoleAssignedObjectPermissionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsAssignedByRolesUnassignPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByRolesUnassignPartialUpdateError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByRolesUnassignPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /rbac/permissions/assigned_by_roles/{uuid}/unassign/ + /// - Unassign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - parameter patchedPermissionAssignRequest: (body) (optional) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByRolesUnassignPartialUpdate(uuid: UUID, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/permissions/assigned_by_roles/{uuid}/unassign/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPermissionAssignRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesUnassignPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByRolesUnassignPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsAssignedByUsersAssignCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByUsersAssignCreateError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByUsersAssignCreateError: : \(object)" + } + } + } + + /// - POST /rbac/permissions/assigned_by_users/{id}/assign/ + /// - Assign permission(s) to user + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - parameter permissionAssignRequest: (body) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByUsersAssignCreate(id: Int, permissionAssignRequest: PermissionAssignRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/permissions/assigned_by_users/{id}/assign/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(permissionAssignRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersAssignCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersAssignCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter model + /// + public enum RbacPermissionsAssignedByUsersListModel: String, Codable, CaseIterable { + case blueprintsBlueprintinstance = "authentik_blueprints.blueprintinstance" + case coreApplication = "authentik_core.application" + case coreGroup = "authentik_core.group" + case coreToken = "authentik_core.token" + case coreUser = "authentik_core.user" + case cryptoCertificatekeypair = "authentik_crypto.certificatekeypair" + case enterpriseLicense = "authentik_enterprise.license" + case eventsEvent = "authentik_events.event" + case eventsNotification = "authentik_events.notification" + case eventsNotificationrule = "authentik_events.notificationrule" + case eventsNotificationtransport = "authentik_events.notificationtransport" + case eventsNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" + case flowsFlow = "authentik_flows.flow" + case flowsFlowstagebinding = "authentik_flows.flowstagebinding" + case outpostsDockerserviceconnection = "authentik_outposts.dockerserviceconnection" + case outpostsKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" + case outpostsOutpost = "authentik_outposts.outpost" + case policiesPolicybinding = "authentik_policies.policybinding" + case policiesDummyDummypolicy = "authentik_policies_dummy.dummypolicy" + case policiesEventMatcherEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" + case policiesExpiryPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" + case policiesExpressionExpressionpolicy = "authentik_policies_expression.expressionpolicy" + case policiesPasswordPasswordpolicy = "authentik_policies_password.passwordpolicy" + case policiesReputationReputation = "authentik_policies_reputation.reputation" + case policiesReputationReputationpolicy = "authentik_policies_reputation.reputationpolicy" + case providersLdapLdapprovider = "authentik_providers_ldap.ldapprovider" + case providersOauth2Accesstoken = "authentik_providers_oauth2.accesstoken" + case providersOauth2Authorizationcode = "authentik_providers_oauth2.authorizationcode" + case providersOauth2Oauth2provider = "authentik_providers_oauth2.oauth2provider" + case providersOauth2Refreshtoken = "authentik_providers_oauth2.refreshtoken" + case providersOauth2Scopemapping = "authentik_providers_oauth2.scopemapping" + case providersProxyProxyprovider = "authentik_providers_proxy.proxyprovider" + case providersRadiusRadiusprovider = "authentik_providers_radius.radiusprovider" + case providersSamlSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" + case providersSamlSamlprovider = "authentik_providers_saml.samlprovider" + case providersScimScimmapping = "authentik_providers_scim.scimmapping" + case providersScimScimprovider = "authentik_providers_scim.scimprovider" + case rbacRole = "authentik_rbac.role" + case sourcesLdapLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" + case sourcesLdapLdapsource = "authentik_sources_ldap.ldapsource" + case sourcesOauthOauthsource = "authentik_sources_oauth.oauthsource" + case sourcesOauthUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" + case sourcesPlexPlexsource = "authentik_sources_plex.plexsource" + case sourcesPlexPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" + case sourcesSamlSamlsource = "authentik_sources_saml.samlsource" + case sourcesSamlUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" + case stagesAuthenticatorDuoAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" + case stagesAuthenticatorDuoDuodevice = "authentik_stages_authenticator_duo.duodevice" + case stagesAuthenticatorMobileAuthenticatormobilestage = "authentik_stages_authenticator_mobile.authenticatormobilestage" + case stagesAuthenticatorMobileMobiledevice = "authentik_stages_authenticator_mobile.mobiledevice" + case stagesAuthenticatorSmsAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" + case stagesAuthenticatorSmsSmsdevice = "authentik_stages_authenticator_sms.smsdevice" + case stagesAuthenticatorStaticAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" + case stagesAuthenticatorStaticStaticdevice = "authentik_stages_authenticator_static.staticdevice" + case stagesAuthenticatorTotpAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" + case stagesAuthenticatorTotpTotpdevice = "authentik_stages_authenticator_totp.totpdevice" + case stagesAuthenticatorValidateAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" + case stagesAuthenticatorWebauthnAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" + case stagesAuthenticatorWebauthnWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" + case stagesCaptchaCaptchastage = "authentik_stages_captcha.captchastage" + case stagesConsentConsentstage = "authentik_stages_consent.consentstage" + case stagesConsentUserconsent = "authentik_stages_consent.userconsent" + case stagesDenyDenystage = "authentik_stages_deny.denystage" + case stagesDummyDummystage = "authentik_stages_dummy.dummystage" + case stagesEmailEmailstage = "authentik_stages_email.emailstage" + case stagesIdentificationIdentificationstage = "authentik_stages_identification.identificationstage" + case stagesInvitationInvitation = "authentik_stages_invitation.invitation" + case stagesInvitationInvitationstage = "authentik_stages_invitation.invitationstage" + case stagesPasswordPasswordstage = "authentik_stages_password.passwordstage" + case stagesPromptPrompt = "authentik_stages_prompt.prompt" + case stagesPromptPromptstage = "authentik_stages_prompt.promptstage" + case stagesUserDeleteUserdeletestage = "authentik_stages_user_delete.userdeletestage" + case stagesUserLoginUserloginstage = "authentik_stages_user_login.userloginstage" + case stagesUserLogoutUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" + case stagesUserWriteUserwritestage = "authentik_stages_user_write.userwritestage" + case tenantsTenant = "authentik_tenants.tenant" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum RbacPermissionsAssignedByUsersListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByUsersListError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByUsersListError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/assigned_by_users/ + /// - Get assigned object permissions for a single object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter model: (query) * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License + /// - parameter objectPk: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByUsersList(model: RbacPermissionsAssignedByUsersListModel, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/permissions/assigned_by_users/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "model", value: model.rawValue)) + if let objectPk = objectPk { queryItems.append(URLQueryItem(name: "object_pk", value: objectPk)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserAssignedObjectPermissionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsAssignedByUsersUnassignPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsAssignedByUsersUnassignPartialUpdateError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsAssignedByUsersUnassignPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /rbac/permissions/assigned_by_users/{id}/unassign/ + /// - Unassign permission(s) to user. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User. + /// - parameter patchedPermissionAssignRequest: (body) (optional) + /// - returns: AnyPublisher + open func rbacPermissionsAssignedByUsersUnassignPartialUpdate(id: Int, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/permissions/assigned_by_users/{id}/unassign/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPermissionAssignRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersUnassignPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsAssignedByUsersUnassignPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsListError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsListError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/ + /// - Read-only list of all permissions, filterable by model and app + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter codename: (query) (optional) + /// - parameter contentTypeAppLabel: (query) (optional) + /// - parameter contentTypeModel: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter role: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func rbacPermissionsList(codename: String? = nil, contentTypeAppLabel: String? = nil, contentTypeModel: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, role: String? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/permissions/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let codename = codename { queryItems.append(URLQueryItem(name: "codename", value: codename)) } + if let contentTypeAppLabel = contentTypeAppLabel { queryItems.append(URLQueryItem(name: "content_type__app_label", value: contentTypeAppLabel)) } + if let contentTypeModel = contentTypeModel { queryItems.append(URLQueryItem(name: "content_type__model", value: contentTypeModel)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let role = role { queryItems.append(URLQueryItem(name: "role", value: role)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPermissionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsRetrieveError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsRetrieveError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/{id}/ + /// - Read-only list of all permissions, filterable by model and app + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this permission. + /// - returns: AnyPublisher + open func rbacPermissionsRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/permissions/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Permission.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsRolesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsRolesListError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsRolesListError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/roles/ + /// - Get a role's assigned object permissions + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (query) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func rbacPermissionsRolesList(uuid: UUID, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/permissions/roles/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + queryItems.append(URLQueryItem(name: "uuid", value: uuid.uuidString)) + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsRolesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsRolesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedExtraRoleObjectPermissionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacPermissionsUsersListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacPermissionsUsersListError: : \(object)" + case .code403Error(let object): + return "RbacPermissionsUsersListError: : \(object)" + } + } + } + + /// - GET /rbac/permissions/users/ + /// - Get a users's assigned object permissions + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userId: (query) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func rbacPermissionsUsersList(userId: Int, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/permissions/users/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + queryItems.append(URLQueryItem(name: "user_id", value: "\(userId)")) + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacPermissionsUsersListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacPermissionsUsersListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedExtraUserObjectPermissionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesCreateError: : \(object)" + case .code403Error(let object): + return "RbacRolesCreateError: : \(object)" + } + } + } + + /// - POST /rbac/roles/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter roleRequest: (body) + /// - returns: AnyPublisher + open func rbacRolesCreate(roleRequest: RoleRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/roles/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(roleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Role.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesDestroyError: : \(object)" + case .code403Error(let object): + return "RbacRolesDestroyError: : \(object)" + } + } + } + + /// - DELETE /rbac/roles/{uuid}/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - returns: AnyPublisher + open func rbacRolesDestroy(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/roles/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesListError: : \(object)" + case .code403Error(let object): + return "RbacRolesListError: : \(object)" + } + } + } + + /// - GET /rbac/roles/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter groupName: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func rbacRolesList(groupName: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/rbac/roles/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let groupName = groupName { queryItems.append(URLQueryItem(name: "group__name", value: groupName)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedRoleList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "RbacRolesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /rbac/roles/{uuid}/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - parameter patchedRoleRequest: (body) (optional) + /// - returns: AnyPublisher + open func rbacRolesPartialUpdate(uuid: UUID, patchedRoleRequest: PatchedRoleRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/roles/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedRoleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Role.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesRetrieveError: : \(object)" + case .code403Error(let object): + return "RbacRolesRetrieveError: : \(object)" + } + } + } + + /// - GET /rbac/roles/{uuid}/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - returns: AnyPublisher + open func rbacRolesRetrieve(uuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/roles/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Role.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesUpdateError: : \(object)" + case .code403Error(let object): + return "RbacRolesUpdateError: : \(object)" + } + } + } + + /// - PUT /rbac/roles/{uuid}/ + /// - Role viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - parameter roleRequest: (body) + /// - returns: AnyPublisher + open func rbacRolesUpdate(uuid: UUID, roleRequest: RoleRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/roles/{uuid}/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(roleRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Role.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum RbacRolesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RbacRolesUsedByListError: : \(object)" + case .code403Error(let object): + return "RbacRolesUsedByListError: : \(object)" + } + } + } + + /// - GET /rbac/roles/{uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter uuid: (path) A UUID string identifying this Role. + /// - returns: AnyPublisher<[UsedBy], Error> + open func rbacRolesUsedByList(uuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/rbac/roles/{uuid}/used_by/" + path = path.replacingOccurrences(of: "{uuid}", with: uuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RbacRolesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RbacRolesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/RootAPI.swift b/authentikClient/Sources/APIs/RootAPI.swift new file mode 100644 index 0000000..f51c279 --- /dev/null +++ b/authentikClient/Sources/APIs/RootAPI.swift @@ -0,0 +1,95 @@ +// +// RootAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class RootAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum RootConfigRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "RootConfigRetrieveError: : \(object)" + case .code403Error(let object): + return "RootConfigRetrieveError: : \(object)" + } + } + } + + /// - GET /root/config/ + /// - Retrieve public configuration options + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher + open func rootConfigRetrieve() -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/root/config/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return RootConfigRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return RootConfigRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Config.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/SchemaAPI.swift b/authentikClient/Sources/APIs/SchemaAPI.swift new file mode 100644 index 0000000..31f4ba6 --- /dev/null +++ b/authentikClient/Sources/APIs/SchemaAPI.swift @@ -0,0 +1,213 @@ +// +// SchemaAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class SchemaAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + /// + /// Enum for parameter format + /// + public enum SchemaRetrieveFormat: String, Codable, CaseIterable { + case json = "json" + case yaml = "yaml" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter lang + /// + public enum SchemaRetrieveLang: String, Codable, CaseIterable { + case af = "af" + case ar = "ar" + case arDz = "ar-dz" + case ast = "ast" + case az = "az" + case be = "be" + case bg = "bg" + case bn = "bn" + case br = "br" + case bs = "bs" + case ca = "ca" + case ckb = "ckb" + case cs = "cs" + case cy = "cy" + case da = "da" + case de = "de" + case dsb = "dsb" + case el = "el" + case en = "en" + case enAu = "en-au" + case enGb = "en-gb" + case eo = "eo" + case es = "es" + case esAr = "es-ar" + case esCo = "es-co" + case esMx = "es-mx" + case esNi = "es-ni" + case esVe = "es-ve" + case et = "et" + case eu = "eu" + case fa = "fa" + case fi = "fi" + case fr = "fr" + case fy = "fy" + case ga = "ga" + case gd = "gd" + case gl = "gl" + case he = "he" + case hi = "hi" + case hr = "hr" + case hsb = "hsb" + case hu = "hu" + case hy = "hy" + case ia = "ia" + case id = "id" + case ig = "ig" + case io = "io" + case _is = "is" + case it = "it" + case ja = "ja" + case ka = "ka" + case kab = "kab" + case kk = "kk" + case km = "km" + case kn = "kn" + case ko = "ko" + case ky = "ky" + case lb = "lb" + case lt = "lt" + case lv = "lv" + case mk = "mk" + case ml = "ml" + case mn = "mn" + case mr = "mr" + case ms = "ms" + case my = "my" + case nb = "nb" + case ne = "ne" + case nl = "nl" + case nn = "nn" + case os = "os" + case pa = "pa" + case pl = "pl" + case pt = "pt" + case ptBr = "pt-br" + case ro = "ro" + case ru = "ru" + case sk = "sk" + case sl = "sl" + case sq = "sq" + case sr = "sr" + case srLatn = "sr-latn" + case sv = "sv" + case sw = "sw" + case ta = "ta" + case te = "te" + case tg = "tg" + case th = "th" + case tk = "tk" + case tr = "tr" + case tt = "tt" + case udm = "udm" + case uk = "uk" + case ur = "ur" + case uz = "uz" + case vi = "vi" + case zhHans = "zh-hans" + case zhHant = "zh-hant" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum SchemaRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SchemaRetrieveError: : \(object)" + case .code403Error(let object): + return "SchemaRetrieveError: : \(object)" + } + } + } + + /// - GET /schema/ + /// - OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter format: (query) (optional) + /// - parameter lang: (query) (optional) + /// - returns: AnyPublisher<[String: AnyCodable], Error> + open func schemaRetrieve(format: SchemaRetrieveFormat? = nil, lang: SchemaRetrieveLang? = nil) -> AnyPublisher<[String: AnyCodable], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/schema/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let format = format { queryItems.append(URLQueryItem(name: "format", value: format.rawValue)) } + if let lang = lang { queryItems.append(URLQueryItem(name: "lang", value: lang.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[String: AnyCodable], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SchemaRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SchemaRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([String: AnyCodable].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/SourcesAPI.swift b/authentikClient/Sources/APIs/SourcesAPI.swift new file mode 100644 index 0000000..671ea74 --- /dev/null +++ b/authentikClient/Sources/APIs/SourcesAPI.swift @@ -0,0 +1,5092 @@ +// +// SourcesAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class SourcesAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum SourcesAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/all/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesAllDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/all/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllListError: : \(object)" + case .code403Error(let object): + return "SourcesAllListError: : \(object)" + } + } + } + + /// - GET /sources/all/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter slug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesAllList(managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSourceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesAllRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/all/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesAllRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/all/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Source.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllSetIconCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "SourcesAllSetIconCreateError: Bad request" + case .code403Error(let object): + return "SourcesAllSetIconCreateError: : \(object)" + } + } + } + + /// - POST /sources/all/{slug}/set_icon/ + /// - Set source icon + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter file: (form) (optional) + /// - parameter clear: (form) (optional, default to false) + /// - returns: AnyPublisher + open func sourcesAllSetIconCreate(slug: String, file: Data? = nil, clear: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/all/{slug}/set_icon/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + let multipartBoundary = String(format: "Boundary+%08X%08X", arc4random(), arc4random()) + var multipartData = Data() + if let file = file { + let fileHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"file\"; filename=\"file\"\r\n") + .appending("\r\n") + multipartData.append(fileHeader.data(using: .utf8) ?? Data()) + multipartData.append(file) + multipartData.append("\r\n".data(using: .utf8) ?? Data()) + } + + if let clear = clear { + let clearHeader = "--\(multipartBoundary)\r\n" + .appending("Content-Disposition:form-data; name=\"clear\"\r\n") + .appending("\r\n") + multipartData.append(clearHeader.data(using: .utf8) ?? Data()) + multipartData.append() + } + + multipartData.append("\r\n--\(multipartBoundary)--\r\n".data(using: .utf8) ?? Data()) + request.httpBody = multipartData + request.setValue("\(multipartData.count)", forHTTPHeaderField: "Content-Length") + request.setValue("multipart/form-data; boundary=\(multipartBoundary)", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return SourcesAllSetIconCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllSetIconCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllSetIconUrlCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "SourcesAllSetIconUrlCreateError: Bad request" + case .code403Error(let object): + return "SourcesAllSetIconUrlCreateError: : \(object)" + } + } + } + + /// - POST /sources/all/{slug}/set_icon_url/ + /// - Set source icon (as URL) + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter filePathRequest: (body) + /// - returns: AnyPublisher + open func sourcesAllSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/all/{slug}/set_icon_url/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(filePathRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return SourcesAllSetIconUrlCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllSetIconUrlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllTypesListError: : \(object)" + case .code403Error(let object): + return "SourcesAllTypesListError: : \(object)" + } + } + } + + /// - GET /sources/all/types/ + /// - Get all creatable source types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func sourcesAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesAllUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/all/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesAllUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/all/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesAllUserSettingsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesAllUserSettingsListError: : \(object)" + case .code403Error(let object): + return "SourcesAllUserSettingsListError: : \(object)" + } + } + } + + /// - GET /sources/all/user_settings/ + /// - Get all sources the user can configure + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[UserSetting], Error> + open func sourcesAllUserSettingsList() -> AnyPublisher<[UserSetting], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/all/user_settings/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UserSetting], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesAllUserSettingsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesAllUserSettingsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UserSetting].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapCreateError: : \(object)" + case .code403Error(let object): + return "SourcesLdapCreateError: : \(object)" + } + } + } + + /// - POST /sources/ldap/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter lDAPSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesLdapCreate(lDAPSourceRequest: LDAPSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/ldap/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(lDAPSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapDebugRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapDebugRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesLdapDebugRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/ldap/{slug}/debug/ + /// - Get raw LDAP data to debug + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesLdapDebugRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/debug/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapDebugRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapDebugRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPDebug.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesLdapDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/ldap/{slug}/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesLdapDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapListError: : \(object)" + case .code403Error(let object): + return "SourcesLdapListError: : \(object)" + } + } + } + + /// - GET /sources/ldap/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter additionalGroupDn: (query) (optional) + /// - parameter additionalUserDn: (query) (optional) + /// - parameter baseDn: (query) (optional) + /// - parameter bindCn: (query) (optional) + /// - parameter clientCertificate: (query) (optional) + /// - parameter enabled: (query) (optional) + /// - parameter groupMembershipField: (query) (optional) + /// - parameter groupObjectFilter: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter objectUniquenessField: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter peerCertificate: (query) (optional) + /// - parameter propertyMappings: (query) (optional) + /// - parameter propertyMappingsGroup: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter serverUri: (query) (optional) + /// - parameter slug: (query) (optional) + /// - parameter sni: (query) (optional) + /// - parameter startTls: (query) (optional) + /// - parameter syncGroups: (query) (optional) + /// - parameter syncParentGroup: (query) (optional) + /// - parameter syncUsers: (query) (optional) + /// - parameter syncUsersPassword: (query) (optional) + /// - parameter userObjectFilter: (query) (optional) + /// - returns: AnyPublisher + open func sourcesLdapList(additionalGroupDn: String? = nil, additionalUserDn: String? = nil, baseDn: String? = nil, bindCn: String? = nil, clientCertificate: UUID? = nil, enabled: Bool? = nil, groupMembershipField: String? = nil, groupObjectFilter: String? = nil, name: String? = nil, objectUniquenessField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, peerCertificate: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, search: String? = nil, serverUri: String? = nil, slug: String? = nil, sni: Bool? = nil, startTls: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, userObjectFilter: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/ldap/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let additionalGroupDn = additionalGroupDn { queryItems.append(URLQueryItem(name: "additional_group_dn", value: additionalGroupDn)) } + if let additionalUserDn = additionalUserDn { queryItems.append(URLQueryItem(name: "additional_user_dn", value: additionalUserDn)) } + if let baseDn = baseDn { queryItems.append(URLQueryItem(name: "base_dn", value: baseDn)) } + if let bindCn = bindCn { queryItems.append(URLQueryItem(name: "bind_cn", value: bindCn)) } + if let clientCertificate = clientCertificate { queryItems.append(URLQueryItem(name: "client_certificate", value: clientCertificate.uuidString)) } + if let enabled = enabled { queryItems.append(URLQueryItem(name: "enabled", value: enabled ? "true" : "false")) } + if let groupMembershipField = groupMembershipField { queryItems.append(URLQueryItem(name: "group_membership_field", value: groupMembershipField)) } + if let groupObjectFilter = groupObjectFilter { queryItems.append(URLQueryItem(name: "group_object_filter", value: groupObjectFilter)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let objectUniquenessField = objectUniquenessField { queryItems.append(URLQueryItem(name: "object_uniqueness_field", value: objectUniquenessField)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let peerCertificate = peerCertificate { queryItems.append(URLQueryItem(name: "peer_certificate", value: peerCertificate.uuidString)) } + if let propertyMappings = propertyMappings { queryItems.append(URLQueryItem(name: "property_mappings", value: propertyMappings.map { $0.uuidString }.joined(separator: ","))) } + if let propertyMappingsGroup = propertyMappingsGroup { queryItems.append(URLQueryItem(name: "property_mappings_group", value: propertyMappingsGroup.map { $0.uuidString }.joined(separator: ","))) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let serverUri = serverUri { queryItems.append(URLQueryItem(name: "server_uri", value: serverUri)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + if let sni = sni { queryItems.append(URLQueryItem(name: "sni", value: sni ? "true" : "false")) } + if let startTls = startTls { queryItems.append(URLQueryItem(name: "start_tls", value: startTls ? "true" : "false")) } + if let syncGroups = syncGroups { queryItems.append(URLQueryItem(name: "sync_groups", value: syncGroups ? "true" : "false")) } + if let syncParentGroup = syncParentGroup { queryItems.append(URLQueryItem(name: "sync_parent_group", value: syncParentGroup.uuidString)) } + if let syncUsers = syncUsers { queryItems.append(URLQueryItem(name: "sync_users", value: syncUsers ? "true" : "false")) } + if let syncUsersPassword = syncUsersPassword { queryItems.append(URLQueryItem(name: "sync_users_password", value: syncUsersPassword ? "true" : "false")) } + if let userObjectFilter = userObjectFilter { queryItems.append(URLQueryItem(name: "user_object_filter", value: userObjectFilter)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedLDAPSourceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesLdapPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/ldap/{slug}/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedLDAPSourceRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesLdapPartialUpdate(slug: String, patchedLDAPSourceRequest: PatchedLDAPSourceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedLDAPSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesLdapRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/ldap/{slug}/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesLdapRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapSyncStatusRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapSyncStatusRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesLdapSyncStatusRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/ldap/{slug}/sync_status/ + /// - Get source's sync status + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesLdapSyncStatusRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/sync_status/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapSyncStatusRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapSyncStatusRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPSyncStatus.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesLdapUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/ldap/{slug}/ + /// - LDAP Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter lDAPSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesLdapUpdate(slug: String, lDAPSourceRequest: LDAPSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(lDAPSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(LDAPSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesLdapUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesLdapUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesLdapUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/ldap/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesLdapUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/ldap/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesLdapUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesLdapUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthCreateError: : \(object)" + case .code403Error(let object): + return "SourcesOauthCreateError: : \(object)" + } + } + } + + /// - POST /sources/oauth/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter oAuthSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesOauthCreate(oAuthSourceRequest: OAuthSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/oauth/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(oAuthSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuthSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesOauthDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/oauth/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesOauthDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/oauth/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter policyEngineMode + /// + public enum SourcesOauthListPolicyEngineMode: String, Codable, CaseIterable { + case all = "all" + case any = "any" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter userMatchingMode + /// + public enum SourcesOauthListUserMatchingMode: String, Codable, CaseIterable { + case emailDeny = "email_deny" + case emailLink = "email_link" + case identifier = "identifier" + case usernameDeny = "username_deny" + case usernameLink = "username_link" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum SourcesOauthListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthListError: : \(object)" + case .code403Error(let object): + return "SourcesOauthListError: : \(object)" + } + } + } + + /// - GET /sources/oauth/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter accessTokenUrl: (query) (optional) + /// - parameter additionalScopes: (query) (optional) + /// - parameter authenticationFlow: (query) (optional) + /// - parameter authorizationUrl: (query) (optional) + /// - parameter consumerKey: (query) (optional) + /// - parameter enabled: (query) (optional) + /// - parameter enrollmentFlow: (query) (optional) + /// - parameter hasJwks: (query) Only return sources with JWKS data (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) + /// - parameter profileUrl: (query) (optional) + /// - parameter providerType: (query) (optional) + /// - parameter requestTokenUrl: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter slug: (query) (optional) + /// - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) + /// - returns: AnyPublisher + open func sourcesOauthList(accessTokenUrl: String? = nil, additionalScopes: String? = nil, authenticationFlow: UUID? = nil, authorizationUrl: String? = nil, consumerKey: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, hasJwks: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: SourcesOauthListPolicyEngineMode? = nil, profileUrl: String? = nil, providerType: String? = nil, requestTokenUrl: String? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: SourcesOauthListUserMatchingMode? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/oauth/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let accessTokenUrl = accessTokenUrl { queryItems.append(URLQueryItem(name: "access_token_url", value: accessTokenUrl)) } + if let additionalScopes = additionalScopes { queryItems.append(URLQueryItem(name: "additional_scopes", value: additionalScopes)) } + if let authenticationFlow = authenticationFlow { queryItems.append(URLQueryItem(name: "authentication_flow", value: authenticationFlow.uuidString)) } + if let authorizationUrl = authorizationUrl { queryItems.append(URLQueryItem(name: "authorization_url", value: authorizationUrl)) } + if let consumerKey = consumerKey { queryItems.append(URLQueryItem(name: "consumer_key", value: consumerKey)) } + if let enabled = enabled { queryItems.append(URLQueryItem(name: "enabled", value: enabled ? "true" : "false")) } + if let enrollmentFlow = enrollmentFlow { queryItems.append(URLQueryItem(name: "enrollment_flow", value: enrollmentFlow.uuidString)) } + if let hasJwks = hasJwks { queryItems.append(URLQueryItem(name: "has_jwks", value: hasJwks ? "true" : "false")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyEngineMode = policyEngineMode { queryItems.append(URLQueryItem(name: "policy_engine_mode", value: policyEngineMode.rawValue)) } + if let profileUrl = profileUrl { queryItems.append(URLQueryItem(name: "profile_url", value: profileUrl)) } + if let providerType = providerType { queryItems.append(URLQueryItem(name: "provider_type", value: providerType)) } + if let requestTokenUrl = requestTokenUrl { queryItems.append(URLQueryItem(name: "request_token_url", value: requestTokenUrl)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + if let userMatchingMode = userMatchingMode { queryItems.append(URLQueryItem(name: "user_matching_mode", value: userMatchingMode.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedOAuthSourceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesOauthPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/oauth/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedOAuthSourceRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesOauthPartialUpdate(slug: String, patchedOAuthSourceRequest: PatchedOAuthSourceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/oauth/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedOAuthSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuthSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesOauthRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/oauth/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesOauthRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/oauth/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuthSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthSourceTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthSourceTypesListError: : \(object)" + case .code403Error(let object): + return "SourcesOauthSourceTypesListError: : \(object)" + } + } + } + + /// - GET /sources/oauth/source_types/ + /// - Get all creatable source types. If ?name is set, only returns the type for . If isn't found, returns the default type. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - returns: AnyPublisher<[SourceType], Error> + open func sourcesOauthSourceTypesList(name: String? = nil) -> AnyPublisher<[SourceType], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/oauth/source_types/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[SourceType], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthSourceTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthSourceTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([SourceType].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesOauthUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/oauth/{slug}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter oAuthSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesOauthUpdate(slug: String, oAuthSourceRequest: OAuthSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/oauth/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(oAuthSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(OAuthSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesOauthUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesOauthUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesOauthUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/oauth/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesOauthUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/oauth/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesOauthUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesOauthUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexCreateError: : \(object)" + case .code403Error(let object): + return "SourcesPlexCreateError: : \(object)" + } + } + } + + /// - POST /sources/plex/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter plexSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesPlexCreate(plexSourceRequest: PlexSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/plex/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(plexSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesPlexDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/plex/{slug}/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesPlexDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/plex/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter policyEngineMode + /// + public enum SourcesPlexListPolicyEngineMode: String, Codable, CaseIterable { + case all = "all" + case any = "any" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter userMatchingMode + /// + public enum SourcesPlexListUserMatchingMode: String, Codable, CaseIterable { + case emailDeny = "email_deny" + case emailLink = "email_link" + case identifier = "identifier" + case usernameDeny = "username_deny" + case usernameLink = "username_link" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum SourcesPlexListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexListError: : \(object)" + case .code403Error(let object): + return "SourcesPlexListError: : \(object)" + } + } + } + + /// - GET /sources/plex/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter allowFriends: (query) (optional) + /// - parameter authenticationFlow: (query) (optional) + /// - parameter clientId: (query) (optional) + /// - parameter enabled: (query) (optional) + /// - parameter enrollmentFlow: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter slug: (query) (optional) + /// - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) + /// - returns: AnyPublisher + open func sourcesPlexList(allowFriends: Bool? = nil, authenticationFlow: UUID? = nil, clientId: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: SourcesPlexListPolicyEngineMode? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: SourcesPlexListUserMatchingMode? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/plex/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let allowFriends = allowFriends { queryItems.append(URLQueryItem(name: "allow_friends", value: allowFriends ? "true" : "false")) } + if let authenticationFlow = authenticationFlow { queryItems.append(URLQueryItem(name: "authentication_flow", value: authenticationFlow.uuidString)) } + if let clientId = clientId { queryItems.append(URLQueryItem(name: "client_id", value: clientId)) } + if let enabled = enabled { queryItems.append(URLQueryItem(name: "enabled", value: enabled ? "true" : "false")) } + if let enrollmentFlow = enrollmentFlow { queryItems.append(URLQueryItem(name: "enrollment_flow", value: enrollmentFlow.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyEngineMode = policyEngineMode { queryItems.append(URLQueryItem(name: "policy_engine_mode", value: policyEngineMode.rawValue)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + if let userMatchingMode = userMatchingMode { queryItems.append(URLQueryItem(name: "user_matching_mode", value: userMatchingMode.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPlexSourceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesPlexPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/plex/{slug}/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedPlexSourceRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesPlexPartialUpdate(slug: String, patchedPlexSourceRequest: PatchedPlexSourceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/plex/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPlexSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexRedeemTokenAuthenticatedCreateError: Error, CustomStringConvertible { + // Token not found + case code400Error + // Access denied + case code403Error + + public var description: String { + switch self { + case .code400Error: + return "SourcesPlexRedeemTokenAuthenticatedCreateError: Token not found" + case .code403Error: + return "SourcesPlexRedeemTokenAuthenticatedCreateError: Access denied" + } + } + } + + /// - POST /sources/plex/redeem_token_authenticated/ + /// - Redeem a plex token for an authenticated user, creating a connection + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter plexTokenRedeemRequest: (body) + /// - parameter slug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesPlexRedeemTokenAuthenticatedCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/plex/redeem_token_authenticated/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(plexTokenRedeemRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return SourcesPlexRedeemTokenAuthenticatedCreateError.code400Error + } + if transportError.statusCode == 403 { + return SourcesPlexRedeemTokenAuthenticatedCreateError.code403Error + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexRedeemTokenCreateError: Error, CustomStringConvertible { + // Token not found + case code400Error + // Access denied + case code403Error + + public var description: String { + switch self { + case .code400Error: + return "SourcesPlexRedeemTokenCreateError: Token not found" + case .code403Error: + return "SourcesPlexRedeemTokenCreateError: Access denied" + } + } + } + + /// - POST /sources/plex/redeem_token/ + /// - Redeem a plex token, check it's access to resources against what's allowed for the source, and redirect to an authentication/enrollment flow. + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter plexTokenRedeemRequest: (body) + /// - parameter slug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesPlexRedeemTokenCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/plex/redeem_token/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(plexTokenRedeemRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return SourcesPlexRedeemTokenCreateError.code400Error + } + if transportError.statusCode == 403 { + return SourcesPlexRedeemTokenCreateError.code403Error + } + return transportError + } + .tryMap { response in + try self.decoder.decode(RedirectChallenge.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesPlexRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/plex/{slug}/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesPlexRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/plex/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesPlexUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/plex/{slug}/ + /// - Plex source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter plexSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesPlexUpdate(slug: String, plexSourceRequest: PlexSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/plex/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(plexSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesPlexUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesPlexUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesPlexUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/plex/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesPlexUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/plex/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesPlexUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesPlexUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlCreateError: : \(object)" + case .code403Error(let object): + return "SourcesSamlCreateError: : \(object)" + } + } + } + + /// - POST /sources/saml/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter sAMLSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesSamlCreate(sAMLSourceRequest: SAMLSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/saml/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(sAMLSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesSamlDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/saml/{slug}/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesSamlDestroy(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter bindingType + /// + public enum SourcesSamlListBindingType: String, Codable, CaseIterable { + case post = "POST" + case postAuto = "POST_AUTO" + case redirect = "REDIRECT" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter digestAlgorithm + /// + public enum SourcesSamlListDigestAlgorithm: String, Codable, CaseIterable { + case _2000_09_xmldsig_sha1 = "http://www.w3.org/2000/09/xmldsig#sha1" + case _2001_04_xmldsig_more_sha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" + case _2001_04_xmlenc_sha256 = "http://www.w3.org/2001/04/xmlenc#sha256" + case _2001_04_xmlenc_sha512 = "http://www.w3.org/2001/04/xmlenc#sha512" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter nameIdPolicy + /// + public enum SourcesSamlListNameIdPolicy: String, Codable, CaseIterable { + case _1_1_nameid_format_emailAddress = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" + case _2_0_nameid_format_WindowsDomainQualifiedName = "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" + case _2_0_nameid_format_X509SubjectName = "urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName" + case _2_0_nameid_format_persistent = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + case _2_0_nameid_format_transient = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter policyEngineMode + /// + public enum SourcesSamlListPolicyEngineMode: String, Codable, CaseIterable { + case all = "all" + case any = "any" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter signatureAlgorithm + /// + public enum SourcesSamlListSignatureAlgorithm: String, Codable, CaseIterable { + case _2000_09_xmldsig_dsa_sha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" + case _2000_09_xmldsig_rsa_sha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" + case _2001_04_xmldsig_more_rsa_sha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" + case _2001_04_xmldsig_more_rsa_sha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" + case _2001_04_xmldsig_more_rsa_sha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter userMatchingMode + /// + public enum SourcesSamlListUserMatchingMode: String, Codable, CaseIterable { + case emailDeny = "email_deny" + case emailLink = "email_link" + case identifier = "identifier" + case usernameDeny = "username_deny" + case usernameLink = "username_link" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum SourcesSamlListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlListError: : \(object)" + case .code403Error(let object): + return "SourcesSamlListError: : \(object)" + } + } + } + + /// - GET /sources/saml/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter allowIdpInitiated: (query) (optional) + /// - parameter authenticationFlow: (query) (optional) + /// - parameter bindingType: (query) * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation (optional) + /// - parameter digestAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) + /// - parameter enabled: (query) (optional) + /// - parameter enrollmentFlow: (query) (optional) + /// - parameter issuer: (query) (optional) + /// - parameter managed: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter nameIdPolicy: (query) NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter policyEngineMode: (query) * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) + /// - parameter preAuthenticationFlow: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter signatureAlgorithm: (query) * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) + /// - parameter signingKp: (query) (optional) + /// - parameter sloUrl: (query) (optional) + /// - parameter slug: (query) (optional) + /// - parameter ssoUrl: (query) (optional) + /// - parameter temporaryUserDeleteAfter: (query) (optional) + /// - parameter userMatchingMode: (query) How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) + /// - parameter verificationKp: (query) (optional) + /// - returns: AnyPublisher + open func sourcesSamlList(allowIdpInitiated: Bool? = nil, authenticationFlow: UUID? = nil, bindingType: SourcesSamlListBindingType? = nil, digestAlgorithm: SourcesSamlListDigestAlgorithm? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, issuer: String? = nil, managed: String? = nil, name: String? = nil, nameIdPolicy: SourcesSamlListNameIdPolicy? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: SourcesSamlListPolicyEngineMode? = nil, preAuthenticationFlow: UUID? = nil, search: String? = nil, signatureAlgorithm: SourcesSamlListSignatureAlgorithm? = nil, signingKp: UUID? = nil, sloUrl: String? = nil, slug: String? = nil, ssoUrl: String? = nil, temporaryUserDeleteAfter: String? = nil, userMatchingMode: SourcesSamlListUserMatchingMode? = nil, verificationKp: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/saml/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let allowIdpInitiated = allowIdpInitiated { queryItems.append(URLQueryItem(name: "allow_idp_initiated", value: allowIdpInitiated ? "true" : "false")) } + if let authenticationFlow = authenticationFlow { queryItems.append(URLQueryItem(name: "authentication_flow", value: authenticationFlow.uuidString)) } + if let bindingType = bindingType { queryItems.append(URLQueryItem(name: "binding_type", value: bindingType.rawValue)) } + if let digestAlgorithm = digestAlgorithm { queryItems.append(URLQueryItem(name: "digest_algorithm", value: digestAlgorithm.rawValue)) } + if let enabled = enabled { queryItems.append(URLQueryItem(name: "enabled", value: enabled ? "true" : "false")) } + if let enrollmentFlow = enrollmentFlow { queryItems.append(URLQueryItem(name: "enrollment_flow", value: enrollmentFlow.uuidString)) } + if let issuer = issuer { queryItems.append(URLQueryItem(name: "issuer", value: issuer)) } + if let managed = managed { queryItems.append(URLQueryItem(name: "managed", value: managed)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let nameIdPolicy = nameIdPolicy { queryItems.append(URLQueryItem(name: "name_id_policy", value: nameIdPolicy.rawValue)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let policyEngineMode = policyEngineMode { queryItems.append(URLQueryItem(name: "policy_engine_mode", value: policyEngineMode.rawValue)) } + if let preAuthenticationFlow = preAuthenticationFlow { queryItems.append(URLQueryItem(name: "pre_authentication_flow", value: preAuthenticationFlow.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let signatureAlgorithm = signatureAlgorithm { queryItems.append(URLQueryItem(name: "signature_algorithm", value: signatureAlgorithm.rawValue)) } + if let signingKp = signingKp { queryItems.append(URLQueryItem(name: "signing_kp", value: signingKp.uuidString)) } + if let sloUrl = sloUrl { queryItems.append(URLQueryItem(name: "slo_url", value: sloUrl)) } + if let slug = slug { queryItems.append(URLQueryItem(name: "slug", value: slug)) } + if let ssoUrl = ssoUrl { queryItems.append(URLQueryItem(name: "sso_url", value: ssoUrl)) } + if let temporaryUserDeleteAfter = temporaryUserDeleteAfter { queryItems.append(URLQueryItem(name: "temporary_user_delete_after", value: temporaryUserDeleteAfter)) } + if let userMatchingMode = userMatchingMode { queryItems.append(URLQueryItem(name: "user_matching_mode", value: userMatchingMode.rawValue)) } + if let verificationKp = verificationKp { queryItems.append(URLQueryItem(name: "verification_kp", value: verificationKp.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedSAMLSourceList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlMetadataRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlMetadataRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesSamlMetadataRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/saml/{slug}/metadata/ + /// - Return metadata as XML string + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesSamlMetadataRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/metadata/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlMetadataRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlMetadataRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLMetadata.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesSamlPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/saml/{slug}/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter patchedSAMLSourceRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesSamlPartialUpdate(slug: String, patchedSAMLSourceRequest: PatchedSAMLSourceRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedSAMLSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesSamlRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/saml/{slug}/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher + open func sourcesSamlRetrieve(slug: String) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesSamlUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/saml/{slug}/ + /// - SAMLSource Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - parameter sAMLSourceRequest: (body) + /// - returns: AnyPublisher + open func sourcesSamlUpdate(slug: String, sAMLSourceRequest: SAMLSourceRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(sAMLSourceRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(SAMLSource.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesSamlUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesSamlUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesSamlUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/saml/{slug}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter slug: (path) + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesSamlUsedByList(slug: String) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/saml/{slug}/used_by/" + path = path.replacingOccurrences(of: "{slug}", with: slug) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesSamlUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesSamlUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/user_connections/all/{id}/ + /// - User-source connection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this user source connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsAllDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/all/ + /// - User-source connection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter user: (query) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsAllList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let user = user { queryItems.append(URLQueryItem(name: "user", value: "\(user)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserSourceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/user_connections/all/{id}/ + /// - User-source connection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this user source connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsAllPartialUpdate(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/all/{id}/ + /// - User-source connection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this user source connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsAllRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/user_connections/all/{id}/ + /// - User-source connection Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this user source connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsAllUpdate(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/all/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsAllUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsAllUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/all/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this user source connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesUserConnectionsAllUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/all/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthCreateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthCreateError: : \(object)" + } + } + } + + /// - POST /sources/user_connections/oauth/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userOAuthSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthCreate(userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/oauth/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userOAuthSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserOAuthSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/user_connections/oauth/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/oauth/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/oauth/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sourceSlug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/oauth/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sourceSlug = sourceSlug { queryItems.append(URLQueryItem(name: "source__slug", value: sourceSlug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserOAuthSourceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/user_connections/oauth/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. + /// - parameter patchedUserOAuthSourceConnectionRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthPartialUpdate(id: Int, patchedUserOAuthSourceConnectionRequest: PatchedUserOAuthSourceConnectionRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/oauth/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserOAuthSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserOAuthSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/oauth/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/oauth/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserOAuthSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/user_connections/oauth/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. + /// - parameter userOAuthSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsOauthUpdate(id: Int, userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/oauth/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userOAuthSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserOAuthSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsOauthUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsOauthUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsOauthUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/oauth/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User OAuth Source Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesUserConnectionsOauthUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/oauth/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsOauthUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsOauthUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexCreateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexCreateError: : \(object)" + } + } + } + + /// - POST /sources/user_connections/plex/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter plexSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexCreate(plexSourceConnectionRequest: PlexSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/plex/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(plexSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/user_connections/plex/{id}/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Plex Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/plex/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/plex/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sourceSlug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/plex/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sourceSlug = sourceSlug { queryItems.append(URLQueryItem(name: "source__slug", value: sourceSlug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPlexSourceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/user_connections/plex/{id}/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Plex Source Connection. + /// - parameter patchedPlexSourceConnectionRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexPartialUpdate(id: Int, patchedPlexSourceConnectionRequest: PatchedPlexSourceConnectionRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/plex/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPlexSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/plex/{id}/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Plex Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/plex/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/user_connections/plex/{id}/ + /// - Plex Source connection Serializer + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Plex Source Connection. + /// - parameter plexSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsPlexUpdate(id: Int, plexSourceConnectionRequest: PlexSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/plex/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(plexSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PlexSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsPlexUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsPlexUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsPlexUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/plex/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User Plex Source Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesUserConnectionsPlexUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/plex/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsPlexUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsPlexUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlCreateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlCreateError: : \(object)" + } + } + } + + /// - POST /sources/user_connections/saml/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userSAMLSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlCreate(userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/saml/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userSAMLSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSAMLSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlDestroyError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlDestroyError: : \(object)" + } + } + } + + /// - DELETE /sources/user_connections/saml/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User SAML Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlDestroy(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/saml/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sourceSlug: (query) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/sources/user_connections/saml/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sourceSlug = sourceSlug { queryItems.append(URLQueryItem(name: "source__slug", value: sourceSlug)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserSAMLSourceConnectionList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlPartialUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /sources/user_connections/saml/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User SAML Source Connection. + /// - parameter patchedUserSAMLSourceConnectionRequest: (body) (optional) + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlPartialUpdate(id: Int, patchedUserSAMLSourceConnectionRequest: PatchedUserSAMLSourceConnectionRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserSAMLSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSAMLSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlRetrieveError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlRetrieveError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/saml/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User SAML Source Connection. + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlRetrieve(id: Int) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSAMLSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlUpdateError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlUpdateError: : \(object)" + } + } + } + + /// - PUT /sources/user_connections/saml/{id}/ + /// - Source Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User SAML Source Connection. + /// - parameter userSAMLSourceConnectionRequest: (body) + /// - returns: AnyPublisher + open func sourcesUserConnectionsSamlUpdate(id: Int, userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/saml/{id}/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userSAMLSourceConnectionRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserSAMLSourceConnection.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum SourcesUserConnectionsSamlUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "SourcesUserConnectionsSamlUsedByListError: : \(object)" + case .code403Error(let object): + return "SourcesUserConnectionsSamlUsedByListError: : \(object)" + } + } + } + + /// - GET /sources/user_connections/saml/{id}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter id: (path) A unique integer value identifying this User SAML Source Connection. + /// - returns: AnyPublisher<[UsedBy], Error> + open func sourcesUserConnectionsSamlUsedByList(id: Int) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/sources/user_connections/saml/{id}/used_by/" + path = path.replacingOccurrences(of: "{id}", with: "\(id)") + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return SourcesUserConnectionsSamlUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return SourcesUserConnectionsSamlUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/APIs/StagesAPI.swift b/authentikClient/Sources/APIs/StagesAPI.swift new file mode 100644 index 0000000..e941b02 --- /dev/null +++ b/authentikClient/Sources/APIs/StagesAPI.swift @@ -0,0 +1,11904 @@ +// +// StagesAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech + +import Foundation +import Combine +import OpenAPITransport + + +open class StagesAPI { + private let transport: OpenAPITransport + public var encoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(OpenISO8601DateFormatter()) + return encoder + }() + public var decoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(OpenISO8601DateFormatter()) + return decoder + }() + public var baseURL = URL(string: "http://localhost/api/v3") + + public init(_ transport: OpenAPITransport) { + self.transport = transport + } + + public enum StagesAllDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAllDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/all/{stage_uuid}/ + /// - Stage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this stage. + /// - returns: AnyPublisher + open func stagesAllDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/all/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAllListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllListError: : \(object)" + case .code403Error(let object): + return "StagesAllListError: : \(object)" + } + } + } + + /// - GET /stages/all/ + /// - Stage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/all/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAllRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAllRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/all/{stage_uuid}/ + /// - Stage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this stage. + /// - returns: AnyPublisher + open func stagesAllRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/all/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Stage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAllTypesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllTypesListError: : \(object)" + case .code403Error(let object): + return "StagesAllTypesListError: : \(object)" + } + } + } + + /// - GET /stages/all/types/ + /// - Get all creatable stage types + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func stagesAllTypesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/all/types/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllTypesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllTypesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAllUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAllUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/all/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAllUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/all/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAllUserSettingsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAllUserSettingsListError: : \(object)" + case .code403Error(let object): + return "StagesAllUserSettingsListError: : \(object)" + } + } + } + + /// - GET /stages/all/user_settings/ + /// - Get all stages the user can configure + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[UserSetting], Error> + open func stagesAllUserSettingsList() -> AnyPublisher<[UserSetting], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/all/user_settings/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UserSetting], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAllUserSettingsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAllUserSettingsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UserSetting].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/duo/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorDuoStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoCreate(authenticatorDuoStageRequest: AuthenticatorDuoStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/duo/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorDuoStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorDuoStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/duo/{stage_uuid}/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoEnrollmentStatusCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoEnrollmentStatusCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoEnrollmentStatusCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/duo/{stage_uuid}/enrollment_status/ + /// - Check enrollment status of user details in current session + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoEnrollmentStatusCreate(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/enrollment_status/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoEnrollmentStatusCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoEnrollmentStatusCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DuoDeviceEnrollmentStatus.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoImportDeviceManualCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "StagesAuthenticatorDuoImportDeviceManualCreateError: Bad request" + case .code403Error(let object): + return "StagesAuthenticatorDuoImportDeviceManualCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/duo/{stage_uuid}/import_device_manual/ + /// - Import duo devices into authentik + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - parameter authenticatorDuoStageManualDeviceImportRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoImportDeviceManualCreate(stageUuid: UUID, authenticatorDuoStageManualDeviceImportRequest: AuthenticatorDuoStageManualDeviceImportRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/import_device_manual/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorDuoStageManualDeviceImportRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return StagesAuthenticatorDuoImportDeviceManualCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoImportDeviceManualCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoImportDevicesAutomaticCreateError: Error, CustomStringConvertible { + // Bad request + case code400Error + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error: + return "StagesAuthenticatorDuoImportDevicesAutomaticCreateError: Bad request" + case .code403Error(let object): + return "StagesAuthenticatorDuoImportDevicesAutomaticCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/ + /// - Import duo devices into authentik + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoImportDevicesAutomaticCreate(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/import_devices_automatic/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + return StagesAuthenticatorDuoImportDevicesAutomaticCreateError.code400Error + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoImportDevicesAutomaticCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorDuoStageDeviceImportResponse.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/duo/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter apiHostname: (query) (optional) + /// - parameter clientId: (query) (optional) + /// - parameter configureFlow: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoList(apiHostname: String? = nil, clientId: String? = nil, configureFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/duo/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let apiHostname = apiHostname { queryItems.append(URLQueryItem(name: "api_hostname", value: apiHostname)) } + if let clientId = clientId { queryItems.append(URLQueryItem(name: "client_id", value: clientId)) } + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorDuoStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/duo/{stage_uuid}/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - parameter patchedAuthenticatorDuoStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoPartialUpdate(stageUuid: UUID, patchedAuthenticatorDuoStageRequest: PatchedAuthenticatorDuoStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorDuoStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorDuoStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/duo/{stage_uuid}/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorDuoStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/duo/{stage_uuid}/ + /// - AuthenticatorDuoStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - parameter authenticatorDuoStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorDuoUpdate(stageUuid: UUID, authenticatorDuoStageRequest: AuthenticatorDuoStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorDuoStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorDuoStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorDuoUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorDuoUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorDuoUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/duo/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Duo Authenticator Setup Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorDuoUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/duo/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorDuoUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorDuoUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/mobile/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorMobileStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorMobileCreate(authenticatorMobileStageRequest: AuthenticatorMobileStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/mobile/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorMobileStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorMobileStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/mobile/{stage_uuid}/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Mobile Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorMobileDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/mobile/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/mobile/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter configureFlow: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorMobileList(configureFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/mobile/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorMobileStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobilePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobilePartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobilePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/mobile/{stage_uuid}/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Mobile Authenticator Setup Stage. + /// - parameter patchedAuthenticatorMobileStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorMobilePartialUpdate(stageUuid: UUID, patchedAuthenticatorMobileStageRequest: PatchedAuthenticatorMobileStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/mobile/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorMobileStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobilePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobilePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorMobileStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/mobile/{stage_uuid}/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Mobile Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorMobileRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/mobile/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorMobileStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/mobile/{stage_uuid}/ + /// - AuthenticatorMobileStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Mobile Authenticator Setup Stage. + /// - parameter authenticatorMobileStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorMobileUpdate(stageUuid: UUID, authenticatorMobileStageRequest: AuthenticatorMobileStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/mobile/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorMobileStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorMobileStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorMobileUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorMobileUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorMobileUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/mobile/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Mobile Authenticator Setup Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorMobileUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/mobile/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorMobileUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorMobileUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/sms/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorSMSStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsCreate(authenticatorSMSStageRequest: AuthenticatorSMSStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/sms/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorSMSStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorSMSStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/sms/{stage_uuid}/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/sms/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter authType + /// + public enum StagesAuthenticatorSmsListAuthType: String, Codable, CaseIterable { + case basic = "basic" + case bearer = "bearer" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter provider + /// + public enum StagesAuthenticatorSmsListProvider: String, Codable, CaseIterable { + case generic = "generic" + case twilio = "twilio" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesAuthenticatorSmsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/sms/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter accountSid: (query) (optional) + /// - parameter auth: (query) (optional) + /// - parameter authPassword: (query) (optional) + /// - parameter authType: (query) * `basic` - Basic * `bearer` - Bearer (optional) + /// - parameter configureFlow: (query) (optional) + /// - parameter friendlyName: (query) (optional) + /// - parameter fromNumber: (query) (optional) + /// - parameter mapping: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter provider: (query) * `twilio` - Twilio * `generic` - Generic (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter verifyOnly: (query) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsList(accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: StagesAuthenticatorSmsListAuthType? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, fromNumber: String? = nil, mapping: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: StagesAuthenticatorSmsListProvider? = nil, search: String? = nil, stageUuid: UUID? = nil, verifyOnly: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/sms/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let accountSid = accountSid { queryItems.append(URLQueryItem(name: "account_sid", value: accountSid)) } + if let auth = auth { queryItems.append(URLQueryItem(name: "auth", value: auth)) } + if let authPassword = authPassword { queryItems.append(URLQueryItem(name: "auth_password", value: authPassword)) } + if let authType = authType { queryItems.append(URLQueryItem(name: "auth_type", value: authType.rawValue)) } + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let friendlyName = friendlyName { queryItems.append(URLQueryItem(name: "friendly_name", value: friendlyName)) } + if let fromNumber = fromNumber { queryItems.append(URLQueryItem(name: "from_number", value: fromNumber)) } + if let mapping = mapping { queryItems.append(URLQueryItem(name: "mapping", value: mapping.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let provider = provider { queryItems.append(URLQueryItem(name: "provider", value: provider.rawValue)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let verifyOnly = verifyOnly { queryItems.append(URLQueryItem(name: "verify_only", value: verifyOnly ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorSMSStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/sms/{stage_uuid}/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. + /// - parameter patchedAuthenticatorSMSStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsPartialUpdate(stageUuid: UUID, patchedAuthenticatorSMSStageRequest: PatchedAuthenticatorSMSStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/sms/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorSMSStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorSMSStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/sms/{stage_uuid}/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/sms/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorSMSStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/sms/{stage_uuid}/ + /// - AuthenticatorSMSStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. + /// - parameter authenticatorSMSStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorSmsUpdate(stageUuid: UUID, authenticatorSMSStageRequest: AuthenticatorSMSStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/sms/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorSMSStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorSMSStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorSmsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorSmsUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorSmsUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/sms/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this SMS Authenticator Setup Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorSmsUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/sms/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorSmsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorSmsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/static/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorStaticStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticCreate(authenticatorStaticStageRequest: AuthenticatorStaticStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/static/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorStaticStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorStaticStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/static/{stage_uuid}/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/static/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/static/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter configureFlow: (query) (optional) + /// - parameter friendlyName: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter tokenCount: (query) (optional) + /// - parameter tokenLength: (query) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticList(configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/static/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let friendlyName = friendlyName { queryItems.append(URLQueryItem(name: "friendly_name", value: friendlyName)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let tokenCount = tokenCount { queryItems.append(URLQueryItem(name: "token_count", value: "\(tokenCount)")) } + if let tokenLength = tokenLength { queryItems.append(URLQueryItem(name: "token_length", value: "\(tokenLength)")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorStaticStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/static/{stage_uuid}/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. + /// - parameter patchedAuthenticatorStaticStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticPartialUpdate(stageUuid: UUID, patchedAuthenticatorStaticStageRequest: PatchedAuthenticatorStaticStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/static/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorStaticStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorStaticStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/static/{stage_uuid}/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/static/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorStaticStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/static/{stage_uuid}/ + /// - AuthenticatorStaticStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. + /// - parameter authenticatorStaticStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorStaticUpdate(stageUuid: UUID, authenticatorStaticStageRequest: AuthenticatorStaticStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/static/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorStaticStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorStaticStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorStaticUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorStaticUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorStaticUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/static/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Static Authenticator Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorStaticUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/static/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorStaticUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorStaticUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/totp/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorTOTPStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpCreate(authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/totp/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorTOTPStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorTOTPStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/totp/{stage_uuid}/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/totp/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter digits + /// + public enum StagesAuthenticatorTotpListDigits: String, Codable, CaseIterable { + case _6 = "6" + case _8 = "8" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesAuthenticatorTotpListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/totp/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter configureFlow: (query) (optional) + /// - parameter digits: (query) * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator (optional) + /// - parameter friendlyName: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpList(configureFlow: UUID? = nil, digits: StagesAuthenticatorTotpListDigits? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/totp/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let digits = digits { queryItems.append(URLQueryItem(name: "digits", value: digits.rawValue)) } + if let friendlyName = friendlyName { queryItems.append(URLQueryItem(name: "friendly_name", value: friendlyName)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorTOTPStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/totp/{stage_uuid}/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. + /// - parameter patchedAuthenticatorTOTPStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpPartialUpdate(stageUuid: UUID, patchedAuthenticatorTOTPStageRequest: PatchedAuthenticatorTOTPStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/totp/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorTOTPStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorTOTPStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/totp/{stage_uuid}/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/totp/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorTOTPStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/totp/{stage_uuid}/ + /// - AuthenticatorTOTPStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. + /// - parameter authenticatorTOTPStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorTotpUpdate(stageUuid: UUID, authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/totp/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorTOTPStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorTOTPStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorTotpUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorTotpUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorTotpUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/totp/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this TOTP Authenticator Setup Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorTotpUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/totp/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorTotpUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorTotpUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidateCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/validate/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorValidateStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorValidateCreate(authenticatorValidateStageRequest: AuthenticatorValidateStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/validate/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticatorValidateStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorValidateStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidateDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/validate/{stage_uuid}/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorValidateDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/validate/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter notConfiguredAction + /// + public enum StagesAuthenticatorValidateListNotConfiguredAction: String, Codable, CaseIterable { + case configure = "configure" + case deny = "deny" + case skip = "skip" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesAuthenticatorValidateListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/validate/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter configurationStages: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter notConfiguredAction: (query) * `skip` - Skip * `deny` - Deny * `configure` - Configure (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorValidateList(configurationStages: [UUID]? = nil, name: String? = nil, notConfiguredAction: StagesAuthenticatorValidateListNotConfiguredAction? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/validate/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let configurationStages = configurationStages { queryItems.append(URLQueryItem(name: "configuration_stages", value: configurationStages.map { $0.uuidString }.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let notConfiguredAction = notConfiguredAction { queryItems.append(URLQueryItem(name: "not_configured_action", value: notConfiguredAction.rawValue)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticatorValidateStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidatePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidatePartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidatePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/validate/{stage_uuid}/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. + /// - parameter patchedAuthenticatorValidateStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorValidatePartialUpdate(stageUuid: UUID, patchedAuthenticatorValidateStageRequest: PatchedAuthenticatorValidateStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/validate/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticatorValidateStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidatePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidatePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorValidateStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidateRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/validate/{stage_uuid}/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorValidateRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/validate/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorValidateStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidateUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/validate/{stage_uuid}/ + /// - AuthenticatorValidateStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. + /// - parameter authenticatorValidateStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorValidateUpdate(stageUuid: UUID, authenticatorValidateStageRequest: AuthenticatorValidateStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/validate/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticatorValidateStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticatorValidateStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorValidateUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorValidateUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorValidateUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/validate/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Authenticator Validation Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorValidateUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/validate/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorValidateUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorValidateUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnCreateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnCreateError: : \(object)" + } + } + } + + /// - POST /stages/authenticator/webauthn/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticateWebAuthnStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnCreate(authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/webauthn/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(authenticateWebAuthnStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticateWebAuthnStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnDestroyError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/authenticator/webauthn/{stage_uuid}/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/webauthn/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter authenticatorAttachment + /// + public enum StagesAuthenticatorWebauthnListAuthenticatorAttachment: String, Codable, CaseIterable { + case crossPlatform = "cross-platform" + case platform = "platform" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter residentKeyRequirement + /// + public enum StagesAuthenticatorWebauthnListResidentKeyRequirement: String, Codable, CaseIterable { + case discouraged = "discouraged" + case preferred = "preferred" + case _required = "required" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter userVerification + /// + public enum StagesAuthenticatorWebauthnListUserVerification: String, Codable, CaseIterable { + case discouraged = "discouraged" + case preferred = "preferred" + case _required = "required" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesAuthenticatorWebauthnListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/webauthn/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter authenticatorAttachment: (query) * `platform` - Platform * `cross-platform` - Cross Platform (optional) + /// - parameter configureFlow: (query) (optional) + /// - parameter friendlyName: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter residentKeyRequirement: (query) * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter userVerification: (query) * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnList(authenticatorAttachment: StagesAuthenticatorWebauthnListAuthenticatorAttachment? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, residentKeyRequirement: StagesAuthenticatorWebauthnListResidentKeyRequirement? = nil, search: String? = nil, stageUuid: UUID? = nil, userVerification: StagesAuthenticatorWebauthnListUserVerification? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/authenticator/webauthn/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let authenticatorAttachment = authenticatorAttachment { queryItems.append(URLQueryItem(name: "authenticator_attachment", value: authenticatorAttachment.rawValue)) } + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let friendlyName = friendlyName { queryItems.append(URLQueryItem(name: "friendly_name", value: friendlyName)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let residentKeyRequirement = residentKeyRequirement { queryItems.append(URLQueryItem(name: "resident_key_requirement", value: residentKeyRequirement.rawValue)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let userVerification = userVerification { queryItems.append(URLQueryItem(name: "user_verification", value: userVerification.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedAuthenticateWebAuthnStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/authenticator/webauthn/{stage_uuid}/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. + /// - parameter patchedAuthenticateWebAuthnStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnPartialUpdate(stageUuid: UUID, patchedAuthenticateWebAuthnStageRequest: PatchedAuthenticateWebAuthnStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/webauthn/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedAuthenticateWebAuthnStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticateWebAuthnStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/webauthn/{stage_uuid}/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/webauthn/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticateWebAuthnStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnUpdateError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/authenticator/webauthn/{stage_uuid}/ + /// - AuthenticateWebAuthnStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. + /// - parameter authenticateWebAuthnStageRequest: (body) + /// - returns: AnyPublisher + open func stagesAuthenticatorWebauthnUpdate(stageUuid: UUID, authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/webauthn/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(authenticateWebAuthnStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(AuthenticateWebAuthnStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesAuthenticatorWebauthnUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesAuthenticatorWebauthnUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesAuthenticatorWebauthnUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/authenticator/webauthn/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this WebAuthn Authenticator Setup Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesAuthenticatorWebauthnUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/authenticator/webauthn/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesAuthenticatorWebauthnUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesAuthenticatorWebauthnUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaCreateError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaCreateError: : \(object)" + } + } + } + + /// - POST /stages/captcha/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter captchaStageRequest: (body) + /// - returns: AnyPublisher + open func stagesCaptchaCreate(captchaStageRequest: CaptchaStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/captcha/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(captchaStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CaptchaStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaDestroyError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/captcha/{stage_uuid}/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. + /// - returns: AnyPublisher + open func stagesCaptchaDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/captcha/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaListError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaListError: : \(object)" + } + } + } + + /// - GET /stages/captcha/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter publicKey: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesCaptchaList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, publicKey: String? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/captcha/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let publicKey = publicKey { queryItems.append(URLQueryItem(name: "public_key", value: publicKey)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedCaptchaStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/captcha/{stage_uuid}/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. + /// - parameter patchedCaptchaStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesCaptchaPartialUpdate(stageUuid: UUID, patchedCaptchaStageRequest: PatchedCaptchaStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/captcha/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedCaptchaStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CaptchaStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/captcha/{stage_uuid}/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. + /// - returns: AnyPublisher + open func stagesCaptchaRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/captcha/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CaptchaStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaUpdateError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/captcha/{stage_uuid}/ + /// - CaptchaStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. + /// - parameter captchaStageRequest: (body) + /// - returns: AnyPublisher + open func stagesCaptchaUpdate(stageUuid: UUID, captchaStageRequest: CaptchaStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/captcha/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(captchaStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(CaptchaStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesCaptchaUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesCaptchaUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesCaptchaUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/captcha/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Captcha Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesCaptchaUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/captcha/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesCaptchaUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesCaptchaUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentCreateError: : \(object)" + case .code403Error(let object): + return "StagesConsentCreateError: : \(object)" + } + } + } + + /// - POST /stages/consent/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter consentStageRequest: (body) + /// - returns: AnyPublisher + open func stagesConsentCreate(consentStageRequest: ConsentStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/consent/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(consentStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ConsentStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentDestroyError: : \(object)" + case .code403Error(let object): + return "StagesConsentDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/consent/{stage_uuid}/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Consent Stage. + /// - returns: AnyPublisher + open func stagesConsentDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/consent/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter mode + /// + public enum StagesConsentListMode: String, Codable, CaseIterable { + case alwaysRequire = "always_require" + case expiring = "expiring" + case permanent = "permanent" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesConsentListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentListError: : \(object)" + case .code403Error(let object): + return "StagesConsentListError: : \(object)" + } + } + } + + /// - GET /stages/consent/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter consentExpireIn: (query) (optional) + /// - parameter mode: (query) * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesConsentList(consentExpireIn: String? = nil, mode: StagesConsentListMode? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/consent/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let consentExpireIn = consentExpireIn { queryItems.append(URLQueryItem(name: "consent_expire_in", value: consentExpireIn)) } + if let mode = mode { queryItems.append(URLQueryItem(name: "mode", value: mode.rawValue)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedConsentStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesConsentPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/consent/{stage_uuid}/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Consent Stage. + /// - parameter patchedConsentStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesConsentPartialUpdate(stageUuid: UUID, patchedConsentStageRequest: PatchedConsentStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/consent/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedConsentStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ConsentStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesConsentRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/consent/{stage_uuid}/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Consent Stage. + /// - returns: AnyPublisher + open func stagesConsentRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/consent/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ConsentStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentUpdateError: : \(object)" + case .code403Error(let object): + return "StagesConsentUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/consent/{stage_uuid}/ + /// - ConsentStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Consent Stage. + /// - parameter consentStageRequest: (body) + /// - returns: AnyPublisher + open func stagesConsentUpdate(stageUuid: UUID, consentStageRequest: ConsentStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/consent/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(consentStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(ConsentStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesConsentUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesConsentUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesConsentUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/consent/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Consent Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesConsentUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/consent/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesConsentUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesConsentUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyCreateError: : \(object)" + case .code403Error(let object): + return "StagesDenyCreateError: : \(object)" + } + } + } + + /// - POST /stages/deny/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter denyStageRequest: (body) + /// - returns: AnyPublisher + open func stagesDenyCreate(denyStageRequest: DenyStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/deny/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(denyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DenyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyDestroyError: : \(object)" + case .code403Error(let object): + return "StagesDenyDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/deny/{stage_uuid}/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Deny Stage. + /// - returns: AnyPublisher + open func stagesDenyDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/deny/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyListError: : \(object)" + case .code403Error(let object): + return "StagesDenyListError: : \(object)" + } + } + } + + /// - GET /stages/deny/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter denyMessage: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesDenyList(denyMessage: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/deny/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let denyMessage = denyMessage { queryItems.append(URLQueryItem(name: "deny_message", value: denyMessage)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDenyStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesDenyPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/deny/{stage_uuid}/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Deny Stage. + /// - parameter patchedDenyStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesDenyPartialUpdate(stageUuid: UUID, patchedDenyStageRequest: PatchedDenyStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/deny/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDenyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DenyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesDenyRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/deny/{stage_uuid}/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Deny Stage. + /// - returns: AnyPublisher + open func stagesDenyRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/deny/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DenyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyUpdateError: : \(object)" + case .code403Error(let object): + return "StagesDenyUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/deny/{stage_uuid}/ + /// - DenyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Deny Stage. + /// - parameter denyStageRequest: (body) + /// - returns: AnyPublisher + open func stagesDenyUpdate(stageUuid: UUID, denyStageRequest: DenyStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/deny/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(denyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DenyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDenyUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDenyUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesDenyUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/deny/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Deny Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesDenyUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/deny/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDenyUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDenyUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyCreateError: : \(object)" + case .code403Error(let object): + return "StagesDummyCreateError: : \(object)" + } + } + } + + /// - POST /stages/dummy/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter dummyStageRequest: (body) + /// - returns: AnyPublisher + open func stagesDummyCreate(dummyStageRequest: DummyStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/dummy/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(dummyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyDestroyError: : \(object)" + case .code403Error(let object): + return "StagesDummyDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/dummy/{stage_uuid}/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. + /// - returns: AnyPublisher + open func stagesDummyDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/dummy/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyListError: : \(object)" + case .code403Error(let object): + return "StagesDummyListError: : \(object)" + } + } + } + + /// - GET /stages/dummy/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter throwError: (query) (optional) + /// - returns: AnyPublisher + open func stagesDummyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, throwError: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/dummy/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let throwError = throwError { queryItems.append(URLQueryItem(name: "throw_error", value: throwError ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedDummyStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesDummyPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/dummy/{stage_uuid}/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. + /// - parameter patchedDummyStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesDummyPartialUpdate(stageUuid: UUID, patchedDummyStageRequest: PatchedDummyStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/dummy/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedDummyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesDummyRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/dummy/{stage_uuid}/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. + /// - returns: AnyPublisher + open func stagesDummyRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/dummy/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyUpdateError: : \(object)" + case .code403Error(let object): + return "StagesDummyUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/dummy/{stage_uuid}/ + /// - DummyStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. + /// - parameter dummyStageRequest: (body) + /// - returns: AnyPublisher + open func stagesDummyUpdate(stageUuid: UUID, dummyStageRequest: DummyStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/dummy/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(dummyStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(DummyStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesDummyUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesDummyUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesDummyUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/dummy/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Dummy Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesDummyUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/dummy/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesDummyUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesDummyUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailCreateError: : \(object)" + case .code403Error(let object): + return "StagesEmailCreateError: : \(object)" + } + } + } + + /// - POST /stages/email/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter emailStageRequest: (body) + /// - returns: AnyPublisher + open func stagesEmailCreate(emailStageRequest: EmailStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/email/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(emailStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EmailStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailDestroyError: : \(object)" + case .code403Error(let object): + return "StagesEmailDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/email/{stage_uuid}/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Email Stage. + /// - returns: AnyPublisher + open func stagesEmailDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/email/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailListError: : \(object)" + case .code403Error(let object): + return "StagesEmailListError: : \(object)" + } + } + } + + /// - GET /stages/email/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter activateUserOnSuccess: (query) (optional) + /// - parameter fromAddress: (query) (optional) + /// - parameter host: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter port: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter subject: (query) (optional) + /// - parameter template: (query) (optional) + /// - parameter timeout: (query) (optional) + /// - parameter tokenExpiry: (query) (optional) + /// - parameter useGlobalSettings: (query) (optional) + /// - parameter useSsl: (query) (optional) + /// - parameter useTls: (query) (optional) + /// - parameter username: (query) (optional) + /// - returns: AnyPublisher + open func stagesEmailList(activateUserOnSuccess: Bool? = nil, fromAddress: String? = nil, host: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, port: Int? = nil, search: String? = nil, subject: String? = nil, template: String? = nil, timeout: Int? = nil, tokenExpiry: Int? = nil, useGlobalSettings: Bool? = nil, useSsl: Bool? = nil, useTls: Bool? = nil, username: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/email/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let activateUserOnSuccess = activateUserOnSuccess { queryItems.append(URLQueryItem(name: "activate_user_on_success", value: activateUserOnSuccess ? "true" : "false")) } + if let fromAddress = fromAddress { queryItems.append(URLQueryItem(name: "from_address", value: fromAddress)) } + if let host = host { queryItems.append(URLQueryItem(name: "host", value: host)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let port = port { queryItems.append(URLQueryItem(name: "port", value: "\(port)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let subject = subject { queryItems.append(URLQueryItem(name: "subject", value: subject)) } + if let template = template { queryItems.append(URLQueryItem(name: "template", value: template)) } + if let timeout = timeout { queryItems.append(URLQueryItem(name: "timeout", value: "\(timeout)")) } + if let tokenExpiry = tokenExpiry { queryItems.append(URLQueryItem(name: "token_expiry", value: "\(tokenExpiry)")) } + if let useGlobalSettings = useGlobalSettings { queryItems.append(URLQueryItem(name: "use_global_settings", value: useGlobalSettings ? "true" : "false")) } + if let useSsl = useSsl { queryItems.append(URLQueryItem(name: "use_ssl", value: useSsl ? "true" : "false")) } + if let useTls = useTls { queryItems.append(URLQueryItem(name: "use_tls", value: useTls ? "true" : "false")) } + if let username = username { queryItems.append(URLQueryItem(name: "username", value: username)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedEmailStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesEmailPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/email/{stage_uuid}/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Email Stage. + /// - parameter patchedEmailStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesEmailPartialUpdate(stageUuid: UUID, patchedEmailStageRequest: PatchedEmailStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/email/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedEmailStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EmailStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesEmailRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/email/{stage_uuid}/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Email Stage. + /// - returns: AnyPublisher + open func stagesEmailRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/email/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EmailStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailTemplatesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailTemplatesListError: : \(object)" + case .code403Error(let object): + return "StagesEmailTemplatesListError: : \(object)" + } + } + } + + /// - GET /stages/email/templates/ + /// - Get all available templates, including custom templates + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - returns: AnyPublisher<[TypeCreate], Error> + open func stagesEmailTemplatesList() -> AnyPublisher<[TypeCreate], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/email/templates/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[TypeCreate], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailTemplatesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailTemplatesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([TypeCreate].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailUpdateError: : \(object)" + case .code403Error(let object): + return "StagesEmailUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/email/{stage_uuid}/ + /// - EmailStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Email Stage. + /// - parameter emailStageRequest: (body) + /// - returns: AnyPublisher + open func stagesEmailUpdate(stageUuid: UUID, emailStageRequest: EmailStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/email/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(emailStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(EmailStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesEmailUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesEmailUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesEmailUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/email/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Email Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesEmailUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/email/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesEmailUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesEmailUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationCreateError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationCreateError: : \(object)" + } + } + } + + /// - POST /stages/identification/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter identificationStageRequest: (body) + /// - returns: AnyPublisher + open func stagesIdentificationCreate(identificationStageRequest: IdentificationStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/identification/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(identificationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(IdentificationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationDestroyError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/identification/{stage_uuid}/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Identification Stage. + /// - returns: AnyPublisher + open func stagesIdentificationDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/identification/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationListError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationListError: : \(object)" + } + } + } + + /// - GET /stages/identification/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter caseInsensitiveMatching: (query) (optional) + /// - parameter enrollmentFlow: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter passwordStage: (query) (optional) + /// - parameter passwordlessFlow: (query) (optional) + /// - parameter recoveryFlow: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter showMatchedUser: (query) (optional) + /// - parameter showSourceLabels: (query) (optional) + /// - returns: AnyPublisher + open func stagesIdentificationList(caseInsensitiveMatching: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordStage: UUID? = nil, passwordlessFlow: UUID? = nil, recoveryFlow: UUID? = nil, search: String? = nil, showMatchedUser: Bool? = nil, showSourceLabels: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/identification/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let caseInsensitiveMatching = caseInsensitiveMatching { queryItems.append(URLQueryItem(name: "case_insensitive_matching", value: caseInsensitiveMatching ? "true" : "false")) } + if let enrollmentFlow = enrollmentFlow { queryItems.append(URLQueryItem(name: "enrollment_flow", value: enrollmentFlow.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let passwordStage = passwordStage { queryItems.append(URLQueryItem(name: "password_stage", value: passwordStage.uuidString)) } + if let passwordlessFlow = passwordlessFlow { queryItems.append(URLQueryItem(name: "passwordless_flow", value: passwordlessFlow.uuidString)) } + if let recoveryFlow = recoveryFlow { queryItems.append(URLQueryItem(name: "recovery_flow", value: recoveryFlow.uuidString)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let showMatchedUser = showMatchedUser { queryItems.append(URLQueryItem(name: "show_matched_user", value: showMatchedUser ? "true" : "false")) } + if let showSourceLabels = showSourceLabels { queryItems.append(URLQueryItem(name: "show_source_labels", value: showSourceLabels ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedIdentificationStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/identification/{stage_uuid}/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Identification Stage. + /// - parameter patchedIdentificationStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesIdentificationPartialUpdate(stageUuid: UUID, patchedIdentificationStageRequest: PatchedIdentificationStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/identification/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedIdentificationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(IdentificationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/identification/{stage_uuid}/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Identification Stage. + /// - returns: AnyPublisher + open func stagesIdentificationRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/identification/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(IdentificationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationUpdateError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/identification/{stage_uuid}/ + /// - IdentificationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Identification Stage. + /// - parameter identificationStageRequest: (body) + /// - returns: AnyPublisher + open func stagesIdentificationUpdate(stageUuid: UUID, identificationStageRequest: IdentificationStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/identification/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(identificationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(IdentificationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesIdentificationUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesIdentificationUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesIdentificationUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/identification/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Identification Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesIdentificationUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/identification/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesIdentificationUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesIdentificationUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsCreateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsCreateError: : \(object)" + } + } + } + + /// - POST /stages/invitation/invitations/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter invitationRequest: (body) + /// - returns: AnyPublisher + open func stagesInvitationInvitationsCreate(invitationRequest: InvitationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/invitation/invitations/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(invitationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Invitation.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsDestroyError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/invitation/invitations/{invite_uuid}/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter inviteUuid: (path) A UUID string identifying this Invitation. + /// - returns: AnyPublisher + open func stagesInvitationInvitationsDestroy(inviteUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/invitations/{invite_uuid}/" + path = path.replacingOccurrences(of: "{invite_uuid}", with: inviteUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsListError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsListError: : \(object)" + } + } + } + + /// - GET /stages/invitation/invitations/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter createdByUsername: (query) (optional) + /// - parameter expires: (query) (optional) + /// - parameter flowSlug: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesInvitationInvitationsList(createdByUsername: String? = nil, expires: Date? = nil, flowSlug: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/invitation/invitations/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let createdByUsername = createdByUsername { queryItems.append(URLQueryItem(name: "created_by__username", value: createdByUsername)) } + if let expires = expires { queryItems.append(URLQueryItem(name: "expires", value: OpenISO8601DateFormatter.shared.string(from: expires))) } + if let flowSlug = flowSlug { queryItems.append(URLQueryItem(name: "flow__slug", value: flowSlug)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedInvitationList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/invitation/invitations/{invite_uuid}/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter inviteUuid: (path) A UUID string identifying this Invitation. + /// - parameter patchedInvitationRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesInvitationInvitationsPartialUpdate(inviteUuid: UUID, patchedInvitationRequest: PatchedInvitationRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/invitations/{invite_uuid}/" + path = path.replacingOccurrences(of: "{invite_uuid}", with: inviteUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedInvitationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Invitation.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/invitation/invitations/{invite_uuid}/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter inviteUuid: (path) A UUID string identifying this Invitation. + /// - returns: AnyPublisher + open func stagesInvitationInvitationsRetrieve(inviteUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/invitations/{invite_uuid}/" + path = path.replacingOccurrences(of: "{invite_uuid}", with: inviteUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Invitation.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsUpdateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/invitation/invitations/{invite_uuid}/ + /// - Invitation Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter inviteUuid: (path) A UUID string identifying this Invitation. + /// - parameter invitationRequest: (body) + /// - returns: AnyPublisher + open func stagesInvitationInvitationsUpdate(inviteUuid: UUID, invitationRequest: InvitationRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/invitations/{invite_uuid}/" + path = path.replacingOccurrences(of: "{invite_uuid}", with: inviteUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(invitationRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Invitation.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationInvitationsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationInvitationsUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesInvitationInvitationsUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/invitation/invitations/{invite_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter inviteUuid: (path) A UUID string identifying this Invitation. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesInvitationInvitationsUsedByList(inviteUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/invitations/{invite_uuid}/used_by/" + path = path.replacingOccurrences(of: "{invite_uuid}", with: inviteUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationInvitationsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationInvitationsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesCreateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesCreateError: : \(object)" + } + } + } + + /// - POST /stages/invitation/stages/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter invitationStageRequest: (body) + /// - returns: AnyPublisher + open func stagesInvitationStagesCreate(invitationStageRequest: InvitationStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/invitation/stages/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(invitationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(InvitationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesDestroyError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/invitation/stages/{stage_uuid}/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. + /// - returns: AnyPublisher + open func stagesInvitationStagesDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesListError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesListError: : \(object)" + } + } + } + + /// - GET /stages/invitation/stages/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter continueFlowWithoutInvitation: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter noFlows: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesInvitationStagesList(continueFlowWithoutInvitation: Bool? = nil, name: String? = nil, noFlows: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/invitation/stages/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let continueFlowWithoutInvitation = continueFlowWithoutInvitation { queryItems.append(URLQueryItem(name: "continue_flow_without_invitation", value: continueFlowWithoutInvitation ? "true" : "false")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let noFlows = noFlows { queryItems.append(URLQueryItem(name: "no_flows", value: noFlows ? "true" : "false")) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedInvitationStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/invitation/stages/{stage_uuid}/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. + /// - parameter patchedInvitationStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesInvitationStagesPartialUpdate(stageUuid: UUID, patchedInvitationStageRequest: PatchedInvitationStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedInvitationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(InvitationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/invitation/stages/{stage_uuid}/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. + /// - returns: AnyPublisher + open func stagesInvitationStagesRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(InvitationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesUpdateError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/invitation/stages/{stage_uuid}/ + /// - InvitationStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. + /// - parameter invitationStageRequest: (body) + /// - returns: AnyPublisher + open func stagesInvitationStagesUpdate(stageUuid: UUID, invitationStageRequest: InvitationStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(invitationStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(InvitationStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesInvitationStagesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesInvitationStagesUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesInvitationStagesUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/invitation/stages/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Invitation Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesInvitationStagesUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/invitation/stages/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesInvitationStagesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesInvitationStagesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordCreateError: : \(object)" + case .code403Error(let object): + return "StagesPasswordCreateError: : \(object)" + } + } + } + + /// - POST /stages/password/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter passwordStageRequest: (body) + /// - returns: AnyPublisher + open func stagesPasswordCreate(passwordStageRequest: PasswordStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/password/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(passwordStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordDestroyError: : \(object)" + case .code403Error(let object): + return "StagesPasswordDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/password/{stage_uuid}/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Password Stage. + /// - returns: AnyPublisher + open func stagesPasswordDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/password/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordListError: : \(object)" + case .code403Error(let object): + return "StagesPasswordListError: : \(object)" + } + } + } + + /// - GET /stages/password/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter configureFlow: (query) (optional) + /// - parameter failedAttemptsBeforeCancel: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - returns: AnyPublisher + open func stagesPasswordList(configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/password/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let configureFlow = configureFlow { queryItems.append(URLQueryItem(name: "configure_flow", value: configureFlow.uuidString)) } + if let failedAttemptsBeforeCancel = failedAttemptsBeforeCancel { queryItems.append(URLQueryItem(name: "failed_attempts_before_cancel", value: "\(failedAttemptsBeforeCancel)")) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPasswordStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPasswordPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/password/{stage_uuid}/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Password Stage. + /// - parameter patchedPasswordStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesPasswordPartialUpdate(stageUuid: UUID, patchedPasswordStageRequest: PatchedPasswordStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/password/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPasswordStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesPasswordRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/password/{stage_uuid}/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Password Stage. + /// - returns: AnyPublisher + open func stagesPasswordRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/password/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPasswordUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/password/{stage_uuid}/ + /// - PasswordStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Password Stage. + /// - parameter passwordStageRequest: (body) + /// - returns: AnyPublisher + open func stagesPasswordUpdate(stageUuid: UUID, passwordStageRequest: PasswordStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/password/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(passwordStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PasswordStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPasswordUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPasswordUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesPasswordUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/password/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Password Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesPasswordUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/password/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPasswordUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPasswordUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsCreateError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsCreateError: : \(object)" + } + } + } + + /// - POST /stages/prompt/prompts/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptRequest: (body) + /// - returns: AnyPublisher + open func stagesPromptPromptsCreate(promptRequest: PromptRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/prompt/prompts/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(promptRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Prompt.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsDestroyError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/prompt/prompts/{prompt_uuid}/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptUuid: (path) A UUID string identifying this Prompt. + /// - returns: AnyPublisher + open func stagesPromptPromptsDestroy(promptUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/prompts/{prompt_uuid}/" + path = path.replacingOccurrences(of: "{prompt_uuid}", with: promptUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter type + /// + public enum StagesPromptPromptsListModelType: String, Codable, CaseIterable { + case akLocale = "ak-locale" + case checkbox = "checkbox" + case date = "date" + case dateTime = "date-time" + case dropdown = "dropdown" + case email = "email" + case file = "file" + case hidden = "hidden" + case number = "number" + case password = "password" + case radioButtonGroup = "radio-button-group" + case separator = "separator" + case _static = "static" + case text = "text" + case textArea = "text_area" + case textAreaReadOnly = "text_area_read_only" + case textReadOnly = "text_read_only" + case username = "username" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesPromptPromptsListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsListError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsListError: : \(object)" + } + } + } + + /// - GET /stages/prompt/prompts/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fieldKey: (query) (optional) + /// - parameter label: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter placeholder: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter type: (query) * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports (optional) + /// - returns: AnyPublisher + open func stagesPromptPromptsList(fieldKey: String? = nil, label: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, placeholder: String? = nil, search: String? = nil, type: StagesPromptPromptsListModelType? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/prompt/prompts/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let fieldKey = fieldKey { queryItems.append(URLQueryItem(name: "field_key", value: fieldKey)) } + if let label = label { queryItems.append(URLQueryItem(name: "label", value: label)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let placeholder = placeholder { queryItems.append(URLQueryItem(name: "placeholder", value: placeholder)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let type = type { queryItems.append(URLQueryItem(name: "type", value: type.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPromptList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/prompt/prompts/{prompt_uuid}/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptUuid: (path) A UUID string identifying this Prompt. + /// - parameter patchedPromptRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesPromptPromptsPartialUpdate(promptUuid: UUID, patchedPromptRequest: PatchedPromptRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/prompts/{prompt_uuid}/" + path = path.replacingOccurrences(of: "{prompt_uuid}", with: promptUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPromptRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Prompt.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsPreviewCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsPreviewCreateError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsPreviewCreateError: : \(object)" + } + } + } + + /// - POST /stages/prompt/prompts/preview/ + /// - Preview a prompt as a challenge, just like a flow would receive + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptRequest: (body) + /// - returns: AnyPublisher + open func stagesPromptPromptsPreviewCreate(promptRequest: PromptRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/prompt/prompts/preview/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(promptRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsPreviewCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsPreviewCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PromptChallenge.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/prompt/prompts/{prompt_uuid}/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptUuid: (path) A UUID string identifying this Prompt. + /// - returns: AnyPublisher + open func stagesPromptPromptsRetrieve(promptUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/prompts/{prompt_uuid}/" + path = path.replacingOccurrences(of: "{prompt_uuid}", with: promptUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Prompt.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/prompt/prompts/{prompt_uuid}/ + /// - Prompt Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptUuid: (path) A UUID string identifying this Prompt. + /// - parameter promptRequest: (body) + /// - returns: AnyPublisher + open func stagesPromptPromptsUpdate(promptUuid: UUID, promptRequest: PromptRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/prompts/{prompt_uuid}/" + path = path.replacingOccurrences(of: "{prompt_uuid}", with: promptUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(promptRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(Prompt.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptPromptsUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptPromptsUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesPromptPromptsUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/prompt/prompts/{prompt_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptUuid: (path) A UUID string identifying this Prompt. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesPromptPromptsUsedByList(promptUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/prompts/{prompt_uuid}/used_by/" + path = path.replacingOccurrences(of: "{prompt_uuid}", with: promptUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptPromptsUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptPromptsUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesCreateError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesCreateError: : \(object)" + } + } + } + + /// - POST /stages/prompt/stages/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter promptStageRequest: (body) + /// - returns: AnyPublisher + open func stagesPromptStagesCreate(promptStageRequest: PromptStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/prompt/stages/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(promptStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PromptStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesDestroyError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/prompt/stages/{stage_uuid}/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. + /// - returns: AnyPublisher + open func stagesPromptStagesDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesListError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesListError: : \(object)" + } + } + } + + /// - GET /stages/prompt/stages/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter fields: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter validationPolicies: (query) (optional) + /// - returns: AnyPublisher + open func stagesPromptStagesList(fields: [UUID]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, validationPolicies: [UUID]? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/prompt/stages/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let fields = fields { queryItems.append(URLQueryItem(name: "fields", value: fields.map { $0.uuidString }.joined(separator: ","))) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let validationPolicies = validationPolicies { queryItems.append(URLQueryItem(name: "validation_policies", value: validationPolicies.map { $0.uuidString }.joined(separator: ","))) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedPromptStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/prompt/stages/{stage_uuid}/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. + /// - parameter patchedPromptStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesPromptStagesPartialUpdate(stageUuid: UUID, patchedPromptStageRequest: PatchedPromptStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedPromptStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PromptStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/prompt/stages/{stage_uuid}/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. + /// - returns: AnyPublisher + open func stagesPromptStagesRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PromptStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesUpdateError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/prompt/stages/{stage_uuid}/ + /// - PromptStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. + /// - parameter promptStageRequest: (body) + /// - returns: AnyPublisher + open func stagesPromptStagesUpdate(stageUuid: UUID, promptStageRequest: PromptStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/stages/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(promptStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PromptStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesPromptStagesUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesPromptStagesUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesPromptStagesUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/prompt/stages/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this Prompt Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesPromptStagesUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/prompt/stages/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesPromptStagesUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesPromptStagesUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteCreateError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteCreateError: : \(object)" + } + } + } + + /// - POST /stages/user_delete/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userDeleteStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserDeleteCreate(userDeleteStageRequest: UserDeleteStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_delete/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userDeleteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserDeleteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteDestroyError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/user_delete/{stage_uuid}/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. + /// - returns: AnyPublisher + open func stagesUserDeleteDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_delete/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteListError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteListError: : \(object)" + } + } + } + + /// - GET /stages/user_delete/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesUserDeleteList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_delete/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserDeleteStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeletePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeletePartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserDeletePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/user_delete/{stage_uuid}/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. + /// - parameter patchedUserDeleteStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesUserDeletePartialUpdate(stageUuid: UUID, patchedUserDeleteStageRequest: PatchedUserDeleteStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_delete/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserDeleteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeletePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeletePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserDeleteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/user_delete/{stage_uuid}/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. + /// - returns: AnyPublisher + open func stagesUserDeleteRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_delete/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserDeleteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/user_delete/{stage_uuid}/ + /// - UserDeleteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. + /// - parameter userDeleteStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserDeleteUpdate(stageUuid: UUID, userDeleteStageRequest: UserDeleteStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_delete/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userDeleteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserDeleteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserDeleteUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserDeleteUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesUserDeleteUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/user_delete/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Delete Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesUserDeleteUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_delete/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserDeleteUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserDeleteUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginCreateError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginCreateError: : \(object)" + } + } + } + + /// - POST /stages/user_login/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userLoginStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserLoginCreate(userLoginStageRequest: UserLoginStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_login/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userLoginStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLoginStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginDestroyError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/user_login/{stage_uuid}/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Login Stage. + /// - returns: AnyPublisher + open func stagesUserLoginDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_login/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginListError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginListError: : \(object)" + } + } + } + + /// - GET /stages/user_login/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter rememberMeOffset: (query) (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter sessionDuration: (query) (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter terminateOtherSessions: (query) (optional) + /// - returns: AnyPublisher + open func stagesUserLoginList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, rememberMeOffset: String? = nil, search: String? = nil, sessionDuration: String? = nil, stageUuid: UUID? = nil, terminateOtherSessions: Bool? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_login/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let rememberMeOffset = rememberMeOffset { queryItems.append(URLQueryItem(name: "remember_me_offset", value: rememberMeOffset)) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let sessionDuration = sessionDuration { queryItems.append(URLQueryItem(name: "session_duration", value: sessionDuration)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let terminateOtherSessions = terminateOtherSessions { queryItems.append(URLQueryItem(name: "terminate_other_sessions", value: terminateOtherSessions ? "true" : "false")) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserLoginStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/user_login/{stage_uuid}/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Login Stage. + /// - parameter patchedUserLoginStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesUserLoginPartialUpdate(stageUuid: UUID, patchedUserLoginStageRequest: PatchedUserLoginStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_login/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserLoginStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLoginStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/user_login/{stage_uuid}/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Login Stage. + /// - returns: AnyPublisher + open func stagesUserLoginRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_login/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLoginStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/user_login/{stage_uuid}/ + /// - UserLoginStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Login Stage. + /// - parameter userLoginStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserLoginUpdate(stageUuid: UUID, userLoginStageRequest: UserLoginStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_login/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userLoginStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLoginStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLoginUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLoginUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesUserLoginUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/user_login/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Login Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesUserLoginUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_login/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLoginUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLoginUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutCreateError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutCreateError: : \(object)" + } + } + } + + /// - POST /stages/user_logout/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userLogoutStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserLogoutCreate(userLogoutStageRequest: UserLogoutStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_logout/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userLogoutStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLogoutStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutDestroyError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/user_logout/{stage_uuid}/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. + /// - returns: AnyPublisher + open func stagesUserLogoutDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_logout/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutListError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutListError: : \(object)" + } + } + } + + /// - GET /stages/user_logout/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - returns: AnyPublisher + open func stagesUserLogoutList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_logout/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserLogoutStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutPartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutPartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutPartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/user_logout/{stage_uuid}/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. + /// - parameter patchedUserLogoutStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesUserLogoutPartialUpdate(stageUuid: UUID, patchedUserLogoutStageRequest: PatchedUserLogoutStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_logout/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserLogoutStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutPartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutPartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLogoutStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/user_logout/{stage_uuid}/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. + /// - returns: AnyPublisher + open func stagesUserLogoutRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_logout/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLogoutStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/user_logout/{stage_uuid}/ + /// - UserLogoutStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. + /// - parameter userLogoutStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserLogoutUpdate(stageUuid: UUID, userLogoutStageRequest: UserLogoutStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_logout/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userLogoutStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserLogoutStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserLogoutUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserLogoutUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesUserLogoutUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/user_logout/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Logout Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesUserLogoutUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_logout/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserLogoutUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserLogoutUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWriteCreateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteCreateError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteCreateError: : \(object)" + } + } + } + + /// - POST /stages/user_write/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter userWriteStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserWriteCreate(userWriteStageRequest: UserWriteStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_write/" + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "POST" + request.httpBody = try self.encoder.encode(userWriteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteCreateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteCreateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserWriteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWriteDestroyError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteDestroyError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteDestroyError: : \(object)" + } + } + } + + /// - DELETE /stages/user_write/{stage_uuid}/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Write Stage. + /// - returns: AnyPublisher + open func stagesUserWriteDestroy(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_write/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "DELETE" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteDestroyError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteDestroyError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + return () + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + /// + /// Enum for parameter userCreationMode + /// + public enum StagesUserWriteListUserCreationMode: String, Codable, CaseIterable { + case alwaysCreate = "always_create" + case createWhenRequired = "create_when_required" + case neverCreate = "never_create" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + /// + /// Enum for parameter userType + /// + public enum StagesUserWriteListUserType: String, Codable, CaseIterable { + case external = "external" + case _internal = "internal" + case internalServiceAccount = "internal_service_account" + case serviceAccount = "service_account" + case unknownDefaultOpenApi = "unknown_default_open_api" + } + public enum StagesUserWriteListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteListError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteListError: : \(object)" + } + } + } + + /// - GET /stages/user_write/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter createUsersAsInactive: (query) (optional) + /// - parameter createUsersGroup: (query) (optional) + /// - parameter name: (query) (optional) + /// - parameter ordering: (query) Which field to use when ordering the results. (optional) + /// - parameter page: (query) A page number within the paginated result set. (optional) + /// - parameter pageSize: (query) Number of results to return per page. (optional) + /// - parameter search: (query) A search term. (optional) + /// - parameter stageUuid: (query) (optional) + /// - parameter userCreationMode: (query) * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create (optional) + /// - parameter userPathTemplate: (query) (optional) + /// - parameter userType: (query) * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) + /// - returns: AnyPublisher + open func stagesUserWriteList(createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, userCreationMode: StagesUserWriteListUserCreationMode? = nil, userPathTemplate: String? = nil, userType: StagesUserWriteListUserType? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + let path = "/stages/user_write/" + let url = baseURL.appendingPathComponent(path) + var components = URLComponents(url: url, resolvingAgainstBaseURL: false) + var queryItems: [URLQueryItem] = [] + if let createUsersAsInactive = createUsersAsInactive { queryItems.append(URLQueryItem(name: "create_users_as_inactive", value: createUsersAsInactive ? "true" : "false")) } + if let createUsersGroup = createUsersGroup { queryItems.append(URLQueryItem(name: "create_users_group", value: createUsersGroup.uuidString)) } + if let name = name { queryItems.append(URLQueryItem(name: "name", value: name)) } + if let ordering = ordering { queryItems.append(URLQueryItem(name: "ordering", value: ordering)) } + if let page = page { queryItems.append(URLQueryItem(name: "page", value: "\(page)")) } + if let pageSize = pageSize { queryItems.append(URLQueryItem(name: "page_size", value: "\(pageSize)")) } + if let search = search { queryItems.append(URLQueryItem(name: "search", value: search)) } + if let stageUuid = stageUuid { queryItems.append(URLQueryItem(name: "stage_uuid", value: stageUuid.uuidString)) } + if let userCreationMode = userCreationMode { queryItems.append(URLQueryItem(name: "user_creation_mode", value: userCreationMode.rawValue)) } + if let userPathTemplate = userPathTemplate { queryItems.append(URLQueryItem(name: "user_path_template", value: userPathTemplate)) } + if let userType = userType { queryItems.append(URLQueryItem(name: "user_type", value: userType.rawValue)) } + components?.queryItems = queryItems + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(PaginatedUserWriteStageList.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWritePartialUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWritePartialUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserWritePartialUpdateError: : \(object)" + } + } + } + + /// - PATCH /stages/user_write/{stage_uuid}/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Write Stage. + /// - parameter patchedUserWriteStageRequest: (body) (optional) + /// - returns: AnyPublisher + open func stagesUserWritePartialUpdate(stageUuid: UUID, patchedUserWriteStageRequest: PatchedUserWriteStageRequest? = nil) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_write/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PATCH" + request.httpBody = try self.encoder.encode(patchedUserWriteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWritePartialUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWritePartialUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserWriteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWriteRetrieveError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteRetrieveError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteRetrieveError: : \(object)" + } + } + } + + /// - GET /stages/user_write/{stage_uuid}/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Write Stage. + /// - returns: AnyPublisher + open func stagesUserWriteRetrieve(stageUuid: UUID) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_write/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteRetrieveError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteRetrieveError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserWriteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWriteUpdateError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteUpdateError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteUpdateError: : \(object)" + } + } + } + + /// - PUT /stages/user_write/{stage_uuid}/ + /// - UserWriteStage Viewset + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Write Stage. + /// - parameter userWriteStageRequest: (body) + /// - returns: AnyPublisher + open func stagesUserWriteUpdate(stageUuid: UUID, userWriteStageRequest: UserWriteStageRequest) -> AnyPublisher { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_write/{stage_uuid}/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "PUT" + request.httpBody = try self.encoder.encode(userWriteStageRequest) + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + return request + }.publisher + }.flatMap { request -> AnyPublisher in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteUpdateError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteUpdateError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode(UserWriteStage.self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } + + public enum StagesUserWriteUsedByListError: Error, CustomStringConvertible { + // + case code400Error(ValidationError) + // + case code403Error(GenericError) + + public var description: String { + switch self { + case .code400Error(let object): + return "StagesUserWriteUsedByListError: : \(object)" + case .code403Error(let object): + return "StagesUserWriteUsedByListError: : \(object)" + } + } + } + + /// - GET /stages/user_write/{stage_uuid}/used_by/ + /// - Get a list of all objects that use this object + /// - API Key: + /// - type: apiKey Authorization + /// - name: authentik + /// - parameter stageUuid: (path) A UUID string identifying this User Write Stage. + /// - returns: AnyPublisher<[UsedBy], Error> + open func stagesUserWriteUsedByList(stageUuid: UUID) -> AnyPublisher<[UsedBy], Error> { + Deferred { + Result { + guard let baseURL = self.transport.baseURL ?? self.baseURL else { + throw OpenAPITransportError.badURLError() + } + var path = "/stages/user_write/{stage_uuid}/used_by/" + path = path.replacingOccurrences(of: "{stage_uuid}", with: stageUuid.uuidString) + let url = baseURL.appendingPathComponent(path) + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + guard let requestURL = components?.url else { + throw OpenAPITransportError.badURLError() + } + var request = URLRequest(url: requestURL) + request.httpMethod = "GET" + return request + }.publisher + }.flatMap { request -> AnyPublisher<[UsedBy], Error> in + return self.transport.send(request: request) + .mapError { transportError -> Error in + if transportError.statusCode == 400 { + do { + let error = try self.decoder.decode(ValidationError.self, from: transportError.data) + return StagesUserWriteUsedByListError.code400Error(error) + } catch { + return error + } + } + if transportError.statusCode == 403 { + do { + let error = try self.decoder.decode(GenericError.self, from: transportError.data) + return StagesUserWriteUsedByListError.code403Error(error) + } catch { + return error + } + } + return transportError + } + .tryMap { response in + try self.decoder.decode([UsedBy].self, from: response.data) + } + .eraseToAnyPublisher() + }.eraseToAnyPublisher() + } +} diff --git a/authentikClient/Sources/Models/AccessDeniedChallenge.swift b/authentikClient/Sources/Models/AccessDeniedChallenge.swift new file mode 100644 index 0000000..c7f1275 --- /dev/null +++ b/authentikClient/Sources/Models/AccessDeniedChallenge.swift @@ -0,0 +1,61 @@ +// +// AccessDeniedChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge when a flow's active stage calls `stage_invalid()`. +public struct AccessDeniedChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-access-denied" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var errorMessage: String? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-access-denied", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, errorMessage: String? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.errorMessage = errorMessage + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case errorMessage = "error_message" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encodeIfPresent(errorMessage, forKey: .errorMessage) + } +} diff --git a/authentikClient/Sources/Models/App.swift b/authentikClient/Sources/Models/App.swift new file mode 100644 index 0000000..43e3b8f --- /dev/null +++ b/authentikClient/Sources/Models/App.swift @@ -0,0 +1,19 @@ +// +// App.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serialize Application info +public struct App: Codable { + public var name: String + public var label: String + + public init(name: String, label: String) { + self.name = name + self.label = label + } +} diff --git a/authentikClient/Sources/Models/AppEnum.swift b/authentikClient/Sources/Models/AppEnum.swift new file mode 100644 index 0000000..4c8a48e --- /dev/null +++ b/authentikClient/Sources/Models/AppEnum.swift @@ -0,0 +1,63 @@ +// +// AppEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_mobile` - authentik Stages.Authenticator.Mobile * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise +public enum AppEnum: String, Codable, CaseIterable { + case admin = "authentik.admin" + case api = "authentik.api" + case crypto = "authentik.crypto" + case events = "authentik.events" + case flows = "authentik.flows" + case outposts = "authentik.outposts" + case policiesDummy = "authentik.policies.dummy" + case policiesEventMatcher = "authentik.policies.event_matcher" + case policiesExpiry = "authentik.policies.expiry" + case policiesExpression = "authentik.policies.expression" + case policiesPassword = "authentik.policies.password" + case policiesReputation = "authentik.policies.reputation" + case policies = "authentik.policies" + case providersLdap = "authentik.providers.ldap" + case providersOauth2 = "authentik.providers.oauth2" + case providersProxy = "authentik.providers.proxy" + case providersRadius = "authentik.providers.radius" + case providersSaml = "authentik.providers.saml" + case providersScim = "authentik.providers.scim" + case rbac = "authentik.rbac" + case recovery = "authentik.recovery" + case sourcesLdap = "authentik.sources.ldap" + case sourcesOauth = "authentik.sources.oauth" + case sourcesPlex = "authentik.sources.plex" + case sourcesSaml = "authentik.sources.saml" + case stagesAuthenticator = "authentik.stages.authenticator" + case stagesAuthenticatorDuo = "authentik.stages.authenticator_duo" + case stagesAuthenticatorMobile = "authentik.stages.authenticator_mobile" + case stagesAuthenticatorSms = "authentik.stages.authenticator_sms" + case stagesAuthenticatorStatic = "authentik.stages.authenticator_static" + case stagesAuthenticatorTotp = "authentik.stages.authenticator_totp" + case stagesAuthenticatorValidate = "authentik.stages.authenticator_validate" + case stagesAuthenticatorWebauthn = "authentik.stages.authenticator_webauthn" + case stagesCaptcha = "authentik.stages.captcha" + case stagesConsent = "authentik.stages.consent" + case stagesDeny = "authentik.stages.deny" + case stagesDummy = "authentik.stages.dummy" + case stagesEmail = "authentik.stages.email" + case stagesIdentification = "authentik.stages.identification" + case stagesInvitation = "authentik.stages.invitation" + case stagesPassword = "authentik.stages.password" + case stagesPrompt = "authentik.stages.prompt" + case stagesUserDelete = "authentik.stages.user_delete" + case stagesUserLogin = "authentik.stages.user_login" + case stagesUserLogout = "authentik.stages.user_logout" + case stagesUserWrite = "authentik.stages.user_write" + case tenants = "authentik.tenants" + case blueprints = "authentik.blueprints" + case core = "authentik.core" + case enterprise = "authentik.enterprise" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/AppleChallengeResponseRequest.swift b/authentikClient/Sources/Models/AppleChallengeResponseRequest.swift new file mode 100644 index 0000000..9949db6 --- /dev/null +++ b/authentikClient/Sources/Models/AppleChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// AppleChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for plex response +public struct AppleChallengeResponseRequest: Codable { + public var component: String? = "ak-source-oauth-apple" + + public init(component: String? = "ak-source-oauth-apple") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/AppleLoginChallenge.swift b/authentikClient/Sources/Models/AppleLoginChallenge.swift new file mode 100644 index 0000000..e76cd54 --- /dev/null +++ b/authentikClient/Sources/Models/AppleLoginChallenge.swift @@ -0,0 +1,66 @@ +// +// AppleLoginChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Special challenge for apple-native authentication flow, which happens on the client. +public struct AppleLoginChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-source-oauth-apple" + public var responseErrors: [String: [ErrorDetail]]? + public var clientId: String + public var scope: String + public var redirectUri: String + public var state: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-source-oauth-apple", responseErrors: [String: [ErrorDetail]]? = nil, clientId: String, scope: String, redirectUri: String, state: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.clientId = clientId + self.scope = scope + self.redirectUri = redirectUri + self.state = state + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case clientId = "client_id" + case scope + case redirectUri = "redirect_uri" + case state + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + clientId = try container.decode(String.self, forKey: .clientId) + scope = try container.decode(String.self, forKey: .scope) + redirectUri = try container.decode(String.self, forKey: .redirectUri) + state = try container.decode(String.self, forKey: .state) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(clientId, forKey: .clientId) + try container.encode(scope, forKey: .scope) + try container.encode(redirectUri, forKey: .redirectUri) + try container.encode(state, forKey: .state) + } +} diff --git a/authentikClient/Sources/Models/Application.swift b/authentikClient/Sources/Models/Application.swift new file mode 100644 index 0000000..2c9bdda --- /dev/null +++ b/authentikClient/Sources/Models/Application.swift @@ -0,0 +1,106 @@ +// +// Application.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Application Serializer +public struct Application: Codable { + public var pk: UUID + /// Application's display Name. + public var name: String + /// Internal application name, used in URLs. + public var slug: String + public var provider: Int? + public var providerObj: Provider + public var backchannelProviders: [Int]? + public var backchannelProvidersObj: [Provider] + /// Allow formatting of launch URL + public var launchUrl: String? + /// Open launch URL in a new browser tab or window. + public var openInNewTab: Bool? + public var metaLaunchUrl: String? + /// Get the URL to the App Icon image. If the name is /static or starts with http it is returned as-is + public var metaIcon: String? + public var metaDescription: String? + public var metaPublisher: String? + public var policyEngineMode: PolicyEngineMode? + public var group: String? + + public init(pk: UUID, name: String, slug: String, provider: Int? = nil, providerObj: Provider, backchannelProviders: [Int]? = nil, backchannelProvidersObj: [Provider], launchUrl: String?, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaIcon: String?, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { + self.pk = pk + self.name = name + self.slug = slug + self.provider = provider + self.providerObj = providerObj + self.backchannelProviders = backchannelProviders + self.backchannelProvidersObj = backchannelProvidersObj + self.launchUrl = launchUrl + self.openInNewTab = openInNewTab + self.metaLaunchUrl = metaLaunchUrl + self.metaIcon = metaIcon + self.metaDescription = metaDescription + self.metaPublisher = metaPublisher + self.policyEngineMode = policyEngineMode + self.group = group + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case provider + case providerObj = "provider_obj" + case backchannelProviders = "backchannel_providers" + case backchannelProvidersObj = "backchannel_providers_obj" + case launchUrl = "launch_url" + case openInNewTab = "open_in_new_tab" + case metaLaunchUrl = "meta_launch_url" + case metaIcon = "meta_icon" + case metaDescription = "meta_description" + case metaPublisher = "meta_publisher" + case policyEngineMode = "policy_engine_mode" + case group + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + provider = try container.decodeIfPresent(Int.self, forKey: .provider) + providerObj = try container.decode(Provider.self, forKey: .providerObj) + backchannelProviders = try container.decodeIfPresent([Int].self, forKey: .backchannelProviders) + backchannelProvidersObj = try container.decode([Provider].self, forKey: .backchannelProvidersObj) + launchUrl = try container.decode(String.self, forKey: .launchUrl) + openInNewTab = try container.decodeIfPresent(Bool.self, forKey: .openInNewTab) + metaLaunchUrl = try container.decodeIfPresent(String.self, forKey: .metaLaunchUrl) + metaIcon = try container.decode(String.self, forKey: .metaIcon) + metaDescription = try container.decodeIfPresent(String.self, forKey: .metaDescription) + metaPublisher = try container.decodeIfPresent(String.self, forKey: .metaPublisher) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + group = try container.decodeIfPresent(String.self, forKey: .group) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(provider, forKey: .provider) + try container.encode(providerObj, forKey: .providerObj) + try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) + try container.encode(backchannelProvidersObj, forKey: .backchannelProvidersObj) + try container.encode(launchUrl, forKey: .launchUrl) + try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) + try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) + try container.encode(metaIcon, forKey: .metaIcon) + try container.encodeIfPresent(metaDescription, forKey: .metaDescription) + try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(group, forKey: .group) + } +} diff --git a/authentikClient/Sources/Models/ApplicationRequest.swift b/authentikClient/Sources/Models/ApplicationRequest.swift new file mode 100644 index 0000000..581dc94 --- /dev/null +++ b/authentikClient/Sources/Models/ApplicationRequest.swift @@ -0,0 +1,79 @@ +// +// ApplicationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Application Serializer +public struct ApplicationRequest: Codable { + /// Application's display Name. + public var name: String + /// Internal application name, used in URLs. + public var slug: String + public var provider: Int? + public var backchannelProviders: [Int]? + /// Open launch URL in a new browser tab or window. + public var openInNewTab: Bool? + public var metaLaunchUrl: String? + public var metaDescription: String? + public var metaPublisher: String? + public var policyEngineMode: PolicyEngineMode? + public var group: String? + + public init(name: String, slug: String, provider: Int? = nil, backchannelProviders: [Int]? = nil, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { + self.name = name + self.slug = slug + self.provider = provider + self.backchannelProviders = backchannelProviders + self.openInNewTab = openInNewTab + self.metaLaunchUrl = metaLaunchUrl + self.metaDescription = metaDescription + self.metaPublisher = metaPublisher + self.policyEngineMode = policyEngineMode + self.group = group + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case provider + case backchannelProviders = "backchannel_providers" + case openInNewTab = "open_in_new_tab" + case metaLaunchUrl = "meta_launch_url" + case metaDescription = "meta_description" + case metaPublisher = "meta_publisher" + case policyEngineMode = "policy_engine_mode" + case group + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + provider = try container.decodeIfPresent(Int.self, forKey: .provider) + backchannelProviders = try container.decodeIfPresent([Int].self, forKey: .backchannelProviders) + openInNewTab = try container.decodeIfPresent(Bool.self, forKey: .openInNewTab) + metaLaunchUrl = try container.decodeIfPresent(String.self, forKey: .metaLaunchUrl) + metaDescription = try container.decodeIfPresent(String.self, forKey: .metaDescription) + metaPublisher = try container.decodeIfPresent(String.self, forKey: .metaPublisher) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + group = try container.decodeIfPresent(String.self, forKey: .group) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(provider, forKey: .provider) + try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) + try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) + try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) + try container.encodeIfPresent(metaDescription, forKey: .metaDescription) + try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(group, forKey: .group) + } +} diff --git a/authentikClient/Sources/Models/AuthTypeEnum.swift b/authentikClient/Sources/Models/AuthTypeEnum.swift new file mode 100644 index 0000000..a6e5072 --- /dev/null +++ b/authentikClient/Sources/Models/AuthTypeEnum.swift @@ -0,0 +1,15 @@ +// +// AuthTypeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `basic` - Basic * `bearer` - Bearer +public enum AuthTypeEnum: String, Codable, CaseIterable { + case basic = "basic" + case bearer = "bearer" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/AuthenticateWebAuthnStage.swift b/authentikClient/Sources/Models/AuthenticateWebAuthnStage.swift new file mode 100644 index 0000000..6555c9a --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticateWebAuthnStage.swift @@ -0,0 +1,91 @@ +// +// AuthenticateWebAuthnStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticateWebAuthnStage Serializer +public struct AuthenticateWebAuthnStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var userVerification: UserVerificationEnum? + public var authenticatorAttachment: AuthenticatorAttachmentEnum? + public var residentKeyRequirement: ResidentKeyRequirementEnum? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.userVerification = userVerification + self.authenticatorAttachment = authenticatorAttachment + self.residentKeyRequirement = residentKeyRequirement + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case userVerification = "user_verification" + case authenticatorAttachment = "authenticator_attachment" + case residentKeyRequirement = "resident_key_requirement" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + userVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .userVerification) + authenticatorAttachment = try container.decodeIfPresent(AuthenticatorAttachmentEnum.self, forKey: .authenticatorAttachment) + residentKeyRequirement = try container.decodeIfPresent(ResidentKeyRequirementEnum.self, forKey: .residentKeyRequirement) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(userVerification, forKey: .userVerification) + try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) + try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) + } +} diff --git a/authentikClient/Sources/Models/AuthenticateWebAuthnStageRequest.swift b/authentikClient/Sources/Models/AuthenticateWebAuthnStageRequest.swift new file mode 100644 index 0000000..e23874c --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticateWebAuthnStageRequest.swift @@ -0,0 +1,62 @@ +// +// AuthenticateWebAuthnStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticateWebAuthnStage Serializer +public struct AuthenticateWebAuthnStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var userVerification: UserVerificationEnum? + public var authenticatorAttachment: AuthenticatorAttachmentEnum? + public var residentKeyRequirement: ResidentKeyRequirementEnum? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.userVerification = userVerification + self.authenticatorAttachment = authenticatorAttachment + self.residentKeyRequirement = residentKeyRequirement + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case userVerification = "user_verification" + case authenticatorAttachment = "authenticator_attachment" + case residentKeyRequirement = "resident_key_requirement" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + userVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .userVerification) + authenticatorAttachment = try container.decodeIfPresent(AuthenticatorAttachmentEnum.self, forKey: .authenticatorAttachment) + residentKeyRequirement = try container.decodeIfPresent(ResidentKeyRequirementEnum.self, forKey: .residentKeyRequirement) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(userVerification, forKey: .userVerification) + try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) + try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSession.swift b/authentikClient/Sources/Models/AuthenticatedSession.swift new file mode 100644 index 0000000..c541e6d --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSession.swift @@ -0,0 +1,72 @@ +// +// AuthenticatedSession.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatedSession Serializer +public struct AuthenticatedSession: Codable { + public var uuid: UUID? + /// Check if session is currently active session + public var current: Bool + public var userAgent: AuthenticatedSessionUserAgent + public var geoIp: AuthenticatedSessionGeoIp? + public var user: Int + public var lastIp: String + public var lastUserAgent: String? + public var lastUsed: Date + public var expires: Date? + + public init(uuid: UUID? = nil, current: Bool, userAgent: AuthenticatedSessionUserAgent, geoIp: AuthenticatedSessionGeoIp?, user: Int, lastIp: String, lastUserAgent: String? = nil, lastUsed: Date, expires: Date? = nil) { + self.uuid = uuid + self.current = current + self.userAgent = userAgent + self.geoIp = geoIp + self.user = user + self.lastIp = lastIp + self.lastUserAgent = lastUserAgent + self.lastUsed = lastUsed + self.expires = expires + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case uuid + case current + case userAgent = "user_agent" + case geoIp = "geo_ip" + case user + case lastIp = "last_ip" + case lastUserAgent = "last_user_agent" + case lastUsed = "last_used" + case expires + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + uuid = try container.decodeIfPresent(UUID.self, forKey: .uuid) + current = try container.decode(Bool.self, forKey: .current) + userAgent = try container.decode(AuthenticatedSessionUserAgent.self, forKey: .userAgent) + geoIp = try container.decode(AuthenticatedSessionGeoIp.self, forKey: .geoIp) + user = try container.decode(Int.self, forKey: .user) + lastIp = try container.decode(String.self, forKey: .lastIp) + lastUserAgent = try container.decodeIfPresent(String.self, forKey: .lastUserAgent) + lastUsed = try container.decode(Date.self, forKey: .lastUsed) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(uuid, forKey: .uuid) + try container.encode(current, forKey: .current) + try container.encode(userAgent, forKey: .userAgent) + try container.encode(geoIp, forKey: .geoIp) + try container.encode(user, forKey: .user) + try container.encode(lastIp, forKey: .lastIp) + try container.encodeIfPresent(lastUserAgent, forKey: .lastUserAgent) + try container.encode(lastUsed, forKey: .lastUsed) + try container.encodeIfPresent(expires, forKey: .expires) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSessionGeoIp.swift b/authentikClient/Sources/Models/AuthenticatedSessionGeoIp.swift new file mode 100644 index 0000000..3b718ec --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSessionGeoIp.swift @@ -0,0 +1,25 @@ +// +// AuthenticatedSessionGeoIp.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get parsed user agent +public struct AuthenticatedSessionGeoIp: Codable { + public var continent: String + public var country: String + public var lat: Double + public var long: Double + public var city: String + + public init(continent: String, country: String, lat: Double, long: Double, city: String) { + self.continent = continent + self.country = country + self.lat = lat + self.long = long + self.city = city + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSessionUserAgent.swift b/authentikClient/Sources/Models/AuthenticatedSessionUserAgent.swift new file mode 100644 index 0000000..0d53b63 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSessionUserAgent.swift @@ -0,0 +1,46 @@ +// +// AuthenticatedSessionUserAgent.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get parsed user agent +public struct AuthenticatedSessionUserAgent: Codable { + public var device: AuthenticatedSessionUserAgentDevice + public var os: AuthenticatedSessionUserAgentOs + public var userAgent: AuthenticatedSessionUserAgentUserAgent + public var string: String + + public init(device: AuthenticatedSessionUserAgentDevice, os: AuthenticatedSessionUserAgentOs, userAgent: AuthenticatedSessionUserAgentUserAgent, string: String) { + self.device = device + self.os = os + self.userAgent = userAgent + self.string = string + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case device + case os + case userAgent = "user_agent" + case string + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + device = try container.decode(AuthenticatedSessionUserAgentDevice.self, forKey: .device) + os = try container.decode(AuthenticatedSessionUserAgentOs.self, forKey: .os) + userAgent = try container.decode(AuthenticatedSessionUserAgentUserAgent.self, forKey: .userAgent) + string = try container.decode(String.self, forKey: .string) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(device, forKey: .device) + try container.encode(os, forKey: .os) + try container.encode(userAgent, forKey: .userAgent) + try container.encode(string, forKey: .string) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSessionUserAgentDevice.swift b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentDevice.swift new file mode 100644 index 0000000..21a3f92 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentDevice.swift @@ -0,0 +1,21 @@ +// +// AuthenticatedSessionUserAgentDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User agent device +public struct AuthenticatedSessionUserAgentDevice: Codable { + public var brand: String + public var family: String + public var model: String + + public init(brand: String, family: String, model: String) { + self.brand = brand + self.family = family + self.model = model + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSessionUserAgentOs.swift b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentOs.swift new file mode 100644 index 0000000..18a297f --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentOs.swift @@ -0,0 +1,51 @@ +// +// AuthenticatedSessionUserAgentOs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User agent os +public struct AuthenticatedSessionUserAgentOs: Codable { + public var family: String + public var major: String + public var minor: String + public var patch: String + public var patchMinor: String + + public init(family: String, major: String, minor: String, patch: String, patchMinor: String) { + self.family = family + self.major = major + self.minor = minor + self.patch = patch + self.patchMinor = patchMinor + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case family + case major + case minor + case patch + case patchMinor = "patch_minor" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + family = try container.decode(String.self, forKey: .family) + major = try container.decode(String.self, forKey: .major) + minor = try container.decode(String.self, forKey: .minor) + patch = try container.decode(String.self, forKey: .patch) + patchMinor = try container.decode(String.self, forKey: .patchMinor) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(family, forKey: .family) + try container.encode(major, forKey: .major) + try container.encode(minor, forKey: .minor) + try container.encode(patch, forKey: .patch) + try container.encode(patchMinor, forKey: .patchMinor) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatedSessionUserAgentUserAgent.swift b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentUserAgent.swift new file mode 100644 index 0000000..d1307c4 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatedSessionUserAgentUserAgent.swift @@ -0,0 +1,23 @@ +// +// AuthenticatedSessionUserAgentUserAgent.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User agent browser +public struct AuthenticatedSessionUserAgentUserAgent: Codable { + public var family: String + public var major: String + public var minor: String + public var patch: String + + public init(family: String, major: String, minor: String, patch: String) { + self.family = family + self.major = major + self.minor = minor + self.patch = patch + } +} diff --git a/authentikClient/Sources/Models/AuthenticationEnum.swift b/authentikClient/Sources/Models/AuthenticationEnum.swift new file mode 100644 index 0000000..0e14edb --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticationEnum.swift @@ -0,0 +1,17 @@ +// +// AuthenticationEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser +public enum AuthenticationEnum: String, Codable, CaseIterable { + case _none = "none" + case requireAuthenticated = "require_authenticated" + case requireUnauthenticated = "require_unauthenticated" + case requireSuperuser = "require_superuser" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/AuthenticatorAttachmentEnum.swift b/authentikClient/Sources/Models/AuthenticatorAttachmentEnum.swift new file mode 100644 index 0000000..182a07e --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorAttachmentEnum.swift @@ -0,0 +1,15 @@ +// +// AuthenticatorAttachmentEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `platform` - Platform * `cross-platform` - Cross Platform +public enum AuthenticatorAttachmentEnum: String, Codable, CaseIterable { + case platform = "platform" + case crossPlatform = "cross-platform" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoChallenge.swift b/authentikClient/Sources/Models/AuthenticatorDuoChallenge.swift new file mode 100644 index 0000000..3bfa763 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoChallenge.swift @@ -0,0 +1,71 @@ +// +// AuthenticatorDuoChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Duo Challenge +public struct AuthenticatorDuoChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-duo" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var activationBarcode: String + public var activationCode: String + public var stageUuid: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-duo", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, activationBarcode: String, activationCode: String, stageUuid: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.activationBarcode = activationBarcode + self.activationCode = activationCode + self.stageUuid = stageUuid + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case activationBarcode = "activation_barcode" + case activationCode = "activation_code" + case stageUuid = "stage_uuid" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + activationBarcode = try container.decode(String.self, forKey: .activationBarcode) + activationCode = try container.decode(String.self, forKey: .activationCode) + stageUuid = try container.decode(String.self, forKey: .stageUuid) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(activationBarcode, forKey: .activationBarcode) + try container.encode(activationCode, forKey: .activationCode) + try container.encode(stageUuid, forKey: .stageUuid) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorDuoChallengeResponseRequest.swift new file mode 100644 index 0000000..8a2ab4b --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// AuthenticatorDuoChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for duo response +public struct AuthenticatorDuoChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-duo" + + public init(component: String? = "ak-stage-authenticator-duo") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoStage.swift b/authentikClient/Sources/Models/AuthenticatorDuoStage.swift new file mode 100644 index 0000000..a799898 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoStage.swift @@ -0,0 +1,91 @@ +// +// AuthenticatorDuoStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorDuoStage Serializer +public struct AuthenticatorDuoStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var clientId: String + public var apiHostname: String + public var adminIntegrationKey: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String, apiHostname: String, adminIntegrationKey: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.clientId = clientId + self.apiHostname = apiHostname + self.adminIntegrationKey = adminIntegrationKey + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case clientId = "client_id" + case apiHostname = "api_hostname" + case adminIntegrationKey = "admin_integration_key" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + clientId = try container.decode(String.self, forKey: .clientId) + apiHostname = try container.decode(String.self, forKey: .apiHostname) + adminIntegrationKey = try container.decodeIfPresent(String.self, forKey: .adminIntegrationKey) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(clientId, forKey: .clientId) + try container.encode(apiHostname, forKey: .apiHostname) + try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoStageDeviceImportResponse.swift b/authentikClient/Sources/Models/AuthenticatorDuoStageDeviceImportResponse.swift new file mode 100644 index 0000000..b69b25c --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoStageDeviceImportResponse.swift @@ -0,0 +1,18 @@ +// +// AuthenticatorDuoStageDeviceImportResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AuthenticatorDuoStageDeviceImportResponse: Codable { + public var count: Int + public var error: String + + public init(count: Int, error: String) { + self.count = count + self.error = error + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift b/authentikClient/Sources/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift new file mode 100644 index 0000000..5fa6166 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoStageManualDeviceImportRequest.swift @@ -0,0 +1,35 @@ +// +// AuthenticatorDuoStageManualDeviceImportRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AuthenticatorDuoStageManualDeviceImportRequest: Codable { + public var duoUserId: String + public var username: String + + public init(duoUserId: String, username: String) { + self.duoUserId = duoUserId + self.username = username + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case duoUserId = "duo_user_id" + case username + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + duoUserId = try container.decode(String.self, forKey: .duoUserId) + username = try container.decode(String.self, forKey: .username) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(duoUserId, forKey: .duoUserId) + try container.encode(username, forKey: .username) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorDuoStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorDuoStageRequest.swift new file mode 100644 index 0000000..2a5ae81 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorDuoStageRequest.swift @@ -0,0 +1,72 @@ +// +// AuthenticatorDuoStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorDuoStage Serializer +public struct AuthenticatorDuoStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var clientId: String + public var clientSecret: String + public var apiHostname: String + public var adminIntegrationKey: String? + public var adminSecretKey: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String, clientSecret: String, apiHostname: String, adminIntegrationKey: String? = nil, adminSecretKey: String? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.clientId = clientId + self.clientSecret = clientSecret + self.apiHostname = apiHostname + self.adminIntegrationKey = adminIntegrationKey + self.adminSecretKey = adminSecretKey + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case clientId = "client_id" + case clientSecret = "client_secret" + case apiHostname = "api_hostname" + case adminIntegrationKey = "admin_integration_key" + case adminSecretKey = "admin_secret_key" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + clientId = try container.decode(String.self, forKey: .clientId) + clientSecret = try container.decode(String.self, forKey: .clientSecret) + apiHostname = try container.decode(String.self, forKey: .apiHostname) + adminIntegrationKey = try container.decodeIfPresent(String.self, forKey: .adminIntegrationKey) + adminSecretKey = try container.decodeIfPresent(String.self, forKey: .adminSecretKey) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(clientId, forKey: .clientId) + try container.encode(clientSecret, forKey: .clientSecret) + try container.encode(apiHostname, forKey: .apiHostname) + try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) + try container.encodeIfPresent(adminSecretKey, forKey: .adminSecretKey) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorMobileChallenge.swift b/authentikClient/Sources/Models/AuthenticatorMobileChallenge.swift new file mode 100644 index 0000000..13f5893 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorMobileChallenge.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorMobileChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Mobile Challenge +public struct AuthenticatorMobileChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-mobile" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var payload: AuthenticatorMobilePayloadChallenge + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-mobile", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, payload: AuthenticatorMobilePayloadChallenge) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.payload = payload + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case payload + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + payload = try container.decode(AuthenticatorMobilePayloadChallenge.self, forKey: .payload) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(payload, forKey: .payload) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorMobileChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorMobileChallengeResponseRequest.swift new file mode 100644 index 0000000..23f90cd --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorMobileChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// AuthenticatorMobileChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for mobile response +public struct AuthenticatorMobileChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-mobile" + + public init(component: String? = "ak-stage-authenticator-mobile") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorMobilePayloadChallenge.swift b/authentikClient/Sources/Models/AuthenticatorMobilePayloadChallenge.swift new file mode 100644 index 0000000..7d357af --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorMobilePayloadChallenge.swift @@ -0,0 +1,24 @@ +// +// AuthenticatorMobilePayloadChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Payload within the QR code given to the mobile app, hence the short variable names +public struct AuthenticatorMobilePayloadChallenge: Codable { + /// Server URL + public var u: String? + /// Stage UUID + public var s: String? + /// Initial Token + public var t: String? + + public init(u: String? = nil, s: String? = nil, t: String? = nil) { + self.u = u + self.s = s + self.t = t + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorMobileStage.swift b/authentikClient/Sources/Models/AuthenticatorMobileStage.swift new file mode 100644 index 0000000..9261ba7 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorMobileStage.swift @@ -0,0 +1,86 @@ +// +// AuthenticatorMobileStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorMobileStage Serializer +public struct AuthenticatorMobileStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var itemMatchingMode: ItemMatchingModeEnum? + public var cgwEndpoint: String + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, itemMatchingMode: ItemMatchingModeEnum? = nil, cgwEndpoint: String) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.itemMatchingMode = itemMatchingMode + self.cgwEndpoint = cgwEndpoint + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case itemMatchingMode = "item_matching_mode" + case cgwEndpoint = "cgw_endpoint" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + itemMatchingMode = try container.decodeIfPresent(ItemMatchingModeEnum.self, forKey: .itemMatchingMode) + cgwEndpoint = try container.decode(String.self, forKey: .cgwEndpoint) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(itemMatchingMode, forKey: .itemMatchingMode) + try container.encode(cgwEndpoint, forKey: .cgwEndpoint) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorMobileStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorMobileStageRequest.swift new file mode 100644 index 0000000..5fc137d --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorMobileStageRequest.swift @@ -0,0 +1,57 @@ +// +// AuthenticatorMobileStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorMobileStage Serializer +public struct AuthenticatorMobileStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var itemMatchingMode: ItemMatchingModeEnum? + public var cgwEndpoint: String + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, itemMatchingMode: ItemMatchingModeEnum? = nil, cgwEndpoint: String) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.itemMatchingMode = itemMatchingMode + self.cgwEndpoint = cgwEndpoint + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case itemMatchingMode = "item_matching_mode" + case cgwEndpoint = "cgw_endpoint" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + itemMatchingMode = try container.decodeIfPresent(ItemMatchingModeEnum.self, forKey: .itemMatchingMode) + cgwEndpoint = try container.decode(String.self, forKey: .cgwEndpoint) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(itemMatchingMode, forKey: .itemMatchingMode) + try container.encode(cgwEndpoint, forKey: .cgwEndpoint) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorSMSChallenge.swift b/authentikClient/Sources/Models/AuthenticatorSMSChallenge.swift new file mode 100644 index 0000000..22a77ba --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorSMSChallenge.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorSMSChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SMS Setup challenge +public struct AuthenticatorSMSChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-sms" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var phoneNumberRequired: Bool? = true + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-sms", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, phoneNumberRequired: Bool? = true) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.phoneNumberRequired = phoneNumberRequired + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case phoneNumberRequired = "phone_number_required" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + phoneNumberRequired = try container.decodeIfPresent(Bool.self, forKey: .phoneNumberRequired) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encodeIfPresent(phoneNumberRequired, forKey: .phoneNumberRequired) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorSMSChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorSMSChallengeResponseRequest.swift new file mode 100644 index 0000000..9d9a2ce --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorSMSChallengeResponseRequest.swift @@ -0,0 +1,41 @@ +// +// AuthenticatorSMSChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SMS Challenge response, device is set by get_response_instance +public struct AuthenticatorSMSChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-sms" + public var code: Int? + public var phoneNumber: String? + + public init(component: String? = "ak-stage-authenticator-sms", code: Int? = nil, phoneNumber: String? = nil) { + self.component = component + self.code = code + self.phoneNumber = phoneNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case component + case code + case phoneNumber = "phone_number" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + component = try container.decodeIfPresent(String.self, forKey: .component) + code = try container.decodeIfPresent(Int.self, forKey: .code) + phoneNumber = try container.decodeIfPresent(String.self, forKey: .phoneNumber) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(code, forKey: .code) + try container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorSMSStage.swift b/authentikClient/Sources/Models/AuthenticatorSMSStage.swift new file mode 100644 index 0000000..2bb0d1e --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorSMSStage.swift @@ -0,0 +1,118 @@ +// +// AuthenticatorSMSStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorSMSStage Serializer +public struct AuthenticatorSMSStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var provider: ProviderEnum + public var fromNumber: String + public var accountSid: String + public var auth: String + public var authPassword: String? + public var authType: AuthTypeEnum? + /// When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. + public var verifyOnly: Bool? + /// Optionally modify the payload being sent to custom providers. + public var mapping: UUID? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum, fromNumber: String, accountSid: String, auth: String, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.provider = provider + self.fromNumber = fromNumber + self.accountSid = accountSid + self.auth = auth + self.authPassword = authPassword + self.authType = authType + self.verifyOnly = verifyOnly + self.mapping = mapping + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case provider + case fromNumber = "from_number" + case accountSid = "account_sid" + case auth + case authPassword = "auth_password" + case authType = "auth_type" + case verifyOnly = "verify_only" + case mapping + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + provider = try container.decode(ProviderEnum.self, forKey: .provider) + fromNumber = try container.decode(String.self, forKey: .fromNumber) + accountSid = try container.decode(String.self, forKey: .accountSid) + auth = try container.decode(String.self, forKey: .auth) + authPassword = try container.decodeIfPresent(String.self, forKey: .authPassword) + authType = try container.decodeIfPresent(AuthTypeEnum.self, forKey: .authType) + verifyOnly = try container.decodeIfPresent(Bool.self, forKey: .verifyOnly) + mapping = try container.decodeIfPresent(UUID.self, forKey: .mapping) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(provider, forKey: .provider) + try container.encode(fromNumber, forKey: .fromNumber) + try container.encode(accountSid, forKey: .accountSid) + try container.encode(auth, forKey: .auth) + try container.encodeIfPresent(authPassword, forKey: .authPassword) + try container.encodeIfPresent(authType, forKey: .authType) + try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) + try container.encodeIfPresent(mapping, forKey: .mapping) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorSMSStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorSMSStageRequest.swift new file mode 100644 index 0000000..3b116fe --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorSMSStageRequest.swift @@ -0,0 +1,89 @@ +// +// AuthenticatorSMSStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorSMSStage Serializer +public struct AuthenticatorSMSStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var provider: ProviderEnum + public var fromNumber: String + public var accountSid: String + public var auth: String + public var authPassword: String? + public var authType: AuthTypeEnum? + /// When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. + public var verifyOnly: Bool? + /// Optionally modify the payload being sent to custom providers. + public var mapping: UUID? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum, fromNumber: String, accountSid: String, auth: String, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.provider = provider + self.fromNumber = fromNumber + self.accountSid = accountSid + self.auth = auth + self.authPassword = authPassword + self.authType = authType + self.verifyOnly = verifyOnly + self.mapping = mapping + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case provider + case fromNumber = "from_number" + case accountSid = "account_sid" + case auth + case authPassword = "auth_password" + case authType = "auth_type" + case verifyOnly = "verify_only" + case mapping + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + provider = try container.decode(ProviderEnum.self, forKey: .provider) + fromNumber = try container.decode(String.self, forKey: .fromNumber) + accountSid = try container.decode(String.self, forKey: .accountSid) + auth = try container.decode(String.self, forKey: .auth) + authPassword = try container.decodeIfPresent(String.self, forKey: .authPassword) + authType = try container.decodeIfPresent(AuthTypeEnum.self, forKey: .authType) + verifyOnly = try container.decodeIfPresent(Bool.self, forKey: .verifyOnly) + mapping = try container.decodeIfPresent(UUID.self, forKey: .mapping) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(provider, forKey: .provider) + try container.encode(fromNumber, forKey: .fromNumber) + try container.encode(accountSid, forKey: .accountSid) + try container.encode(auth, forKey: .auth) + try container.encodeIfPresent(authPassword, forKey: .authPassword) + try container.encodeIfPresent(authType, forKey: .authType) + try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) + try container.encodeIfPresent(mapping, forKey: .mapping) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorStaticChallenge.swift b/authentikClient/Sources/Models/AuthenticatorStaticChallenge.swift new file mode 100644 index 0000000..2f9c7f4 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorStaticChallenge.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorStaticChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Static authenticator challenge +public struct AuthenticatorStaticChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-static" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var codes: [String] + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-static", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, codes: [String]) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.codes = codes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case codes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + codes = try container.decode([String].self, forKey: .codes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(codes, forKey: .codes) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorStaticChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorStaticChallengeResponseRequest.swift new file mode 100644 index 0000000..de7240d --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorStaticChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// AuthenticatorStaticChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for static response +public struct AuthenticatorStaticChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-static" + + public init(component: String? = "ak-stage-authenticator-static") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorStaticStage.swift b/authentikClient/Sources/Models/AuthenticatorStaticStage.swift new file mode 100644 index 0000000..9e58eed --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorStaticStage.swift @@ -0,0 +1,86 @@ +// +// AuthenticatorStaticStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorStaticStage Serializer +public struct AuthenticatorStaticStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var tokenCount: Int? + public var tokenLength: Int? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.tokenCount = tokenCount + self.tokenLength = tokenLength + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case tokenCount = "token_count" + case tokenLength = "token_length" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + tokenCount = try container.decodeIfPresent(Int.self, forKey: .tokenCount) + tokenLength = try container.decodeIfPresent(Int.self, forKey: .tokenLength) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(tokenCount, forKey: .tokenCount) + try container.encodeIfPresent(tokenLength, forKey: .tokenLength) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorStaticStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorStaticStageRequest.swift new file mode 100644 index 0000000..bab3350 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorStaticStageRequest.swift @@ -0,0 +1,57 @@ +// +// AuthenticatorStaticStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorStaticStage Serializer +public struct AuthenticatorStaticStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var tokenCount: Int? + public var tokenLength: Int? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.tokenCount = tokenCount + self.tokenLength = tokenLength + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case tokenCount = "token_count" + case tokenLength = "token_length" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + tokenCount = try container.decodeIfPresent(Int.self, forKey: .tokenCount) + tokenLength = try container.decodeIfPresent(Int.self, forKey: .tokenLength) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(tokenCount, forKey: .tokenCount) + try container.encodeIfPresent(tokenLength, forKey: .tokenLength) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorTOTPChallenge.swift b/authentikClient/Sources/Models/AuthenticatorTOTPChallenge.swift new file mode 100644 index 0000000..5112050 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorTOTPChallenge.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorTOTPChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// TOTP Setup challenge +public struct AuthenticatorTOTPChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-totp" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var configUrl: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-totp", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, configUrl: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.configUrl = configUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case configUrl = "config_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + configUrl = try container.decode(String.self, forKey: .configUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(configUrl, forKey: .configUrl) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorTOTPChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorTOTPChallengeResponseRequest.swift new file mode 100644 index 0000000..bd4c494 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorTOTPChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// AuthenticatorTOTPChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// TOTP Challenge response, device is set by get_response_instance +public struct AuthenticatorTOTPChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-totp" + public var code: Int + + public init(component: String? = "ak-stage-authenticator-totp", code: Int) { + self.component = component + self.code = code + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorTOTPStage.swift b/authentikClient/Sources/Models/AuthenticatorTOTPStage.swift new file mode 100644 index 0000000..4bde528 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorTOTPStage.swift @@ -0,0 +1,81 @@ +// +// AuthenticatorTOTPStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorTOTPStage Serializer +public struct AuthenticatorTOTPStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var digits: DigitsEnum + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.digits = digits + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case digits + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + digits = try container.decode(DigitsEnum.self, forKey: .digits) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(digits, forKey: .digits) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorTOTPStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorTOTPStageRequest.swift new file mode 100644 index 0000000..6ea0e43 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorTOTPStageRequest.swift @@ -0,0 +1,52 @@ +// +// AuthenticatorTOTPStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorTOTPStage Serializer +public struct AuthenticatorTOTPStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var digits: DigitsEnum + + public init(name: String, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.digits = digits + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case digits + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + digits = try container.decode(DigitsEnum.self, forKey: .digits) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encode(digits, forKey: .digits) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorValidateStage.swift b/authentikClient/Sources/Models/AuthenticatorValidateStage.swift new file mode 100644 index 0000000..3142c7c --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorValidateStage.swift @@ -0,0 +1,93 @@ +// +// AuthenticatorValidateStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorValidateStage Serializer +public struct AuthenticatorValidateStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var notConfiguredAction: NotConfiguredActionEnum? + /// Device classes which can be used to authenticate + public var deviceClasses: [DeviceClassesEnum]? + /// Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + public var configurationStages: [UUID]? + /// If any of the user's device has been used within this threshold, this stage will be skipped + public var lastAuthThreshold: String? + public var webauthnUserVerification: UserVerificationEnum? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.notConfiguredAction = notConfiguredAction + self.deviceClasses = deviceClasses + self.configurationStages = configurationStages + self.lastAuthThreshold = lastAuthThreshold + self.webauthnUserVerification = webauthnUserVerification + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case notConfiguredAction = "not_configured_action" + case deviceClasses = "device_classes" + case configurationStages = "configuration_stages" + case lastAuthThreshold = "last_auth_threshold" + case webauthnUserVerification = "webauthn_user_verification" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + notConfiguredAction = try container.decodeIfPresent(NotConfiguredActionEnum.self, forKey: .notConfiguredAction) + deviceClasses = try container.decodeIfPresent([DeviceClassesEnum].self, forKey: .deviceClasses) + configurationStages = try container.decodeIfPresent([UUID].self, forKey: .configurationStages) + lastAuthThreshold = try container.decodeIfPresent(String.self, forKey: .lastAuthThreshold) + webauthnUserVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .webauthnUserVerification) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) + try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) + try container.encodeIfPresent(configurationStages, forKey: .configurationStages) + try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) + try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorValidateStageRequest.swift b/authentikClient/Sources/Models/AuthenticatorValidateStageRequest.swift new file mode 100644 index 0000000..1a1139b --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorValidateStageRequest.swift @@ -0,0 +1,64 @@ +// +// AuthenticatorValidateStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorValidateStage Serializer +public struct AuthenticatorValidateStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var notConfiguredAction: NotConfiguredActionEnum? + /// Device classes which can be used to authenticate + public var deviceClasses: [DeviceClassesEnum]? + /// Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + public var configurationStages: [UUID]? + /// If any of the user's device has been used within this threshold, this stage will be skipped + public var lastAuthThreshold: String? + public var webauthnUserVerification: UserVerificationEnum? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { + self.name = name + self.flowSet = flowSet + self.notConfiguredAction = notConfiguredAction + self.deviceClasses = deviceClasses + self.configurationStages = configurationStages + self.lastAuthThreshold = lastAuthThreshold + self.webauthnUserVerification = webauthnUserVerification + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case notConfiguredAction = "not_configured_action" + case deviceClasses = "device_classes" + case configurationStages = "configuration_stages" + case lastAuthThreshold = "last_auth_threshold" + case webauthnUserVerification = "webauthn_user_verification" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + notConfiguredAction = try container.decodeIfPresent(NotConfiguredActionEnum.self, forKey: .notConfiguredAction) + deviceClasses = try container.decodeIfPresent([DeviceClassesEnum].self, forKey: .deviceClasses) + configurationStages = try container.decodeIfPresent([UUID].self, forKey: .configurationStages) + lastAuthThreshold = try container.decodeIfPresent(String.self, forKey: .lastAuthThreshold) + webauthnUserVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .webauthnUserVerification) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) + try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) + try container.encodeIfPresent(configurationStages, forKey: .configurationStages) + try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) + try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorValidationChallenge.swift b/authentikClient/Sources/Models/AuthenticatorValidationChallenge.swift new file mode 100644 index 0000000..6e55055 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorValidationChallenge.swift @@ -0,0 +1,66 @@ +// +// AuthenticatorValidationChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Authenticator challenge +public struct AuthenticatorValidationChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-validate" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var deviceChallenges: [DeviceChallenge] + public var configurationStages: [SelectableStage] + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-validate", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, deviceChallenges: [DeviceChallenge], configurationStages: [SelectableStage]) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.deviceChallenges = deviceChallenges + self.configurationStages = configurationStages + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case deviceChallenges = "device_challenges" + case configurationStages = "configuration_stages" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + deviceChallenges = try container.decode([DeviceChallenge].self, forKey: .deviceChallenges) + configurationStages = try container.decode([SelectableStage].self, forKey: .configurationStages) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(deviceChallenges, forKey: .deviceChallenges) + try container.encode(configurationStages, forKey: .configurationStages) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorValidationChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorValidationChallengeResponseRequest.swift new file mode 100644 index 0000000..069bbe6 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorValidationChallengeResponseRequest.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorValidationChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge used for Code-based and WebAuthn authenticators +public struct AuthenticatorValidationChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-validate" + public var selectedChallenge: DeviceChallengeRequest? + public var selectedStage: String? + public var code: String? + public var webauthn: [String: AnyCodable]? + public var duo: Int? + public var mobile: String? + + public init(component: String? = "ak-stage-authenticator-validate", selectedChallenge: DeviceChallengeRequest? = nil, selectedStage: String? = nil, code: String? = nil, webauthn: [String: AnyCodable]? = nil, duo: Int? = nil, mobile: String? = nil) { + self.component = component + self.selectedChallenge = selectedChallenge + self.selectedStage = selectedStage + self.code = code + self.webauthn = webauthn + self.duo = duo + self.mobile = mobile + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case component + case selectedChallenge = "selected_challenge" + case selectedStage = "selected_stage" + case code + case webauthn + case duo + case mobile + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + component = try container.decodeIfPresent(String.self, forKey: .component) + selectedChallenge = try container.decodeIfPresent(DeviceChallengeRequest.self, forKey: .selectedChallenge) + selectedStage = try container.decodeIfPresent(String.self, forKey: .selectedStage) + code = try container.decodeIfPresent(String.self, forKey: .code) + webauthn = try container.decodeIfPresent([String: AnyCodable].self, forKey: .webauthn) + duo = try container.decodeIfPresent(Int.self, forKey: .duo) + mobile = try container.decodeIfPresent(String.self, forKey: .mobile) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(selectedChallenge, forKey: .selectedChallenge) + try container.encodeIfPresent(selectedStage, forKey: .selectedStage) + try container.encodeIfPresent(code, forKey: .code) + try container.encodeIfPresent(webauthn, forKey: .webauthn) + try container.encodeIfPresent(duo, forKey: .duo) + try container.encodeIfPresent(mobile, forKey: .mobile) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorWebAuthnChallenge.swift b/authentikClient/Sources/Models/AuthenticatorWebAuthnChallenge.swift new file mode 100644 index 0000000..51868c9 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorWebAuthnChallenge.swift @@ -0,0 +1,61 @@ +// +// AuthenticatorWebAuthnChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// WebAuthn Challenge +public struct AuthenticatorWebAuthnChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-authenticator-webauthn" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var registration: [String: AnyCodable] + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-authenticator-webauthn", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, registration: [String: AnyCodable]) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.registration = registration + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case registration + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + registration = try container.decode([String: AnyCodable].self, forKey: .registration) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(registration, forKey: .registration) + } +} diff --git a/authentikClient/Sources/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift b/authentikClient/Sources/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift new file mode 100644 index 0000000..d0f8bc7 --- /dev/null +++ b/authentikClient/Sources/Models/AuthenticatorWebAuthnChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// AuthenticatorWebAuthnChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// WebAuthn Challenge response +public struct AuthenticatorWebAuthnChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-authenticator-webauthn" + public var response: [String: AnyCodable] + + public init(component: String? = "ak-stage-authenticator-webauthn", response: [String: AnyCodable]) { + self.component = component + self.response = response + } +} diff --git a/authentikClient/Sources/Models/AutoSubmitChallengeResponseRequest.swift b/authentikClient/Sources/Models/AutoSubmitChallengeResponseRequest.swift new file mode 100644 index 0000000..397f20e --- /dev/null +++ b/authentikClient/Sources/Models/AutoSubmitChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// AutoSubmitChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for autosubmit response +public struct AutoSubmitChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-autosubmit" + + public init(component: String? = "ak-stage-autosubmit") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/AutosubmitChallenge.swift b/authentikClient/Sources/Models/AutosubmitChallenge.swift new file mode 100644 index 0000000..33b8e2f --- /dev/null +++ b/authentikClient/Sources/Models/AutosubmitChallenge.swift @@ -0,0 +1,61 @@ +// +// AutosubmitChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Autosubmit challenge used to send and navigate a POST request +public struct AutosubmitChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-autosubmit" + public var responseErrors: [String: [ErrorDetail]]? + public var url: String + public var attrs: [String: String] + public var title: String? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-autosubmit", responseErrors: [String: [ErrorDetail]]? = nil, url: String, attrs: [String: String], title: String? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.url = url + self.attrs = attrs + self.title = title + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case url + case attrs + case title + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + url = try container.decode(String.self, forKey: .url) + attrs = try container.decode([String: String].self, forKey: .attrs) + title = try container.decodeIfPresent(String.self, forKey: .title) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(url, forKey: .url) + try container.encode(attrs, forKey: .attrs) + try container.encodeIfPresent(title, forKey: .title) + } +} diff --git a/authentikClient/Sources/Models/BackendsEnum.swift b/authentikClient/Sources/Models/BackendsEnum.swift new file mode 100644 index 0000000..197a693 --- /dev/null +++ b/authentikClient/Sources/Models/BackendsEnum.swift @@ -0,0 +1,16 @@ +// +// BackendsEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `authentik.core.auth.InbuiltBackend` - User database + standard password * `authentik.core.auth.TokenBackend` - User database + app passwords * `authentik.sources.ldap.auth.LDAPBackend` - User database + LDAP password +public enum BackendsEnum: String, Codable, CaseIterable { + case coreAuthInbuiltbackend = "authentik.core.auth.InbuiltBackend" + case coreAuthTokenbackend = "authentik.core.auth.TokenBackend" + case sourcesLdapAuthLdapbackend = "authentik.sources.ldap.auth.LDAPBackend" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/BindingTypeEnum.swift b/authentikClient/Sources/Models/BindingTypeEnum.swift new file mode 100644 index 0000000..3e8754b --- /dev/null +++ b/authentikClient/Sources/Models/BindingTypeEnum.swift @@ -0,0 +1,16 @@ +// +// BindingTypeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation +public enum BindingTypeEnum: String, Codable, CaseIterable { + case redirect = "REDIRECT" + case post = "POST" + case postAuto = "POST_AUTO" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/BlueprintFile.swift b/authentikClient/Sources/Models/BlueprintFile.swift new file mode 100644 index 0000000..3701fc7 --- /dev/null +++ b/authentikClient/Sources/Models/BlueprintFile.swift @@ -0,0 +1,45 @@ +// +// BlueprintFile.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct BlueprintFile: Codable { + public var path: String + public var lastM: Date + public var hash: String + public var meta: Metadata + + public init(path: String, lastM: Date, hash: String, meta: Metadata) { + self.path = path + self.lastM = lastM + self.hash = hash + self.meta = meta + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case path + case lastM = "last_m" + case hash + case meta + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + path = try container.decode(String.self, forKey: .path) + lastM = try container.decode(Date.self, forKey: .lastM) + hash = try container.decode(String.self, forKey: .hash) + meta = try container.decode(Metadata.self, forKey: .meta) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(path, forKey: .path) + try container.encode(lastM, forKey: .lastM) + try container.encode(hash, forKey: .hash) + try container.encode(meta, forKey: .meta) + } +} diff --git a/authentikClient/Sources/Models/BlueprintInstance.swift b/authentikClient/Sources/Models/BlueprintInstance.swift new file mode 100644 index 0000000..9706b18 --- /dev/null +++ b/authentikClient/Sources/Models/BlueprintInstance.swift @@ -0,0 +1,81 @@ +// +// BlueprintInstance.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Info about a single blueprint instance file +public struct BlueprintInstance: Codable { + public var pk: UUID + public var name: String + public var path: String? = "" + public var context: [String: AnyCodable]? + public var lastApplied: Date + public var lastAppliedHash: String + public var status: BlueprintInstanceStatusEnum + public var enabled: Bool? + public var managedModels: [String] + public var metadata: [String: AnyCodable] + public var content: String? + + public init(pk: UUID, name: String, path: String? = "", context: [String: AnyCodable]? = nil, lastApplied: Date, lastAppliedHash: String, status: BlueprintInstanceStatusEnum, enabled: Bool? = nil, managedModels: [String], metadata: [String: AnyCodable], content: String? = nil) { + self.pk = pk + self.name = name + self.path = path + self.context = context + self.lastApplied = lastApplied + self.lastAppliedHash = lastAppliedHash + self.status = status + self.enabled = enabled + self.managedModels = managedModels + self.metadata = metadata + self.content = content + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case path + case context + case lastApplied = "last_applied" + case lastAppliedHash = "last_applied_hash" + case status + case enabled + case managedModels = "managed_models" + case metadata + case content + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + path = try container.decodeIfPresent(String.self, forKey: .path) + context = try container.decodeIfPresent([String: AnyCodable].self, forKey: .context) + lastApplied = try container.decode(Date.self, forKey: .lastApplied) + lastAppliedHash = try container.decode(String.self, forKey: .lastAppliedHash) + status = try container.decode(BlueprintInstanceStatusEnum.self, forKey: .status) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + managedModels = try container.decode([String].self, forKey: .managedModels) + metadata = try container.decode([String: AnyCodable].self, forKey: .metadata) + content = try container.decodeIfPresent(String.self, forKey: .content) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(path, forKey: .path) + try container.encodeIfPresent(context, forKey: .context) + try container.encode(lastApplied, forKey: .lastApplied) + try container.encode(lastAppliedHash, forKey: .lastAppliedHash) + try container.encode(status, forKey: .status) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(managedModels, forKey: .managedModels) + try container.encode(metadata, forKey: .metadata) + try container.encodeIfPresent(content, forKey: .content) + } +} diff --git a/authentikClient/Sources/Models/BlueprintInstanceRequest.swift b/authentikClient/Sources/Models/BlueprintInstanceRequest.swift new file mode 100644 index 0000000..ff12d43 --- /dev/null +++ b/authentikClient/Sources/Models/BlueprintInstanceRequest.swift @@ -0,0 +1,25 @@ +// +// BlueprintInstanceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Info about a single blueprint instance file +public struct BlueprintInstanceRequest: Codable { + public var name: String + public var path: String? = "" + public var context: [String: AnyCodable]? + public var enabled: Bool? + public var content: String? + + public init(name: String, path: String? = "", context: [String: AnyCodable]? = nil, enabled: Bool? = nil, content: String? = nil) { + self.name = name + self.path = path + self.context = context + self.enabled = enabled + self.content = content + } +} diff --git a/authentikClient/Sources/Models/BlueprintInstanceStatusEnum.swift b/authentikClient/Sources/Models/BlueprintInstanceStatusEnum.swift new file mode 100644 index 0000000..ad10279 --- /dev/null +++ b/authentikClient/Sources/Models/BlueprintInstanceStatusEnum.swift @@ -0,0 +1,18 @@ +// +// BlueprintInstanceStatusEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `successful` - Successful * `warning` - Warning * `error` - Error * `orphaned` - Orphaned * `unknown` - Unknown +public enum BlueprintInstanceStatusEnum: String, Codable, CaseIterable { + case successful = "successful" + case warning = "warning" + case error = "error" + case orphaned = "orphaned" + case unknown = "unknown" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Cache.swift b/authentikClient/Sources/Models/Cache.swift new file mode 100644 index 0000000..f369b87 --- /dev/null +++ b/authentikClient/Sources/Models/Cache.swift @@ -0,0 +1,17 @@ +// +// Cache.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Generic cache stats for an object +public struct Cache: Codable { + public var count: Int + + public init(count: Int) { + self.count = count + } +} diff --git a/authentikClient/Sources/Models/CapabilitiesEnum.swift b/authentikClient/Sources/Models/CapabilitiesEnum.swift new file mode 100644 index 0000000..1540f54 --- /dev/null +++ b/authentikClient/Sources/Models/CapabilitiesEnum.swift @@ -0,0 +1,18 @@ +// +// CapabilitiesEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `can_save_media` - Can Save Media * `can_geo_ip` - Can Geo Ip * `can_impersonate` - Can Impersonate * `can_debug` - Can Debug * `is_enterprise` - Is Enterprise +public enum CapabilitiesEnum: String, Codable, CaseIterable { + case canSaveMedia = "can_save_media" + case canGeoIp = "can_geo_ip" + case canImpersonate = "can_impersonate" + case canDebug = "can_debug" + case isEnterprise = "is_enterprise" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/CaptchaChallenge.swift b/authentikClient/Sources/Models/CaptchaChallenge.swift new file mode 100644 index 0000000..52801cb --- /dev/null +++ b/authentikClient/Sources/Models/CaptchaChallenge.swift @@ -0,0 +1,66 @@ +// +// CaptchaChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Site public key +public struct CaptchaChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-captcha" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var siteKey: String + public var jsUrl: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-captcha", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, siteKey: String, jsUrl: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.siteKey = siteKey + self.jsUrl = jsUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case siteKey = "site_key" + case jsUrl = "js_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + siteKey = try container.decode(String.self, forKey: .siteKey) + jsUrl = try container.decode(String.self, forKey: .jsUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encode(siteKey, forKey: .siteKey) + try container.encode(jsUrl, forKey: .jsUrl) + } +} diff --git a/authentikClient/Sources/Models/CaptchaChallengeResponseRequest.swift b/authentikClient/Sources/Models/CaptchaChallengeResponseRequest.swift new file mode 100644 index 0000000..f542f1a --- /dev/null +++ b/authentikClient/Sources/Models/CaptchaChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// CaptchaChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Validate captcha token +public struct CaptchaChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-captcha" + public var token: String + + public init(component: String? = "ak-stage-captcha", token: String) { + self.component = component + self.token = token + } +} diff --git a/authentikClient/Sources/Models/CaptchaStage.swift b/authentikClient/Sources/Models/CaptchaStage.swift new file mode 100644 index 0000000..9c61085 --- /dev/null +++ b/authentikClient/Sources/Models/CaptchaStage.swift @@ -0,0 +1,81 @@ +// +// CaptchaStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CaptchaStage Serializer +public struct CaptchaStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Public key, acquired your captcha Provider. + public var publicKey: String + public var jsUrl: String? + public var apiUrl: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, publicKey: String, jsUrl: String? = nil, apiUrl: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.publicKey = publicKey + self.jsUrl = jsUrl + self.apiUrl = apiUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case publicKey = "public_key" + case jsUrl = "js_url" + case apiUrl = "api_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + publicKey = try container.decode(String.self, forKey: .publicKey) + jsUrl = try container.decodeIfPresent(String.self, forKey: .jsUrl) + apiUrl = try container.decodeIfPresent(String.self, forKey: .apiUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(publicKey, forKey: .publicKey) + try container.encodeIfPresent(jsUrl, forKey: .jsUrl) + try container.encodeIfPresent(apiUrl, forKey: .apiUrl) + } +} diff --git a/authentikClient/Sources/Models/CaptchaStageRequest.swift b/authentikClient/Sources/Models/CaptchaStageRequest.swift new file mode 100644 index 0000000..46ba2a8 --- /dev/null +++ b/authentikClient/Sources/Models/CaptchaStageRequest.swift @@ -0,0 +1,58 @@ +// +// CaptchaStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CaptchaStage Serializer +public struct CaptchaStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Public key, acquired your captcha Provider. + public var publicKey: String + /// Private key, acquired your captcha Provider. + public var privateKey: String + public var jsUrl: String? + public var apiUrl: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, publicKey: String, privateKey: String, jsUrl: String? = nil, apiUrl: String? = nil) { + self.name = name + self.flowSet = flowSet + self.publicKey = publicKey + self.privateKey = privateKey + self.jsUrl = jsUrl + self.apiUrl = apiUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case publicKey = "public_key" + case privateKey = "private_key" + case jsUrl = "js_url" + case apiUrl = "api_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + publicKey = try container.decode(String.self, forKey: .publicKey) + privateKey = try container.decode(String.self, forKey: .privateKey) + jsUrl = try container.decodeIfPresent(String.self, forKey: .jsUrl) + apiUrl = try container.decodeIfPresent(String.self, forKey: .apiUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(publicKey, forKey: .publicKey) + try container.encode(privateKey, forKey: .privateKey) + try container.encodeIfPresent(jsUrl, forKey: .jsUrl) + try container.encodeIfPresent(apiUrl, forKey: .apiUrl) + } +} diff --git a/authentikClient/Sources/Models/CertificateData.swift b/authentikClient/Sources/Models/CertificateData.swift new file mode 100644 index 0000000..0030333 --- /dev/null +++ b/authentikClient/Sources/Models/CertificateData.swift @@ -0,0 +1,17 @@ +// +// CertificateData.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get CertificateKeyPair's data +public struct CertificateData: Codable { + public var data: String + + public init(data: String) { + self.data = data + } +} diff --git a/authentikClient/Sources/Models/CertificateGenerationRequest.swift b/authentikClient/Sources/Models/CertificateGenerationRequest.swift new file mode 100644 index 0000000..ed29957 --- /dev/null +++ b/authentikClient/Sources/Models/CertificateGenerationRequest.swift @@ -0,0 +1,41 @@ +// +// CertificateGenerationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Certificate generation parameters +public struct CertificateGenerationRequest: Codable { + public var commonName: String + public var subjectAltName: String? + public var validityDays: Int + + public init(commonName: String, subjectAltName: String? = nil, validityDays: Int) { + self.commonName = commonName + self.subjectAltName = subjectAltName + self.validityDays = validityDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case commonName = "common_name" + case subjectAltName = "subject_alt_name" + case validityDays = "validity_days" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + commonName = try container.decode(String.self, forKey: .commonName) + subjectAltName = try container.decodeIfPresent(String.self, forKey: .subjectAltName) + validityDays = try container.decode(Int.self, forKey: .validityDays) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(commonName, forKey: .commonName) + try container.encodeIfPresent(subjectAltName, forKey: .subjectAltName) + try container.encode(validityDays, forKey: .validityDays) + } +} diff --git a/authentikClient/Sources/Models/CertificateKeyPair.swift b/authentikClient/Sources/Models/CertificateKeyPair.swift new file mode 100644 index 0000000..5b56ca4 --- /dev/null +++ b/authentikClient/Sources/Models/CertificateKeyPair.swift @@ -0,0 +1,90 @@ +// +// CertificateKeyPair.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CertificateKeyPair Serializer +public struct CertificateKeyPair: Codable { + public var pk: UUID + public var name: String + /// Get certificate Hash (SHA256) + public var fingerprintSha256: String? + /// Get certificate Hash (SHA1) + public var fingerprintSha1: String? + /// Get certificate expiry + public var certExpiry: Date? + /// Get certificate subject as full rfc4514 + public var certSubject: String? + /// Show if this keypair has a private key configured or not + public var privateKeyAvailable: Bool + /// Get the private key's type, if set + public var privateKeyType: String? + /// Get URL to download certificate + public var certificateDownloadUrl: String + /// Get URL to download private key + public var privateKeyDownloadUrl: String + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + + public init(pk: UUID, name: String, fingerprintSha256: String?, fingerprintSha1: String?, certExpiry: Date?, certSubject: String?, privateKeyAvailable: Bool, privateKeyType: String?, certificateDownloadUrl: String, privateKeyDownloadUrl: String, managed: String?) { + self.pk = pk + self.name = name + self.fingerprintSha256 = fingerprintSha256 + self.fingerprintSha1 = fingerprintSha1 + self.certExpiry = certExpiry + self.certSubject = certSubject + self.privateKeyAvailable = privateKeyAvailable + self.privateKeyType = privateKeyType + self.certificateDownloadUrl = certificateDownloadUrl + self.privateKeyDownloadUrl = privateKeyDownloadUrl + self.managed = managed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case fingerprintSha256 = "fingerprint_sha256" + case fingerprintSha1 = "fingerprint_sha1" + case certExpiry = "cert_expiry" + case certSubject = "cert_subject" + case privateKeyAvailable = "private_key_available" + case privateKeyType = "private_key_type" + case certificateDownloadUrl = "certificate_download_url" + case privateKeyDownloadUrl = "private_key_download_url" + case managed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + fingerprintSha256 = try container.decode(String.self, forKey: .fingerprintSha256) + fingerprintSha1 = try container.decode(String.self, forKey: .fingerprintSha1) + certExpiry = try container.decode(Date.self, forKey: .certExpiry) + certSubject = try container.decode(String.self, forKey: .certSubject) + privateKeyAvailable = try container.decode(Bool.self, forKey: .privateKeyAvailable) + privateKeyType = try container.decode(String.self, forKey: .privateKeyType) + certificateDownloadUrl = try container.decode(String.self, forKey: .certificateDownloadUrl) + privateKeyDownloadUrl = try container.decode(String.self, forKey: .privateKeyDownloadUrl) + managed = try container.decode(String.self, forKey: .managed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(fingerprintSha256, forKey: .fingerprintSha256) + try container.encode(fingerprintSha1, forKey: .fingerprintSha1) + try container.encode(certExpiry, forKey: .certExpiry) + try container.encode(certSubject, forKey: .certSubject) + try container.encode(privateKeyAvailable, forKey: .privateKeyAvailable) + try container.encode(privateKeyType, forKey: .privateKeyType) + try container.encode(certificateDownloadUrl, forKey: .certificateDownloadUrl) + try container.encode(privateKeyDownloadUrl, forKey: .privateKeyDownloadUrl) + try container.encode(managed, forKey: .managed) + } +} diff --git a/authentikClient/Sources/Models/CertificateKeyPairRequest.swift b/authentikClient/Sources/Models/CertificateKeyPairRequest.swift new file mode 100644 index 0000000..26d460c --- /dev/null +++ b/authentikClient/Sources/Models/CertificateKeyPairRequest.swift @@ -0,0 +1,43 @@ +// +// CertificateKeyPairRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CertificateKeyPair Serializer +public struct CertificateKeyPairRequest: Codable { + public var name: String + /// PEM-encoded Certificate data + public var certificateData: String + /// Optional Private Key. If this is set, you can use this keypair for encryption. + public var keyData: String? + + public init(name: String, certificateData: String, keyData: String? = nil) { + self.name = name + self.certificateData = certificateData + self.keyData = keyData + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case certificateData = "certificate_data" + case keyData = "key_data" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + certificateData = try container.decode(String.self, forKey: .certificateData) + keyData = try container.decodeIfPresent(String.self, forKey: .keyData) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(certificateData, forKey: .certificateData) + try container.encodeIfPresent(keyData, forKey: .keyData) + } +} diff --git a/authentikClient/Sources/Models/ChallengeChoices.swift b/authentikClient/Sources/Models/ChallengeChoices.swift new file mode 100644 index 0000000..1087668 --- /dev/null +++ b/authentikClient/Sources/Models/ChallengeChoices.swift @@ -0,0 +1,16 @@ +// +// ChallengeChoices.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `native` - NATIVE * `shell` - SHELL * `redirect` - REDIRECT +public enum ChallengeChoices: String, Codable, CaseIterable { + case native = "native" + case shell = "shell" + case redirect = "redirect" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Classes/OpenAPIs/Models/ChallengeTypes.swift b/authentikClient/Sources/Models/ChallengeTypes.swift similarity index 95% rename from authentikClient/Classes/OpenAPIs/Models/ChallengeTypes.swift rename to authentikClient/Sources/Models/ChallengeTypes.swift index e9bd49d..acd66da 100644 --- a/authentikClient/Classes/OpenAPIs/Models/ChallengeTypes.swift +++ b/authentikClient/Sources/Models/ChallengeTypes.swift @@ -6,14 +6,12 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -public enum ChallengeTypes: Codable, JSONEncodable, Hashable { +public enum ChallengeTypes: Codable { case typeAccessDeniedChallenge(AccessDeniedChallenge) case typeAppleLoginChallenge(AppleLoginChallenge) case typeAuthenticatorDuoChallenge(AuthenticatorDuoChallenge) + case typeAuthenticatorMobileChallenge(AuthenticatorMobileChallenge) case typeAuthenticatorSMSChallenge(AuthenticatorSMSChallenge) case typeAuthenticatorStaticChallenge(AuthenticatorStaticChallenge) case typeAuthenticatorTOTPChallenge(AuthenticatorTOTPChallenge) @@ -44,6 +42,8 @@ public enum ChallengeTypes: Codable, JSONEncodable, Hashable { try container.encode(value) case .typeAuthenticatorDuoChallenge(let value): try container.encode(value) + case .typeAuthenticatorMobileChallenge(let value): + try container.encode(value) case .typeAuthenticatorSMSChallenge(let value): try container.encode(value) case .typeAuthenticatorStaticChallenge(let value): @@ -95,6 +95,8 @@ public enum ChallengeTypes: Codable, JSONEncodable, Hashable { self = .typeAppleLoginChallenge(value) } else if let value = try? container.decode(AuthenticatorDuoChallenge.self) { self = .typeAuthenticatorDuoChallenge(value) + } else if let value = try? container.decode(AuthenticatorMobileChallenge.self) { + self = .typeAuthenticatorMobileChallenge(value) } else if let value = try? container.decode(AuthenticatorSMSChallenge.self) { self = .typeAuthenticatorSMSChallenge(value) } else if let value = try? container.decode(AuthenticatorStaticChallenge.self) { @@ -140,4 +142,3 @@ public enum ChallengeTypes: Codable, JSONEncodable, Hashable { } } } - diff --git a/authentikClient/Sources/Models/ClientTypeEnum.swift b/authentikClient/Sources/Models/ClientTypeEnum.swift new file mode 100644 index 0000000..c619143 --- /dev/null +++ b/authentikClient/Sources/Models/ClientTypeEnum.swift @@ -0,0 +1,15 @@ +// +// ClientTypeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `confidential` - Confidential * `public` - Public +public enum ClientTypeEnum: String, Codable, CaseIterable { + case confidential = "confidential" + case _public = "public" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Config.swift b/authentikClient/Sources/Models/Config.swift new file mode 100644 index 0000000..dfdf952 --- /dev/null +++ b/authentikClient/Sources/Models/Config.swift @@ -0,0 +1,56 @@ +// +// Config.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serialize authentik Config into DRF Object +public struct Config: Codable { + public var errorReporting: ErrorReportingConfig + public var capabilities: [CapabilitiesEnum] + public var cacheTimeout: Int + public var cacheTimeoutFlows: Int + public var cacheTimeoutPolicies: Int + public var cacheTimeoutReputation: Int + + public init(errorReporting: ErrorReportingConfig, capabilities: [CapabilitiesEnum], cacheTimeout: Int, cacheTimeoutFlows: Int, cacheTimeoutPolicies: Int, cacheTimeoutReputation: Int) { + self.errorReporting = errorReporting + self.capabilities = capabilities + self.cacheTimeout = cacheTimeout + self.cacheTimeoutFlows = cacheTimeoutFlows + self.cacheTimeoutPolicies = cacheTimeoutPolicies + self.cacheTimeoutReputation = cacheTimeoutReputation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case errorReporting = "error_reporting" + case capabilities + case cacheTimeout = "cache_timeout" + case cacheTimeoutFlows = "cache_timeout_flows" + case cacheTimeoutPolicies = "cache_timeout_policies" + case cacheTimeoutReputation = "cache_timeout_reputation" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + errorReporting = try container.decode(ErrorReportingConfig.self, forKey: .errorReporting) + capabilities = try container.decode([CapabilitiesEnum].self, forKey: .capabilities) + cacheTimeout = try container.decode(Int.self, forKey: .cacheTimeout) + cacheTimeoutFlows = try container.decode(Int.self, forKey: .cacheTimeoutFlows) + cacheTimeoutPolicies = try container.decode(Int.self, forKey: .cacheTimeoutPolicies) + cacheTimeoutReputation = try container.decode(Int.self, forKey: .cacheTimeoutReputation) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(errorReporting, forKey: .errorReporting) + try container.encode(capabilities, forKey: .capabilities) + try container.encode(cacheTimeout, forKey: .cacheTimeout) + try container.encode(cacheTimeoutFlows, forKey: .cacheTimeoutFlows) + try container.encode(cacheTimeoutPolicies, forKey: .cacheTimeoutPolicies) + try container.encode(cacheTimeoutReputation, forKey: .cacheTimeoutReputation) + } +} diff --git a/authentikClient/Sources/Models/ConsentChallenge.swift b/authentikClient/Sources/Models/ConsentChallenge.swift new file mode 100644 index 0000000..414c469 --- /dev/null +++ b/authentikClient/Sources/Models/ConsentChallenge.swift @@ -0,0 +1,76 @@ +// +// ConsentChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge info for consent screens +public struct ConsentChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-consent" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var headerText: String? + public var permissions: [ConsentPermission] + public var additionalPermissions: [ConsentPermission] + public var token: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-consent", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, headerText: String? = nil, permissions: [ConsentPermission], additionalPermissions: [ConsentPermission], token: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.headerText = headerText + self.permissions = permissions + self.additionalPermissions = additionalPermissions + self.token = token + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case headerText = "header_text" + case permissions + case additionalPermissions = "additional_permissions" + case token + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + headerText = try container.decodeIfPresent(String.self, forKey: .headerText) + permissions = try container.decode([ConsentPermission].self, forKey: .permissions) + additionalPermissions = try container.decode([ConsentPermission].self, forKey: .additionalPermissions) + token = try container.decode(String.self, forKey: .token) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encodeIfPresent(headerText, forKey: .headerText) + try container.encode(permissions, forKey: .permissions) + try container.encode(additionalPermissions, forKey: .additionalPermissions) + try container.encode(token, forKey: .token) + } +} diff --git a/authentikClient/Sources/Models/ConsentChallengeResponseRequest.swift b/authentikClient/Sources/Models/ConsentChallengeResponseRequest.swift new file mode 100644 index 0000000..aab2ff7 --- /dev/null +++ b/authentikClient/Sources/Models/ConsentChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// ConsentChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Consent challenge response, any valid response request is valid +public struct ConsentChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-consent" + public var token: String + + public init(component: String? = "ak-stage-consent", token: String) { + self.component = component + self.token = token + } +} diff --git a/authentikClient/Sources/Models/ConsentPermission.swift b/authentikClient/Sources/Models/ConsentPermission.swift new file mode 100644 index 0000000..51e8998 --- /dev/null +++ b/authentikClient/Sources/Models/ConsentPermission.swift @@ -0,0 +1,19 @@ +// +// ConsentPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Permission used for consent +public struct ConsentPermission: Codable { + public var name: String + public var id: String + + public init(name: String, id: String) { + self.name = name + self.id = id + } +} diff --git a/authentikClient/Sources/Models/ConsentStage.swift b/authentikClient/Sources/Models/ConsentStage.swift new file mode 100644 index 0000000..cf4e523 --- /dev/null +++ b/authentikClient/Sources/Models/ConsentStage.swift @@ -0,0 +1,76 @@ +// +// ConsentStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ConsentStage Serializer +public struct ConsentStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var mode: ConsentStageModeEnum? + /// Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + public var consentExpireIn: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.mode = mode + self.consentExpireIn = consentExpireIn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case mode + case consentExpireIn = "consent_expire_in" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + mode = try container.decodeIfPresent(ConsentStageModeEnum.self, forKey: .mode) + consentExpireIn = try container.decodeIfPresent(String.self, forKey: .consentExpireIn) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) + } +} diff --git a/authentikClient/Sources/Models/ConsentStageModeEnum.swift b/authentikClient/Sources/Models/ConsentStageModeEnum.swift new file mode 100644 index 0000000..7a7dff3 --- /dev/null +++ b/authentikClient/Sources/Models/ConsentStageModeEnum.swift @@ -0,0 +1,16 @@ +// +// ConsentStageModeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring +public enum ConsentStageModeEnum: String, Codable, CaseIterable { + case alwaysRequire = "always_require" + case permanent = "permanent" + case expiring = "expiring" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ConsentStageRequest.swift b/authentikClient/Sources/Models/ConsentStageRequest.swift new file mode 100644 index 0000000..675101f --- /dev/null +++ b/authentikClient/Sources/Models/ConsentStageRequest.swift @@ -0,0 +1,47 @@ +// +// ConsentStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ConsentStage Serializer +public struct ConsentStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var mode: ConsentStageModeEnum? + /// Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + public var consentExpireIn: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { + self.name = name + self.flowSet = flowSet + self.mode = mode + self.consentExpireIn = consentExpireIn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case mode + case consentExpireIn = "consent_expire_in" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + mode = try container.decodeIfPresent(ConsentStageModeEnum.self, forKey: .mode) + consentExpireIn = try container.decodeIfPresent(String.self, forKey: .consentExpireIn) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) + } +} diff --git a/authentikClient/Sources/Models/ContextualFlowInfo.swift b/authentikClient/Sources/Models/ContextualFlowInfo.swift new file mode 100644 index 0000000..7b37795 --- /dev/null +++ b/authentikClient/Sources/Models/ContextualFlowInfo.swift @@ -0,0 +1,46 @@ +// +// ContextualFlowInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Contextual flow information for a challenge +public struct ContextualFlowInfo: Codable { + public var title: String? + public var background: String? + public var cancelUrl: String + public var layout: LayoutEnum + + public init(title: String? = nil, background: String? = nil, cancelUrl: String, layout: LayoutEnum) { + self.title = title + self.background = background + self.cancelUrl = cancelUrl + self.layout = layout + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case title + case background + case cancelUrl = "cancel_url" + case layout + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + title = try container.decodeIfPresent(String.self, forKey: .title) + background = try container.decodeIfPresent(String.self, forKey: .background) + cancelUrl = try container.decode(String.self, forKey: .cancelUrl) + layout = try container.decode(LayoutEnum.self, forKey: .layout) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(title, forKey: .title) + try container.encodeIfPresent(background, forKey: .background) + try container.encode(cancelUrl, forKey: .cancelUrl) + try container.encode(layout, forKey: .layout) + } +} diff --git a/authentikClient/Sources/Models/Coordinate.swift b/authentikClient/Sources/Models/Coordinate.swift new file mode 100644 index 0000000..0565656 --- /dev/null +++ b/authentikClient/Sources/Models/Coordinate.swift @@ -0,0 +1,36 @@ +// +// Coordinate.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Coordinates for diagrams +public struct Coordinate: Codable { + public var xCord: Int + public var yCord: Int + + public init(xCord: Int, yCord: Int) { + self.xCord = xCord + self.yCord = yCord + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case xCord = "x_cord" + case yCord = "y_cord" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + xCord = try container.decode(Int.self, forKey: .xCord) + yCord = try container.decode(Int.self, forKey: .yCord) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(xCord, forKey: .xCord) + try container.encode(yCord, forKey: .yCord) + } +} diff --git a/authentikClient/Sources/Models/CurrentTenant.swift b/authentikClient/Sources/Models/CurrentTenant.swift new file mode 100644 index 0000000..8ed7cd7 --- /dev/null +++ b/authentikClient/Sources/Models/CurrentTenant.swift @@ -0,0 +1,91 @@ +// +// CurrentTenant.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Partial tenant information for styling +public struct CurrentTenant: Codable { + public var matchedDomain: String + public var brandingTitle: String + public var brandingLogo: String + public var brandingFavicon: String + public var uiFooterLinks: [FooterLink] + public var uiTheme: UiThemeEnum + public var flowAuthentication: String? + public var flowInvalidation: String? + public var flowRecovery: String? + public var flowUnenrollment: String? + public var flowUserSettings: String? + public var flowDeviceCode: String? + public var defaultLocale: String + + public init(matchedDomain: String, brandingTitle: String, brandingLogo: String, brandingFavicon: String, uiFooterLinks: [FooterLink], uiTheme: UiThemeEnum, flowAuthentication: String? = nil, flowInvalidation: String? = nil, flowRecovery: String? = nil, flowUnenrollment: String? = nil, flowUserSettings: String? = nil, flowDeviceCode: String? = nil, defaultLocale: String) { + self.matchedDomain = matchedDomain + self.brandingTitle = brandingTitle + self.brandingLogo = brandingLogo + self.brandingFavicon = brandingFavicon + self.uiFooterLinks = uiFooterLinks + self.uiTheme = uiTheme + self.flowAuthentication = flowAuthentication + self.flowInvalidation = flowInvalidation + self.flowRecovery = flowRecovery + self.flowUnenrollment = flowUnenrollment + self.flowUserSettings = flowUserSettings + self.flowDeviceCode = flowDeviceCode + self.defaultLocale = defaultLocale + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case matchedDomain = "matched_domain" + case brandingTitle = "branding_title" + case brandingLogo = "branding_logo" + case brandingFavicon = "branding_favicon" + case uiFooterLinks = "ui_footer_links" + case uiTheme = "ui_theme" + case flowAuthentication = "flow_authentication" + case flowInvalidation = "flow_invalidation" + case flowRecovery = "flow_recovery" + case flowUnenrollment = "flow_unenrollment" + case flowUserSettings = "flow_user_settings" + case flowDeviceCode = "flow_device_code" + case defaultLocale = "default_locale" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + matchedDomain = try container.decode(String.self, forKey: .matchedDomain) + brandingTitle = try container.decode(String.self, forKey: .brandingTitle) + brandingLogo = try container.decode(String.self, forKey: .brandingLogo) + brandingFavicon = try container.decode(String.self, forKey: .brandingFavicon) + uiFooterLinks = try container.decode([FooterLink].self, forKey: .uiFooterLinks) + uiTheme = try container.decode(UiThemeEnum.self, forKey: .uiTheme) + flowAuthentication = try container.decodeIfPresent(String.self, forKey: .flowAuthentication) + flowInvalidation = try container.decodeIfPresent(String.self, forKey: .flowInvalidation) + flowRecovery = try container.decodeIfPresent(String.self, forKey: .flowRecovery) + flowUnenrollment = try container.decodeIfPresent(String.self, forKey: .flowUnenrollment) + flowUserSettings = try container.decodeIfPresent(String.self, forKey: .flowUserSettings) + flowDeviceCode = try container.decodeIfPresent(String.self, forKey: .flowDeviceCode) + defaultLocale = try container.decode(String.self, forKey: .defaultLocale) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(matchedDomain, forKey: .matchedDomain) + try container.encode(brandingTitle, forKey: .brandingTitle) + try container.encode(brandingLogo, forKey: .brandingLogo) + try container.encode(brandingFavicon, forKey: .brandingFavicon) + try container.encode(uiFooterLinks, forKey: .uiFooterLinks) + try container.encode(uiTheme, forKey: .uiTheme) + try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) + try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) + try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) + try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) + try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) + try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) + try container.encode(defaultLocale, forKey: .defaultLocale) + } +} diff --git a/authentikClient/Sources/Models/DeniedActionEnum.swift b/authentikClient/Sources/Models/DeniedActionEnum.swift new file mode 100644 index 0000000..0556417 --- /dev/null +++ b/authentikClient/Sources/Models/DeniedActionEnum.swift @@ -0,0 +1,16 @@ +// +// DeniedActionEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `message_continue` - Message Continue * `message` - Message * `continue` - Continue +public enum DeniedActionEnum: String, Codable, CaseIterable { + case messageContinue = "message_continue" + case message = "message" + case _continue = "continue" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/DenyStage.swift b/authentikClient/Sources/Models/DenyStage.swift new file mode 100644 index 0000000..0f1c4fc --- /dev/null +++ b/authentikClient/Sources/Models/DenyStage.swift @@ -0,0 +1,70 @@ +// +// DenyStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DenyStage Serializer +public struct DenyStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var denyMessage: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, denyMessage: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.denyMessage = denyMessage + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case denyMessage = "deny_message" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + denyMessage = try container.decodeIfPresent(String.self, forKey: .denyMessage) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(denyMessage, forKey: .denyMessage) + } +} diff --git a/authentikClient/Sources/Models/DenyStageRequest.swift b/authentikClient/Sources/Models/DenyStageRequest.swift new file mode 100644 index 0000000..c4fef84 --- /dev/null +++ b/authentikClient/Sources/Models/DenyStageRequest.swift @@ -0,0 +1,41 @@ +// +// DenyStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DenyStage Serializer +public struct DenyStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var denyMessage: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, denyMessage: String? = nil) { + self.name = name + self.flowSet = flowSet + self.denyMessage = denyMessage + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case denyMessage = "deny_message" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + denyMessage = try container.decodeIfPresent(String.self, forKey: .denyMessage) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(denyMessage, forKey: .denyMessage) + } +} diff --git a/authentikClient/Sources/Models/Device.swift b/authentikClient/Sources/Models/Device.swift new file mode 100644 index 0000000..cddc8b9 --- /dev/null +++ b/authentikClient/Sources/Models/Device.swift @@ -0,0 +1,65 @@ +// +// Device.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Duo authenticator devices +public struct Device: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + } +} diff --git a/authentikClient/Sources/Models/DeviceChallenge.swift b/authentikClient/Sources/Models/DeviceChallenge.swift new file mode 100644 index 0000000..b912dbd --- /dev/null +++ b/authentikClient/Sources/Models/DeviceChallenge.swift @@ -0,0 +1,41 @@ +// +// DeviceChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Single device challenge +public struct DeviceChallenge: Codable { + public var deviceClass: String + public var deviceUid: String + public var challenge: [String: AnyCodable] + + public init(deviceClass: String, deviceUid: String, challenge: [String: AnyCodable]) { + self.deviceClass = deviceClass + self.deviceUid = deviceUid + self.challenge = challenge + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deviceClass = "device_class" + case deviceUid = "device_uid" + case challenge + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + deviceClass = try container.decode(String.self, forKey: .deviceClass) + deviceUid = try container.decode(String.self, forKey: .deviceUid) + challenge = try container.decode([String: AnyCodable].self, forKey: .challenge) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deviceClass, forKey: .deviceClass) + try container.encode(deviceUid, forKey: .deviceUid) + try container.encode(challenge, forKey: .challenge) + } +} diff --git a/authentikClient/Sources/Models/DeviceChallengeRequest.swift b/authentikClient/Sources/Models/DeviceChallengeRequest.swift new file mode 100644 index 0000000..d702478 --- /dev/null +++ b/authentikClient/Sources/Models/DeviceChallengeRequest.swift @@ -0,0 +1,41 @@ +// +// DeviceChallengeRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Single device challenge +public struct DeviceChallengeRequest: Codable { + public var deviceClass: String + public var deviceUid: String + public var challenge: [String: AnyCodable] + + public init(deviceClass: String, deviceUid: String, challenge: [String: AnyCodable]) { + self.deviceClass = deviceClass + self.deviceUid = deviceUid + self.challenge = challenge + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deviceClass = "device_class" + case deviceUid = "device_uid" + case challenge + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + deviceClass = try container.decode(String.self, forKey: .deviceClass) + deviceUid = try container.decode(String.self, forKey: .deviceUid) + challenge = try container.decode([String: AnyCodable].self, forKey: .challenge) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deviceClass, forKey: .deviceClass) + try container.encode(deviceUid, forKey: .deviceUid) + try container.encode(challenge, forKey: .challenge) + } +} diff --git a/authentikClient/Sources/Models/DeviceClassesEnum.swift b/authentikClient/Sources/Models/DeviceClassesEnum.swift new file mode 100644 index 0000000..cdbaaee --- /dev/null +++ b/authentikClient/Sources/Models/DeviceClassesEnum.swift @@ -0,0 +1,19 @@ +// +// DeviceClassesEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `static` - Static * `totp` - TOTP * `webauthn` - WebAuthn * `duo` - Duo * `sms` - SMS * `mobile` - authentik Mobile +public enum DeviceClassesEnum: String, Codable, CaseIterable { + case _static = "static" + case totp = "totp" + case webauthn = "webauthn" + case duo = "duo" + case sms = "sms" + case mobile = "mobile" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/DigestAlgorithmEnum.swift b/authentikClient/Sources/Models/DigestAlgorithmEnum.swift new file mode 100644 index 0000000..24741c2 --- /dev/null +++ b/authentikClient/Sources/Models/DigestAlgorithmEnum.swift @@ -0,0 +1,17 @@ +// +// DigestAlgorithmEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 +public enum DigestAlgorithmEnum: String, Codable, CaseIterable { + case _2000_09_xmldsig_sha1 = "http://www.w3.org/2000/09/xmldsig#sha1" + case _2001_04_xmlenc_sha256 = "http://www.w3.org/2001/04/xmlenc#sha256" + case _2001_04_xmldsig_more_sha384 = "http://www.w3.org/2001/04/xmldsig-more#sha384" + case _2001_04_xmlenc_sha512 = "http://www.w3.org/2001/04/xmlenc#sha512" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/DigitsEnum.swift b/authentikClient/Sources/Models/DigitsEnum.swift new file mode 100644 index 0000000..763ccee --- /dev/null +++ b/authentikClient/Sources/Models/DigitsEnum.swift @@ -0,0 +1,15 @@ +// +// DigitsEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator +public enum DigitsEnum: String, Codable, CaseIterable { + case _6 = "6" + case _8 = "8" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/DockerServiceConnection.swift b/authentikClient/Sources/Models/DockerServiceConnection.swift new file mode 100644 index 0000000..8781d49 --- /dev/null +++ b/authentikClient/Sources/Models/DockerServiceConnection.swift @@ -0,0 +1,83 @@ +// +// DockerServiceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DockerServiceConnection Serializer +public struct DockerServiceConnection: Codable { + public var pk: UUID + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. + public var url: String + /// CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + public var tlsVerification: UUID? + /// Certificate/Key used for authentication. Can be left empty for no authentication. + public var tlsAuthentication: UUID? + + public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, url: String, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { + self.pk = pk + self.name = name + self.local = local + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.url = url + self.tlsVerification = tlsVerification + self.tlsAuthentication = tlsAuthentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case local + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case url + case tlsVerification = "tls_verification" + case tlsAuthentication = "tls_authentication" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + url = try container.decode(String.self, forKey: .url) + tlsVerification = try container.decodeIfPresent(UUID.self, forKey: .tlsVerification) + tlsAuthentication = try container.decodeIfPresent(UUID.self, forKey: .tlsAuthentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(url, forKey: .url) + try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) + try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) + } +} diff --git a/authentikClient/Sources/Models/DockerServiceConnectionRequest.swift b/authentikClient/Sources/Models/DockerServiceConnectionRequest.swift new file mode 100644 index 0000000..abde9af --- /dev/null +++ b/authentikClient/Sources/Models/DockerServiceConnectionRequest.swift @@ -0,0 +1,55 @@ +// +// DockerServiceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DockerServiceConnection Serializer +public struct DockerServiceConnectionRequest: Codable { + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + /// Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. + public var url: String + /// CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + public var tlsVerification: UUID? + /// Certificate/Key used for authentication. Can be left empty for no authentication. + public var tlsAuthentication: UUID? + + public init(name: String, local: Bool? = nil, url: String, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { + self.name = name + self.local = local + self.url = url + self.tlsVerification = tlsVerification + self.tlsAuthentication = tlsAuthentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case local + case url + case tlsVerification = "tls_verification" + case tlsAuthentication = "tls_authentication" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + url = try container.decode(String.self, forKey: .url) + tlsVerification = try container.decodeIfPresent(UUID.self, forKey: .tlsVerification) + tlsAuthentication = try container.decodeIfPresent(UUID.self, forKey: .tlsAuthentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encode(url, forKey: .url) + try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) + try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) + } +} diff --git a/authentikClient/Sources/Models/DummyChallenge.swift b/authentikClient/Sources/Models/DummyChallenge.swift new file mode 100644 index 0000000..1852461 --- /dev/null +++ b/authentikClient/Sources/Models/DummyChallenge.swift @@ -0,0 +1,46 @@ +// +// DummyChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Dummy challenge +public struct DummyChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-dummy" + public var responseErrors: [String: [ErrorDetail]]? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-dummy", responseErrors: [String: [ErrorDetail]]? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + } +} diff --git a/authentikClient/Sources/Models/DummyChallengeResponseRequest.swift b/authentikClient/Sources/Models/DummyChallengeResponseRequest.swift new file mode 100644 index 0000000..32fbc74 --- /dev/null +++ b/authentikClient/Sources/Models/DummyChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// DummyChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Dummy challenge response +public struct DummyChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-dummy" + + public init(component: String? = "ak-stage-dummy") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/DummyPolicy.swift b/authentikClient/Sources/Models/DummyPolicy.swift new file mode 100644 index 0000000..6fa776b --- /dev/null +++ b/authentikClient/Sources/Models/DummyPolicy.swift @@ -0,0 +1,87 @@ +// +// DummyPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Dummy Policy Serializer +public struct DummyPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + public var result: Bool? + public var waitMin: Int? + public var waitMax: Int? + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.result = result + self.waitMin = waitMin + self.waitMax = waitMax + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case result + case waitMin = "wait_min" + case waitMax = "wait_max" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + result = try container.decodeIfPresent(Bool.self, forKey: .result) + waitMin = try container.decodeIfPresent(Int.self, forKey: .waitMin) + waitMax = try container.decodeIfPresent(Int.self, forKey: .waitMax) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encodeIfPresent(result, forKey: .result) + try container.encodeIfPresent(waitMin, forKey: .waitMin) + try container.encodeIfPresent(waitMax, forKey: .waitMax) + } +} diff --git a/authentikClient/Sources/Models/DummyPolicyRequest.swift b/authentikClient/Sources/Models/DummyPolicyRequest.swift new file mode 100644 index 0000000..c5d1de0 --- /dev/null +++ b/authentikClient/Sources/Models/DummyPolicyRequest.swift @@ -0,0 +1,52 @@ +// +// DummyPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Dummy Policy Serializer +public struct DummyPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var result: Bool? + public var waitMin: Int? + public var waitMax: Int? + + public init(name: String, executionLogging: Bool? = nil, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.result = result + self.waitMin = waitMin + self.waitMax = waitMax + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case result + case waitMin = "wait_min" + case waitMax = "wait_max" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + result = try container.decodeIfPresent(Bool.self, forKey: .result) + waitMin = try container.decodeIfPresent(Int.self, forKey: .waitMin) + waitMax = try container.decodeIfPresent(Int.self, forKey: .waitMax) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(result, forKey: .result) + try container.encodeIfPresent(waitMin, forKey: .waitMin) + try container.encodeIfPresent(waitMax, forKey: .waitMax) + } +} diff --git a/authentikClient/Sources/Models/DummyStage.swift b/authentikClient/Sources/Models/DummyStage.swift new file mode 100644 index 0000000..5e71727 --- /dev/null +++ b/authentikClient/Sources/Models/DummyStage.swift @@ -0,0 +1,70 @@ +// +// DummyStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DummyStage Serializer +public struct DummyStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var throwError: Bool? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, throwError: Bool? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.throwError = throwError + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case throwError = "throw_error" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + throwError = try container.decodeIfPresent(Bool.self, forKey: .throwError) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(throwError, forKey: .throwError) + } +} diff --git a/authentikClient/Sources/Models/DummyStageRequest.swift b/authentikClient/Sources/Models/DummyStageRequest.swift new file mode 100644 index 0000000..682caf5 --- /dev/null +++ b/authentikClient/Sources/Models/DummyStageRequest.swift @@ -0,0 +1,41 @@ +// +// DummyStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DummyStage Serializer +public struct DummyStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var throwError: Bool? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, throwError: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.throwError = throwError + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case throwError = "throw_error" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + throwError = try container.decodeIfPresent(Bool.self, forKey: .throwError) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(throwError, forKey: .throwError) + } +} diff --git a/authentikClient/Sources/Models/DuoDevice.swift b/authentikClient/Sources/Models/DuoDevice.swift new file mode 100644 index 0000000..77542e5 --- /dev/null +++ b/authentikClient/Sources/Models/DuoDevice.swift @@ -0,0 +1,65 @@ +// +// DuoDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Duo authenticator devices +public struct DuoDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + } +} diff --git a/authentikClient/Sources/Models/DuoDeviceEnrollmentStatus.swift b/authentikClient/Sources/Models/DuoDeviceEnrollmentStatus.swift new file mode 100644 index 0000000..c75ac29 --- /dev/null +++ b/authentikClient/Sources/Models/DuoDeviceEnrollmentStatus.swift @@ -0,0 +1,30 @@ +// +// DuoDeviceEnrollmentStatus.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DuoDeviceEnrollmentStatus: Codable { + public var duoResponse: DuoResponseEnum + + public init(duoResponse: DuoResponseEnum) { + self.duoResponse = duoResponse + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case duoResponse = "duo_response" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + duoResponse = try container.decode(DuoResponseEnum.self, forKey: .duoResponse) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(duoResponse, forKey: .duoResponse) + } +} diff --git a/authentikClient/Sources/Models/DuoDeviceRequest.swift b/authentikClient/Sources/Models/DuoDeviceRequest.swift new file mode 100644 index 0000000..c94e277 --- /dev/null +++ b/authentikClient/Sources/Models/DuoDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// DuoDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Duo authenticator devices +public struct DuoDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/DuoResponseEnum.swift b/authentikClient/Sources/Models/DuoResponseEnum.swift new file mode 100644 index 0000000..4de816b --- /dev/null +++ b/authentikClient/Sources/Models/DuoResponseEnum.swift @@ -0,0 +1,16 @@ +// +// DuoResponseEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `success` - Success * `waiting` - Waiting * `invalid` - Invalid +public enum DuoResponseEnum: String, Codable, CaseIterable { + case success = "success" + case waiting = "waiting" + case invalid = "invalid" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/EmailChallenge.swift b/authentikClient/Sources/Models/EmailChallenge.swift new file mode 100644 index 0000000..9159324 --- /dev/null +++ b/authentikClient/Sources/Models/EmailChallenge.swift @@ -0,0 +1,46 @@ +// +// EmailChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Email challenge +public struct EmailChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-email" + public var responseErrors: [String: [ErrorDetail]]? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-email", responseErrors: [String: [ErrorDetail]]? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + } +} diff --git a/authentikClient/Sources/Models/EmailChallengeResponseRequest.swift b/authentikClient/Sources/Models/EmailChallengeResponseRequest.swift new file mode 100644 index 0000000..dffb7ca --- /dev/null +++ b/authentikClient/Sources/Models/EmailChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// EmailChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Email challenge resposen. No fields. This challenge is always declared invalid to give the user a chance to retry +public struct EmailChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-email" + + public init(component: String? = "ak-stage-email") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/EmailStage.swift b/authentikClient/Sources/Models/EmailStage.swift new file mode 100644 index 0000000..52609e1 --- /dev/null +++ b/authentikClient/Sources/Models/EmailStage.swift @@ -0,0 +1,128 @@ +// +// EmailStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// EmailStage Serializer +public struct EmailStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// When enabled, global Email connection settings will be used and connection settings below will be ignored. + public var useGlobalSettings: Bool? + public var host: String? + public var port: Int? + public var username: String? + public var useTls: Bool? + public var useSsl: Bool? + public var timeout: Int? + public var fromAddress: String? + /// Time in minutes the token sent is valid. + public var tokenExpiry: Int? + public var subject: String? + public var template: String? + /// Activate users upon completion of stage. + public var activateUserOnSuccess: Bool? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.useGlobalSettings = useGlobalSettings + self.host = host + self.port = port + self.username = username + self.useTls = useTls + self.useSsl = useSsl + self.timeout = timeout + self.fromAddress = fromAddress + self.tokenExpiry = tokenExpiry + self.subject = subject + self.template = template + self.activateUserOnSuccess = activateUserOnSuccess + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case useGlobalSettings = "use_global_settings" + case host + case port + case username + case useTls = "use_tls" + case useSsl = "use_ssl" + case timeout + case fromAddress = "from_address" + case tokenExpiry = "token_expiry" + case subject + case template + case activateUserOnSuccess = "activate_user_on_success" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + useGlobalSettings = try container.decodeIfPresent(Bool.self, forKey: .useGlobalSettings) + host = try container.decodeIfPresent(String.self, forKey: .host) + port = try container.decodeIfPresent(Int.self, forKey: .port) + username = try container.decodeIfPresent(String.self, forKey: .username) + useTls = try container.decodeIfPresent(Bool.self, forKey: .useTls) + useSsl = try container.decodeIfPresent(Bool.self, forKey: .useSsl) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + fromAddress = try container.decodeIfPresent(String.self, forKey: .fromAddress) + tokenExpiry = try container.decodeIfPresent(Int.self, forKey: .tokenExpiry) + subject = try container.decodeIfPresent(String.self, forKey: .subject) + template = try container.decodeIfPresent(String.self, forKey: .template) + activateUserOnSuccess = try container.decodeIfPresent(Bool.self, forKey: .activateUserOnSuccess) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) + try container.encodeIfPresent(host, forKey: .host) + try container.encodeIfPresent(port, forKey: .port) + try container.encodeIfPresent(username, forKey: .username) + try container.encodeIfPresent(useTls, forKey: .useTls) + try container.encodeIfPresent(useSsl, forKey: .useSsl) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(fromAddress, forKey: .fromAddress) + try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) + try container.encodeIfPresent(subject, forKey: .subject) + try container.encodeIfPresent(template, forKey: .template) + try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) + } +} diff --git a/authentikClient/Sources/Models/EmailStageRequest.swift b/authentikClient/Sources/Models/EmailStageRequest.swift new file mode 100644 index 0000000..fe59a18 --- /dev/null +++ b/authentikClient/Sources/Models/EmailStageRequest.swift @@ -0,0 +1,104 @@ +// +// EmailStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// EmailStage Serializer +public struct EmailStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// When enabled, global Email connection settings will be used and connection settings below will be ignored. + public var useGlobalSettings: Bool? + public var host: String? + public var port: Int? + public var username: String? + public var password: String? + public var useTls: Bool? + public var useSsl: Bool? + public var timeout: Int? + public var fromAddress: String? + /// Time in minutes the token sent is valid. + public var tokenExpiry: Int? + public var subject: String? + public var template: String? + /// Activate users upon completion of stage. + public var activateUserOnSuccess: Bool? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, password: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.useGlobalSettings = useGlobalSettings + self.host = host + self.port = port + self.username = username + self.password = password + self.useTls = useTls + self.useSsl = useSsl + self.timeout = timeout + self.fromAddress = fromAddress + self.tokenExpiry = tokenExpiry + self.subject = subject + self.template = template + self.activateUserOnSuccess = activateUserOnSuccess + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case useGlobalSettings = "use_global_settings" + case host + case port + case username + case password + case useTls = "use_tls" + case useSsl = "use_ssl" + case timeout + case fromAddress = "from_address" + case tokenExpiry = "token_expiry" + case subject + case template + case activateUserOnSuccess = "activate_user_on_success" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + useGlobalSettings = try container.decodeIfPresent(Bool.self, forKey: .useGlobalSettings) + host = try container.decodeIfPresent(String.self, forKey: .host) + port = try container.decodeIfPresent(Int.self, forKey: .port) + username = try container.decodeIfPresent(String.self, forKey: .username) + password = try container.decodeIfPresent(String.self, forKey: .password) + useTls = try container.decodeIfPresent(Bool.self, forKey: .useTls) + useSsl = try container.decodeIfPresent(Bool.self, forKey: .useSsl) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + fromAddress = try container.decodeIfPresent(String.self, forKey: .fromAddress) + tokenExpiry = try container.decodeIfPresent(Int.self, forKey: .tokenExpiry) + subject = try container.decodeIfPresent(String.self, forKey: .subject) + template = try container.decodeIfPresent(String.self, forKey: .template) + activateUserOnSuccess = try container.decodeIfPresent(Bool.self, forKey: .activateUserOnSuccess) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) + try container.encodeIfPresent(host, forKey: .host) + try container.encodeIfPresent(port, forKey: .port) + try container.encodeIfPresent(username, forKey: .username) + try container.encodeIfPresent(password, forKey: .password) + try container.encodeIfPresent(useTls, forKey: .useTls) + try container.encodeIfPresent(useSsl, forKey: .useSsl) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(fromAddress, forKey: .fromAddress) + try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) + try container.encodeIfPresent(subject, forKey: .subject) + try container.encodeIfPresent(template, forKey: .template) + try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) + } +} diff --git a/authentikClient/Sources/Models/ErrorDetail.swift b/authentikClient/Sources/Models/ErrorDetail.swift new file mode 100644 index 0000000..10c8c02 --- /dev/null +++ b/authentikClient/Sources/Models/ErrorDetail.swift @@ -0,0 +1,19 @@ +// +// ErrorDetail.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for rest_framework's error messages +public struct ErrorDetail: Codable { + public var string: String + public var code: String + + public init(string: String, code: String) { + self.string = string + self.code = code + } +} diff --git a/authentikClient/Sources/Models/ErrorReportingConfig.swift b/authentikClient/Sources/Models/ErrorReportingConfig.swift new file mode 100644 index 0000000..1cf6f57 --- /dev/null +++ b/authentikClient/Sources/Models/ErrorReportingConfig.swift @@ -0,0 +1,51 @@ +// +// ErrorReportingConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Config for error reporting +public struct ErrorReportingConfig: Codable { + public var enabled: Bool + public var sentryDsn: String + public var environment: String + public var sendPii: Bool + public var tracesSampleRate: Double + + public init(enabled: Bool, sentryDsn: String, environment: String, sendPii: Bool, tracesSampleRate: Double) { + self.enabled = enabled + self.sentryDsn = sentryDsn + self.environment = environment + self.sendPii = sendPii + self.tracesSampleRate = tracesSampleRate + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case sentryDsn = "sentry_dsn" + case environment + case sendPii = "send_pii" + case tracesSampleRate = "traces_sample_rate" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + enabled = try container.decode(Bool.self, forKey: .enabled) + sentryDsn = try container.decode(String.self, forKey: .sentryDsn) + environment = try container.decode(String.self, forKey: .environment) + sendPii = try container.decode(Bool.self, forKey: .sendPii) + tracesSampleRate = try container.decode(Double.self, forKey: .tracesSampleRate) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(enabled, forKey: .enabled) + try container.encode(sentryDsn, forKey: .sentryDsn) + try container.encode(environment, forKey: .environment) + try container.encode(sendPii, forKey: .sendPii) + try container.encode(tracesSampleRate, forKey: .tracesSampleRate) + } +} diff --git a/authentikClient/Sources/Models/Event.swift b/authentikClient/Sources/Models/Event.swift new file mode 100644 index 0000000..cc8e43f --- /dev/null +++ b/authentikClient/Sources/Models/Event.swift @@ -0,0 +1,71 @@ +// +// Event.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Serializer +public struct Event: Codable { + public var pk: UUID + public var user: [String: AnyCodable]? + public var action: EventActions + public var app: String + public var context: [String: AnyCodable]? + public var clientIp: String? + public var created: Date + public var expires: Date? + public var tenant: [String: AnyCodable]? + + public init(pk: UUID, user: [String: AnyCodable]? = nil, action: EventActions, app: String, context: [String: AnyCodable]? = nil, clientIp: String? = nil, created: Date, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { + self.pk = pk + self.user = user + self.action = action + self.app = app + self.context = context + self.clientIp = clientIp + self.created = created + self.expires = expires + self.tenant = tenant + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case user + case action + case app + case context + case clientIp = "client_ip" + case created + case expires + case tenant + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + user = try container.decodeIfPresent([String: AnyCodable].self, forKey: .user) + action = try container.decode(EventActions.self, forKey: .action) + app = try container.decode(String.self, forKey: .app) + context = try container.decodeIfPresent([String: AnyCodable].self, forKey: .context) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + created = try container.decode(Date.self, forKey: .created) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + tenant = try container.decodeIfPresent([String: AnyCodable].self, forKey: .tenant) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(user, forKey: .user) + try container.encode(action, forKey: .action) + try container.encode(app, forKey: .app) + try container.encodeIfPresent(context, forKey: .context) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encode(created, forKey: .created) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(tenant, forKey: .tenant) + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/EventActions.swift b/authentikClient/Sources/Models/EventActions.swift similarity index 92% rename from authentikClient/Classes/OpenAPIs/Models/EventActions.swift rename to authentikClient/Sources/Models/EventActions.swift index 14e7086..1c1a304 100644 --- a/authentikClient/Classes/OpenAPIs/Models/EventActions.swift +++ b/authentikClient/Sources/Models/EventActions.swift @@ -6,12 +6,9 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -/** * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix */ -public enum EventActions: String, Codable, CaseIterable, CaseIterableDefaultsLast { +/// * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix +public enum EventActions: String, Codable, CaseIterable { case login = "login" case loginFailed = "login_failed" case logout = "logout" diff --git a/authentikClient/Sources/Models/EventMatcherPolicy.swift b/authentikClient/Sources/Models/EventMatcherPolicy.swift new file mode 100644 index 0000000..8dfd860 --- /dev/null +++ b/authentikClient/Sources/Models/EventMatcherPolicy.swift @@ -0,0 +1,93 @@ +// +// EventMatcherPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Matcher Policy Serializer +public struct EventMatcherPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + public var action: EventActions? + /// Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + public var clientIp: String? + public var app: AppEnum? + public var model: ModelEnum? + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.action = action + self.clientIp = clientIp + self.app = app + self.model = model + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case action + case clientIp = "client_ip" + case app + case model + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + action = try container.decodeIfPresent(EventActions.self, forKey: .action) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + app = try container.decodeIfPresent(AppEnum.self, forKey: .app) + model = try container.decodeIfPresent(ModelEnum.self, forKey: .model) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encodeIfPresent(action, forKey: .action) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encodeIfPresent(app, forKey: .app) + try container.encodeIfPresent(model, forKey: .model) + } +} diff --git a/authentikClient/Sources/Models/EventMatcherPolicyRequest.swift b/authentikClient/Sources/Models/EventMatcherPolicyRequest.swift new file mode 100644 index 0000000..e2ecd35 --- /dev/null +++ b/authentikClient/Sources/Models/EventMatcherPolicyRequest.swift @@ -0,0 +1,58 @@ +// +// EventMatcherPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Matcher Policy Serializer +public struct EventMatcherPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var action: EventActions? + /// Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + public var clientIp: String? + public var app: AppEnum? + public var model: ModelEnum? + + public init(name: String, executionLogging: Bool? = nil, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { + self.name = name + self.executionLogging = executionLogging + self.action = action + self.clientIp = clientIp + self.app = app + self.model = model + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case action + case clientIp = "client_ip" + case app + case model + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + action = try container.decodeIfPresent(EventActions.self, forKey: .action) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + app = try container.decodeIfPresent(AppEnum.self, forKey: .app) + model = try container.decodeIfPresent(ModelEnum.self, forKey: .model) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(action, forKey: .action) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encodeIfPresent(app, forKey: .app) + try container.encodeIfPresent(model, forKey: .model) + } +} diff --git a/authentikClient/Sources/Models/EventRequest.swift b/authentikClient/Sources/Models/EventRequest.swift new file mode 100644 index 0000000..9077c8e --- /dev/null +++ b/authentikClient/Sources/Models/EventRequest.swift @@ -0,0 +1,61 @@ +// +// EventRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Serializer +public struct EventRequest: Codable { + public var user: [String: AnyCodable]? + public var action: EventActions + public var app: String + public var context: [String: AnyCodable]? + public var clientIp: String? + public var expires: Date? + public var tenant: [String: AnyCodable]? + + public init(user: [String: AnyCodable]? = nil, action: EventActions, app: String, context: [String: AnyCodable]? = nil, clientIp: String? = nil, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { + self.user = user + self.action = action + self.app = app + self.context = context + self.clientIp = clientIp + self.expires = expires + self.tenant = tenant + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case user + case action + case app + case context + case clientIp = "client_ip" + case expires + case tenant + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + user = try container.decodeIfPresent([String: AnyCodable].self, forKey: .user) + action = try container.decode(EventActions.self, forKey: .action) + app = try container.decode(String.self, forKey: .app) + context = try container.decodeIfPresent([String: AnyCodable].self, forKey: .context) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + tenant = try container.decodeIfPresent([String: AnyCodable].self, forKey: .tenant) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(user, forKey: .user) + try container.encode(action, forKey: .action) + try container.encode(app, forKey: .app) + try container.encodeIfPresent(context, forKey: .context) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(tenant, forKey: .tenant) + } +} diff --git a/authentikClient/Sources/Models/EventTopPerUser.swift b/authentikClient/Sources/Models/EventTopPerUser.swift new file mode 100644 index 0000000..379b376 --- /dev/null +++ b/authentikClient/Sources/Models/EventTopPerUser.swift @@ -0,0 +1,41 @@ +// +// EventTopPerUser.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Response object of Event's top_per_user +public struct EventTopPerUser: Codable { + public var application: [String: AnyCodable] + public var countedEvents: Int + public var uniqueUsers: Int + + public init(application: [String: AnyCodable], countedEvents: Int, uniqueUsers: Int) { + self.application = application + self.countedEvents = countedEvents + self.uniqueUsers = uniqueUsers + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case application + case countedEvents = "counted_events" + case uniqueUsers = "unique_users" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + application = try container.decode([String: AnyCodable].self, forKey: .application) + countedEvents = try container.decode(Int.self, forKey: .countedEvents) + uniqueUsers = try container.decode(Int.self, forKey: .uniqueUsers) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(application, forKey: .application) + try container.encode(countedEvents, forKey: .countedEvents) + try container.encode(uniqueUsers, forKey: .uniqueUsers) + } +} diff --git a/authentikClient/Sources/Models/ExpiringBaseGrantModel.swift b/authentikClient/Sources/Models/ExpiringBaseGrantModel.swift new file mode 100644 index 0000000..0663c43 --- /dev/null +++ b/authentikClient/Sources/Models/ExpiringBaseGrantModel.swift @@ -0,0 +1,57 @@ +// +// ExpiringBaseGrantModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for BaseGrantModel and ExpiringBaseGrant +public struct ExpiringBaseGrantModel: Codable { + public var pk: Int + public var provider: OAuth2Provider + public var user: User + /// Check if token is expired yet. + public var isExpired: Bool + public var expires: Date? + public var scope: [String] + + public init(pk: Int, provider: OAuth2Provider, user: User, isExpired: Bool, expires: Date? = nil, scope: [String]) { + self.pk = pk + self.provider = provider + self.user = user + self.isExpired = isExpired + self.expires = expires + self.scope = scope + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case provider + case user + case isExpired = "is_expired" + case expires + case scope + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + provider = try container.decode(OAuth2Provider.self, forKey: .provider) + user = try container.decode(User.self, forKey: .user) + isExpired = try container.decode(Bool.self, forKey: .isExpired) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + scope = try container.decode([String].self, forKey: .scope) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(provider, forKey: .provider) + try container.encode(user, forKey: .user) + try container.encode(isExpired, forKey: .isExpired) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encode(scope, forKey: .scope) + } +} diff --git a/authentikClient/Sources/Models/ExpressionPolicy.swift b/authentikClient/Sources/Models/ExpressionPolicy.swift new file mode 100644 index 0000000..f94c757 --- /dev/null +++ b/authentikClient/Sources/Models/ExpressionPolicy.swift @@ -0,0 +1,77 @@ +// +// ExpressionPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Membership Policy Serializer +public struct ExpressionPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + public var expression: String + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, expression: String) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.expression = expression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case expression + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + expression = try container.decode(String.self, forKey: .expression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encode(expression, forKey: .expression) + } +} diff --git a/authentikClient/Sources/Models/ExpressionPolicyRequest.swift b/authentikClient/Sources/Models/ExpressionPolicyRequest.swift new file mode 100644 index 0000000..3ad8c52 --- /dev/null +++ b/authentikClient/Sources/Models/ExpressionPolicyRequest.swift @@ -0,0 +1,42 @@ +// +// ExpressionPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Membership Policy Serializer +public struct ExpressionPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var expression: String + + public init(name: String, executionLogging: Bool? = nil, expression: String) { + self.name = name + self.executionLogging = executionLogging + self.expression = expression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case expression + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + expression = try container.decode(String.self, forKey: .expression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(expression, forKey: .expression) + } +} diff --git a/authentikClient/Sources/Models/ExtraRoleObjectPermission.swift b/authentikClient/Sources/Models/ExtraRoleObjectPermission.swift new file mode 100644 index 0000000..a903082 --- /dev/null +++ b/authentikClient/Sources/Models/ExtraRoleObjectPermission.swift @@ -0,0 +1,74 @@ +// +// ExtraRoleObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User permission with additional object-related data +public struct ExtraRoleObjectPermission: Codable { + public var id: Int + public var codename: String + public var model: String + public var appLabel: String + public var objectPk: String + public var name: String + /// Get app label from permission's model + public var appLabelVerbose: String + /// Get model label from permission's model + public var modelVerbose: String + /// Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object + public var objectDescription: String? + + public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String, appLabelVerbose: String, modelVerbose: String, objectDescription: String?) { + self.id = id + self.codename = codename + self.model = model + self.appLabel = appLabel + self.objectPk = objectPk + self.name = name + self.appLabelVerbose = appLabelVerbose + self.modelVerbose = modelVerbose + self.objectDescription = objectDescription + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case codename + case model + case appLabel = "app_label" + case objectPk = "object_pk" + case name + case appLabelVerbose = "app_label_verbose" + case modelVerbose = "model_verbose" + case objectDescription = "object_description" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + id = try container.decode(Int.self, forKey: .id) + codename = try container.decode(String.self, forKey: .codename) + model = try container.decode(String.self, forKey: .model) + appLabel = try container.decode(String.self, forKey: .appLabel) + objectPk = try container.decode(String.self, forKey: .objectPk) + name = try container.decode(String.self, forKey: .name) + appLabelVerbose = try container.decode(String.self, forKey: .appLabelVerbose) + modelVerbose = try container.decode(String.self, forKey: .modelVerbose) + objectDescription = try container.decode(String.self, forKey: .objectDescription) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(codename, forKey: .codename) + try container.encode(model, forKey: .model) + try container.encode(appLabel, forKey: .appLabel) + try container.encode(objectPk, forKey: .objectPk) + try container.encode(name, forKey: .name) + try container.encode(appLabelVerbose, forKey: .appLabelVerbose) + try container.encode(modelVerbose, forKey: .modelVerbose) + try container.encode(objectDescription, forKey: .objectDescription) + } +} diff --git a/authentikClient/Sources/Models/ExtraUserObjectPermission.swift b/authentikClient/Sources/Models/ExtraUserObjectPermission.swift new file mode 100644 index 0000000..efeba03 --- /dev/null +++ b/authentikClient/Sources/Models/ExtraUserObjectPermission.swift @@ -0,0 +1,74 @@ +// +// ExtraUserObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User permission with additional object-related data +public struct ExtraUserObjectPermission: Codable { + public var id: Int + public var codename: String + public var model: String + public var appLabel: String + public var objectPk: String + public var name: String + /// Get app label from permission's model + public var appLabelVerbose: String + /// Get model label from permission's model + public var modelVerbose: String + /// Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object + public var objectDescription: String? + + public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String, appLabelVerbose: String, modelVerbose: String, objectDescription: String?) { + self.id = id + self.codename = codename + self.model = model + self.appLabel = appLabel + self.objectPk = objectPk + self.name = name + self.appLabelVerbose = appLabelVerbose + self.modelVerbose = modelVerbose + self.objectDescription = objectDescription + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case codename + case model + case appLabel = "app_label" + case objectPk = "object_pk" + case name + case appLabelVerbose = "app_label_verbose" + case modelVerbose = "model_verbose" + case objectDescription = "object_description" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + id = try container.decode(Int.self, forKey: .id) + codename = try container.decode(String.self, forKey: .codename) + model = try container.decode(String.self, forKey: .model) + appLabel = try container.decode(String.self, forKey: .appLabel) + objectPk = try container.decode(String.self, forKey: .objectPk) + name = try container.decode(String.self, forKey: .name) + appLabelVerbose = try container.decode(String.self, forKey: .appLabelVerbose) + modelVerbose = try container.decode(String.self, forKey: .modelVerbose) + objectDescription = try container.decode(String.self, forKey: .objectDescription) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(codename, forKey: .codename) + try container.encode(model, forKey: .model) + try container.encode(appLabel, forKey: .appLabel) + try container.encode(objectPk, forKey: .objectPk) + try container.encode(name, forKey: .name) + try container.encode(appLabelVerbose, forKey: .appLabelVerbose) + try container.encode(modelVerbose, forKey: .modelVerbose) + try container.encode(objectDescription, forKey: .objectDescription) + } +} diff --git a/authentikClient/Sources/Models/FilePathRequest.swift b/authentikClient/Sources/Models/FilePathRequest.swift new file mode 100644 index 0000000..134778a --- /dev/null +++ b/authentikClient/Sources/Models/FilePathRequest.swift @@ -0,0 +1,17 @@ +// +// FilePathRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer to upload file +public struct FilePathRequest: Codable { + public var url: String + + public init(url: String) { + self.url = url + } +} diff --git a/authentikClient/Sources/Models/Flow.swift b/authentikClient/Sources/Models/Flow.swift new file mode 100644 index 0000000..3414942 --- /dev/null +++ b/authentikClient/Sources/Models/Flow.swift @@ -0,0 +1,112 @@ +// +// Flow.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Flow Serializer +public struct Flow: Codable { + public var pk: UUID + public var policybindingmodelPtrId: UUID + public var name: String + /// Visible in the URL. + public var slug: String + /// Shown as the Title in Flow pages. + public var title: String + public var designation: FlowDesignationEnum + /// Get the URL to the background image. If the name is /static or starts with http it is returned as-is + public var background: String + public var stages: [UUID] + public var policies: [UUID] + /// Get count of cached flows + public var cacheCount: Int + public var policyEngineMode: PolicyEngineMode? + /// Enable compatibility mode, increases compatibility with password managers on mobile devices. + public var compatibilityMode: Bool? + /// Get export URL for flow + public var exportUrl: String + public var layout: LayoutEnum? + public var deniedAction: DeniedActionEnum? + public var authentication: AuthenticationEnum? + + public init(pk: UUID, policybindingmodelPtrId: UUID, name: String, slug: String, title: String, designation: FlowDesignationEnum, background: String, stages: [UUID], policies: [UUID], cacheCount: Int, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, exportUrl: String, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { + self.pk = pk + self.policybindingmodelPtrId = policybindingmodelPtrId + self.name = name + self.slug = slug + self.title = title + self.designation = designation + self.background = background + self.stages = stages + self.policies = policies + self.cacheCount = cacheCount + self.policyEngineMode = policyEngineMode + self.compatibilityMode = compatibilityMode + self.exportUrl = exportUrl + self.layout = layout + self.deniedAction = deniedAction + self.authentication = authentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case policybindingmodelPtrId = "policybindingmodel_ptr_id" + case name + case slug + case title + case designation + case background + case stages + case policies + case cacheCount = "cache_count" + case policyEngineMode = "policy_engine_mode" + case compatibilityMode = "compatibility_mode" + case exportUrl = "export_url" + case layout + case deniedAction = "denied_action" + case authentication + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + policybindingmodelPtrId = try container.decode(UUID.self, forKey: .policybindingmodelPtrId) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + title = try container.decode(String.self, forKey: .title) + designation = try container.decode(FlowDesignationEnum.self, forKey: .designation) + background = try container.decode(String.self, forKey: .background) + stages = try container.decode([UUID].self, forKey: .stages) + policies = try container.decode([UUID].self, forKey: .policies) + cacheCount = try container.decode(Int.self, forKey: .cacheCount) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + compatibilityMode = try container.decodeIfPresent(Bool.self, forKey: .compatibilityMode) + exportUrl = try container.decode(String.self, forKey: .exportUrl) + layout = try container.decodeIfPresent(LayoutEnum.self, forKey: .layout) + deniedAction = try container.decodeIfPresent(DeniedActionEnum.self, forKey: .deniedAction) + authentication = try container.decodeIfPresent(AuthenticationEnum.self, forKey: .authentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(title, forKey: .title) + try container.encode(designation, forKey: .designation) + try container.encode(background, forKey: .background) + try container.encode(stages, forKey: .stages) + try container.encode(policies, forKey: .policies) + try container.encode(cacheCount, forKey: .cacheCount) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) + try container.encode(exportUrl, forKey: .exportUrl) + try container.encodeIfPresent(layout, forKey: .layout) + try container.encodeIfPresent(deniedAction, forKey: .deniedAction) + try container.encodeIfPresent(authentication, forKey: .authentication) + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/FlowChallengeResponseRequest.swift b/authentikClient/Sources/Models/FlowChallengeResponseRequest.swift similarity index 94% rename from authentikClient/Classes/OpenAPIs/Models/FlowChallengeResponseRequest.swift rename to authentikClient/Sources/Models/FlowChallengeResponseRequest.swift index 1715359..ad51715 100644 --- a/authentikClient/Classes/OpenAPIs/Models/FlowChallengeResponseRequest.swift +++ b/authentikClient/Sources/Models/FlowChallengeResponseRequest.swift @@ -6,13 +6,11 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -public enum FlowChallengeResponseRequest: Codable, JSONEncodable, Hashable { +public enum FlowChallengeResponseRequest: Codable { case typeAppleChallengeResponseRequest(AppleChallengeResponseRequest) case typeAuthenticatorDuoChallengeResponseRequest(AuthenticatorDuoChallengeResponseRequest) + case typeAuthenticatorMobileChallengeResponseRequest(AuthenticatorMobileChallengeResponseRequest) case typeAuthenticatorSMSChallengeResponseRequest(AuthenticatorSMSChallengeResponseRequest) case typeAuthenticatorStaticChallengeResponseRequest(AuthenticatorStaticChallengeResponseRequest) case typeAuthenticatorTOTPChallengeResponseRequest(AuthenticatorTOTPChallengeResponseRequest) @@ -38,6 +36,8 @@ public enum FlowChallengeResponseRequest: Codable, JSONEncodable, Hashable { try container.encode(value) case .typeAuthenticatorDuoChallengeResponseRequest(let value): try container.encode(value) + case .typeAuthenticatorMobileChallengeResponseRequest(let value): + try container.encode(value) case .typeAuthenticatorSMSChallengeResponseRequest(let value): try container.encode(value) case .typeAuthenticatorStaticChallengeResponseRequest(let value): @@ -81,6 +81,8 @@ public enum FlowChallengeResponseRequest: Codable, JSONEncodable, Hashable { self = .typeAppleChallengeResponseRequest(value) } else if let value = try? container.decode(AuthenticatorDuoChallengeResponseRequest.self) { self = .typeAuthenticatorDuoChallengeResponseRequest(value) + } else if let value = try? container.decode(AuthenticatorMobileChallengeResponseRequest.self) { + self = .typeAuthenticatorMobileChallengeResponseRequest(value) } else if let value = try? container.decode(AuthenticatorSMSChallengeResponseRequest.self) { self = .typeAuthenticatorSMSChallengeResponseRequest(value) } else if let value = try? container.decode(AuthenticatorStaticChallengeResponseRequest.self) { @@ -120,4 +122,3 @@ public enum FlowChallengeResponseRequest: Codable, JSONEncodable, Hashable { } } } - diff --git a/authentikClient/Sources/Models/FlowDesignationEnum.swift b/authentikClient/Sources/Models/FlowDesignationEnum.swift new file mode 100644 index 0000000..b186334 --- /dev/null +++ b/authentikClient/Sources/Models/FlowDesignationEnum.swift @@ -0,0 +1,20 @@ +// +// FlowDesignationEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration +public enum FlowDesignationEnum: String, Codable, CaseIterable { + case authentication = "authentication" + case authorization = "authorization" + case invalidation = "invalidation" + case enrollment = "enrollment" + case unenrollment = "unenrollment" + case recovery = "recovery" + case stageConfiguration = "stage_configuration" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/FlowDiagram.swift b/authentikClient/Sources/Models/FlowDiagram.swift new file mode 100644 index 0000000..893ce72 --- /dev/null +++ b/authentikClient/Sources/Models/FlowDiagram.swift @@ -0,0 +1,17 @@ +// +// FlowDiagram.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// response of the flow's diagram action +public struct FlowDiagram: Codable { + public var diagram: String + + public init(diagram: String) { + self.diagram = diagram + } +} diff --git a/authentikClient/Sources/Models/FlowErrorChallenge.swift b/authentikClient/Sources/Models/FlowErrorChallenge.swift new file mode 100644 index 0000000..de7a911 --- /dev/null +++ b/authentikClient/Sources/Models/FlowErrorChallenge.swift @@ -0,0 +1,61 @@ +// +// FlowErrorChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge class when an unhandled error occurs during a stage. Normal users are shown an error message, superusers are shown a full stacktrace. +public struct FlowErrorChallenge: Codable { + public var type: String? = "native" + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-flow-error" + public var responseErrors: [String: [ErrorDetail]]? + public var requestId: String + public var error: String? + public var traceback: String? + + public init(type: String? = "native", flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-flow-error", responseErrors: [String: [ErrorDetail]]? = nil, requestId: String, error: String? = nil, traceback: String? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.requestId = requestId + self.error = error + self.traceback = traceback + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case requestId = "request_id" + case error + case traceback + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decodeIfPresent(String.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + requestId = try container.decode(String.self, forKey: .requestId) + error = try container.decodeIfPresent(String.self, forKey: .error) + traceback = try container.decodeIfPresent(String.self, forKey: .traceback) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(requestId, forKey: .requestId) + try container.encodeIfPresent(error, forKey: .error) + try container.encodeIfPresent(traceback, forKey: .traceback) + } +} diff --git a/authentikClient/Sources/Models/FlowImportResult.swift b/authentikClient/Sources/Models/FlowImportResult.swift new file mode 100644 index 0000000..d3b9c71 --- /dev/null +++ b/authentikClient/Sources/Models/FlowImportResult.swift @@ -0,0 +1,19 @@ +// +// FlowImportResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Logs of an attempted flow import +public struct FlowImportResult: Codable { + public var logs: [[String: AnyCodable]] + public var success: Bool + + public init(logs: [[String: AnyCodable]], success: Bool) { + self.logs = logs + self.success = success + } +} diff --git a/authentikClient/Sources/Models/FlowInspection.swift b/authentikClient/Sources/Models/FlowInspection.swift new file mode 100644 index 0000000..10be002 --- /dev/null +++ b/authentikClient/Sources/Models/FlowInspection.swift @@ -0,0 +1,41 @@ +// +// FlowInspection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for inspect endpoint +public struct FlowInspection: Codable { + public var plans: [FlowInspectorPlan] + public var currentPlan: FlowInspectorPlan? + public var isCompleted: Bool + + public init(plans: [FlowInspectorPlan], currentPlan: FlowInspectorPlan? = nil, isCompleted: Bool) { + self.plans = plans + self.currentPlan = currentPlan + self.isCompleted = isCompleted + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case plans + case currentPlan = "current_plan" + case isCompleted = "is_completed" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + plans = try container.decode([FlowInspectorPlan].self, forKey: .plans) + currentPlan = try container.decodeIfPresent(FlowInspectorPlan.self, forKey: .currentPlan) + isCompleted = try container.decode(Bool.self, forKey: .isCompleted) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(plans, forKey: .plans) + try container.encodeIfPresent(currentPlan, forKey: .currentPlan) + try container.encode(isCompleted, forKey: .isCompleted) + } +} diff --git a/authentikClient/Sources/Models/FlowInspectorPlan.swift b/authentikClient/Sources/Models/FlowInspectorPlan.swift new file mode 100644 index 0000000..e67b952 --- /dev/null +++ b/authentikClient/Sources/Models/FlowInspectorPlan.swift @@ -0,0 +1,48 @@ +// +// FlowInspectorPlan.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for an active FlowPlan +public struct FlowInspectorPlan: Codable { + public var currentStage: FlowStageBinding + public var nextPlannedStage: FlowStageBinding + /// Get the plan's context, sanitized + public var planContext: [String: AnyCodable] + /// Get a unique session ID + public var sessionId: String + + public init(currentStage: FlowStageBinding, nextPlannedStage: FlowStageBinding, planContext: [String: AnyCodable], sessionId: String) { + self.currentStage = currentStage + self.nextPlannedStage = nextPlannedStage + self.planContext = planContext + self.sessionId = sessionId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case currentStage = "current_stage" + case nextPlannedStage = "next_planned_stage" + case planContext = "plan_context" + case sessionId = "session_id" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + currentStage = try container.decode(FlowStageBinding.self, forKey: .currentStage) + nextPlannedStage = try container.decode(FlowStageBinding.self, forKey: .nextPlannedStage) + planContext = try container.decode([String: AnyCodable].self, forKey: .planContext) + sessionId = try container.decode(String.self, forKey: .sessionId) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(currentStage, forKey: .currentStage) + try container.encode(nextPlannedStage, forKey: .nextPlannedStage) + try container.encode(planContext, forKey: .planContext) + try container.encode(sessionId, forKey: .sessionId) + } +} diff --git a/authentikClient/Sources/Models/FlowRequest.swift b/authentikClient/Sources/Models/FlowRequest.swift new file mode 100644 index 0000000..f96d9a3 --- /dev/null +++ b/authentikClient/Sources/Models/FlowRequest.swift @@ -0,0 +1,74 @@ +// +// FlowRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Flow Serializer +public struct FlowRequest: Codable { + public var name: String + /// Visible in the URL. + public var slug: String + /// Shown as the Title in Flow pages. + public var title: String + public var designation: FlowDesignationEnum + public var policyEngineMode: PolicyEngineMode? + /// Enable compatibility mode, increases compatibility with password managers on mobile devices. + public var compatibilityMode: Bool? + public var layout: LayoutEnum? + public var deniedAction: DeniedActionEnum? + public var authentication: AuthenticationEnum? + + public init(name: String, slug: String, title: String, designation: FlowDesignationEnum, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { + self.name = name + self.slug = slug + self.title = title + self.designation = designation + self.policyEngineMode = policyEngineMode + self.compatibilityMode = compatibilityMode + self.layout = layout + self.deniedAction = deniedAction + self.authentication = authentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case title + case designation + case policyEngineMode = "policy_engine_mode" + case compatibilityMode = "compatibility_mode" + case layout + case deniedAction = "denied_action" + case authentication + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + title = try container.decode(String.self, forKey: .title) + designation = try container.decode(FlowDesignationEnum.self, forKey: .designation) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + compatibilityMode = try container.decodeIfPresent(Bool.self, forKey: .compatibilityMode) + layout = try container.decodeIfPresent(LayoutEnum.self, forKey: .layout) + deniedAction = try container.decodeIfPresent(DeniedActionEnum.self, forKey: .deniedAction) + authentication = try container.decodeIfPresent(AuthenticationEnum.self, forKey: .authentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(title, forKey: .title) + try container.encode(designation, forKey: .designation) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) + try container.encodeIfPresent(layout, forKey: .layout) + try container.encodeIfPresent(deniedAction, forKey: .deniedAction) + try container.encodeIfPresent(authentication, forKey: .authentication) + } +} diff --git a/authentikClient/Sources/Models/FlowSet.swift b/authentikClient/Sources/Models/FlowSet.swift new file mode 100644 index 0000000..9844837 --- /dev/null +++ b/authentikClient/Sources/Models/FlowSet.swift @@ -0,0 +1,91 @@ +// +// FlowSet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stripped down flow serializer +public struct FlowSet: Codable { + public var pk: UUID + public var policybindingmodelPtrId: UUID + public var name: String + /// Visible in the URL. + public var slug: String + /// Shown as the Title in Flow pages. + public var title: String + public var designation: FlowDesignationEnum + /// Get the URL to the background image. If the name is /static or starts with http it is returned as-is + public var background: String + public var policyEngineMode: PolicyEngineMode? + /// Enable compatibility mode, increases compatibility with password managers on mobile devices. + public var compatibilityMode: Bool? + /// Get export URL for flow + public var exportUrl: String + public var layout: LayoutEnum? + public var deniedAction: DeniedActionEnum? + + public init(pk: UUID, policybindingmodelPtrId: UUID, name: String, slug: String, title: String, designation: FlowDesignationEnum, background: String, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, exportUrl: String, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil) { + self.pk = pk + self.policybindingmodelPtrId = policybindingmodelPtrId + self.name = name + self.slug = slug + self.title = title + self.designation = designation + self.background = background + self.policyEngineMode = policyEngineMode + self.compatibilityMode = compatibilityMode + self.exportUrl = exportUrl + self.layout = layout + self.deniedAction = deniedAction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case policybindingmodelPtrId = "policybindingmodel_ptr_id" + case name + case slug + case title + case designation + case background + case policyEngineMode = "policy_engine_mode" + case compatibilityMode = "compatibility_mode" + case exportUrl = "export_url" + case layout + case deniedAction = "denied_action" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + policybindingmodelPtrId = try container.decode(UUID.self, forKey: .policybindingmodelPtrId) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + title = try container.decode(String.self, forKey: .title) + designation = try container.decode(FlowDesignationEnum.self, forKey: .designation) + background = try container.decode(String.self, forKey: .background) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + compatibilityMode = try container.decodeIfPresent(Bool.self, forKey: .compatibilityMode) + exportUrl = try container.decode(String.self, forKey: .exportUrl) + layout = try container.decodeIfPresent(LayoutEnum.self, forKey: .layout) + deniedAction = try container.decodeIfPresent(DeniedActionEnum.self, forKey: .deniedAction) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(title, forKey: .title) + try container.encode(designation, forKey: .designation) + try container.encode(background, forKey: .background) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) + try container.encode(exportUrl, forKey: .exportUrl) + try container.encodeIfPresent(layout, forKey: .layout) + try container.encodeIfPresent(deniedAction, forKey: .deniedAction) + } +} diff --git a/authentikClient/Sources/Models/FlowSetRequest.swift b/authentikClient/Sources/Models/FlowSetRequest.swift new file mode 100644 index 0000000..f8ed508 --- /dev/null +++ b/authentikClient/Sources/Models/FlowSetRequest.swift @@ -0,0 +1,69 @@ +// +// FlowSetRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stripped down flow serializer +public struct FlowSetRequest: Codable { + public var name: String + /// Visible in the URL. + public var slug: String + /// Shown as the Title in Flow pages. + public var title: String + public var designation: FlowDesignationEnum + public var policyEngineMode: PolicyEngineMode? + /// Enable compatibility mode, increases compatibility with password managers on mobile devices. + public var compatibilityMode: Bool? + public var layout: LayoutEnum? + public var deniedAction: DeniedActionEnum? + + public init(name: String, slug: String, title: String, designation: FlowDesignationEnum, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil) { + self.name = name + self.slug = slug + self.title = title + self.designation = designation + self.policyEngineMode = policyEngineMode + self.compatibilityMode = compatibilityMode + self.layout = layout + self.deniedAction = deniedAction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case title + case designation + case policyEngineMode = "policy_engine_mode" + case compatibilityMode = "compatibility_mode" + case layout + case deniedAction = "denied_action" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + title = try container.decode(String.self, forKey: .title) + designation = try container.decode(FlowDesignationEnum.self, forKey: .designation) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + compatibilityMode = try container.decodeIfPresent(Bool.self, forKey: .compatibilityMode) + layout = try container.decodeIfPresent(LayoutEnum.self, forKey: .layout) + deniedAction = try container.decodeIfPresent(DeniedActionEnum.self, forKey: .deniedAction) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(title, forKey: .title) + try container.encode(designation, forKey: .designation) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) + try container.encodeIfPresent(layout, forKey: .layout) + try container.encodeIfPresent(deniedAction, forKey: .deniedAction) + } +} diff --git a/authentikClient/Sources/Models/FlowStageBinding.swift b/authentikClient/Sources/Models/FlowStageBinding.swift new file mode 100644 index 0000000..f223ef0 --- /dev/null +++ b/authentikClient/Sources/Models/FlowStageBinding.swift @@ -0,0 +1,78 @@ +// +// FlowStageBinding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// FlowStageBinding Serializer +public struct FlowStageBinding: Codable { + public var pk: UUID + public var policybindingmodelPtrId: UUID + public var target: UUID + public var stage: UUID + public var stageObj: Stage + /// Evaluate policies during the Flow planning process. + public var evaluateOnPlan: Bool? + /// Evaluate policies when the Stage is present to the user. + public var reEvaluatePolicies: Bool? + public var order: Int + public var policyEngineMode: PolicyEngineMode? + public var invalidResponseAction: InvalidResponseActionEnum? + + public init(pk: UUID, policybindingmodelPtrId: UUID, target: UUID, stage: UUID, stageObj: Stage, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { + self.pk = pk + self.policybindingmodelPtrId = policybindingmodelPtrId + self.target = target + self.stage = stage + self.stageObj = stageObj + self.evaluateOnPlan = evaluateOnPlan + self.reEvaluatePolicies = reEvaluatePolicies + self.order = order + self.policyEngineMode = policyEngineMode + self.invalidResponseAction = invalidResponseAction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case policybindingmodelPtrId = "policybindingmodel_ptr_id" + case target + case stage + case stageObj = "stage_obj" + case evaluateOnPlan = "evaluate_on_plan" + case reEvaluatePolicies = "re_evaluate_policies" + case order + case policyEngineMode = "policy_engine_mode" + case invalidResponseAction = "invalid_response_action" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + policybindingmodelPtrId = try container.decode(UUID.self, forKey: .policybindingmodelPtrId) + target = try container.decode(UUID.self, forKey: .target) + stage = try container.decode(UUID.self, forKey: .stage) + stageObj = try container.decode(Stage.self, forKey: .stageObj) + evaluateOnPlan = try container.decodeIfPresent(Bool.self, forKey: .evaluateOnPlan) + reEvaluatePolicies = try container.decodeIfPresent(Bool.self, forKey: .reEvaluatePolicies) + order = try container.decode(Int.self, forKey: .order) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + invalidResponseAction = try container.decodeIfPresent(InvalidResponseActionEnum.self, forKey: .invalidResponseAction) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(policybindingmodelPtrId, forKey: .policybindingmodelPtrId) + try container.encode(target, forKey: .target) + try container.encode(stage, forKey: .stage) + try container.encode(stageObj, forKey: .stageObj) + try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) + try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) + try container.encode(order, forKey: .order) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) + } +} diff --git a/authentikClient/Sources/Models/FlowStageBindingRequest.swift b/authentikClient/Sources/Models/FlowStageBindingRequest.swift new file mode 100644 index 0000000..997521d --- /dev/null +++ b/authentikClient/Sources/Models/FlowStageBindingRequest.swift @@ -0,0 +1,63 @@ +// +// FlowStageBindingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// FlowStageBinding Serializer +public struct FlowStageBindingRequest: Codable { + public var target: UUID + public var stage: UUID + /// Evaluate policies during the Flow planning process. + public var evaluateOnPlan: Bool? + /// Evaluate policies when the Stage is present to the user. + public var reEvaluatePolicies: Bool? + public var order: Int + public var policyEngineMode: PolicyEngineMode? + public var invalidResponseAction: InvalidResponseActionEnum? + + public init(target: UUID, stage: UUID, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { + self.target = target + self.stage = stage + self.evaluateOnPlan = evaluateOnPlan + self.reEvaluatePolicies = reEvaluatePolicies + self.order = order + self.policyEngineMode = policyEngineMode + self.invalidResponseAction = invalidResponseAction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case target + case stage + case evaluateOnPlan = "evaluate_on_plan" + case reEvaluatePolicies = "re_evaluate_policies" + case order + case policyEngineMode = "policy_engine_mode" + case invalidResponseAction = "invalid_response_action" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + target = try container.decode(UUID.self, forKey: .target) + stage = try container.decode(UUID.self, forKey: .stage) + evaluateOnPlan = try container.decodeIfPresent(Bool.self, forKey: .evaluateOnPlan) + reEvaluatePolicies = try container.decodeIfPresent(Bool.self, forKey: .reEvaluatePolicies) + order = try container.decode(Int.self, forKey: .order) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + invalidResponseAction = try container.decodeIfPresent(InvalidResponseActionEnum.self, forKey: .invalidResponseAction) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(target, forKey: .target) + try container.encode(stage, forKey: .stage) + try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) + try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) + try container.encode(order, forKey: .order) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) + } +} diff --git a/authentikClient/Sources/Models/FooterLink.swift b/authentikClient/Sources/Models/FooterLink.swift new file mode 100644 index 0000000..1762872 --- /dev/null +++ b/authentikClient/Sources/Models/FooterLink.swift @@ -0,0 +1,19 @@ +// +// FooterLink.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Links returned in Config API +public struct FooterLink: Codable { + public var href: String + public var name: String + + public init(href: String, name: String) { + self.href = href + self.name = name + } +} diff --git a/authentikClient/Sources/Models/GenericError.swift b/authentikClient/Sources/Models/GenericError.swift new file mode 100644 index 0000000..3cc156f --- /dev/null +++ b/authentikClient/Sources/Models/GenericError.swift @@ -0,0 +1,19 @@ +// +// GenericError.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Generic API Error +public struct GenericError: Codable { + public var detail: String + public var code: String? + + public init(detail: String, code: String? = nil) { + self.detail = detail + self.code = code + } +} diff --git a/authentikClient/Sources/Models/Group.swift b/authentikClient/Sources/Models/Group.swift new file mode 100644 index 0000000..9cf5291 --- /dev/null +++ b/authentikClient/Sources/Models/Group.swift @@ -0,0 +1,82 @@ +// +// Group.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Serializer +public struct Group: Codable { + public var pk: UUID + public var numPk: Int + public var name: String + /// Users added to this group will be superusers. + public var isSuperuser: Bool? + public var parent: UUID? + public var parentName: String? + public var users: [Int]? + public var usersObj: [GroupMember] + public var attributes: [String: AnyCodable]? + public var roles: [UUID]? + public var rolesObj: [Role] + + public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String?, users: [Int]? = nil, usersObj: [GroupMember], attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil, rolesObj: [Role]) { + self.pk = pk + self.numPk = numPk + self.name = name + self.isSuperuser = isSuperuser + self.parent = parent + self.parentName = parentName + self.users = users + self.usersObj = usersObj + self.attributes = attributes + self.roles = roles + self.rolesObj = rolesObj + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case numPk = "num_pk" + case name + case isSuperuser = "is_superuser" + case parent + case parentName = "parent_name" + case users + case usersObj = "users_obj" + case attributes + case roles + case rolesObj = "roles_obj" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + numPk = try container.decode(Int.self, forKey: .numPk) + name = try container.decode(String.self, forKey: .name) + isSuperuser = try container.decodeIfPresent(Bool.self, forKey: .isSuperuser) + parent = try container.decodeIfPresent(UUID.self, forKey: .parent) + parentName = try container.decode(String.self, forKey: .parentName) + users = try container.decodeIfPresent([Int].self, forKey: .users) + usersObj = try container.decode([GroupMember].self, forKey: .usersObj) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + roles = try container.decodeIfPresent([UUID].self, forKey: .roles) + rolesObj = try container.decode([Role].self, forKey: .rolesObj) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(numPk, forKey: .numPk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(parent, forKey: .parent) + try container.encode(parentName, forKey: .parentName) + try container.encodeIfPresent(users, forKey: .users) + try container.encode(usersObj, forKey: .usersObj) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encodeIfPresent(roles, forKey: .roles) + try container.encode(rolesObj, forKey: .rolesObj) + } +} diff --git a/authentikClient/Sources/Models/GroupMember.swift b/authentikClient/Sources/Models/GroupMember.swift new file mode 100644 index 0000000..82d736d --- /dev/null +++ b/authentikClient/Sources/Models/GroupMember.swift @@ -0,0 +1,69 @@ +// +// GroupMember.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stripped down user serializer to show relevant users for groups +public struct GroupMember: Codable { + public var pk: Int + /// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var email: String? + public var attributes: [String: AnyCodable]? + public var uid: String + + public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, uid: String) { + self.pk = pk + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.email = email + self.attributes = attributes + self.uid = uid + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case email + case attributes + case uid + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + email = try container.decodeIfPresent(String.self, forKey: .email) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + uid = try container.decode(String.self, forKey: .uid) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encode(uid, forKey: .uid) + } +} diff --git a/authentikClient/Sources/Models/GroupMemberRequest.swift b/authentikClient/Sources/Models/GroupMemberRequest.swift new file mode 100644 index 0000000..afd0131 --- /dev/null +++ b/authentikClient/Sources/Models/GroupMemberRequest.swift @@ -0,0 +1,59 @@ +// +// GroupMemberRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stripped down user serializer to show relevant users for groups +public struct GroupMemberRequest: Codable { + /// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var email: String? + public var attributes: [String: AnyCodable]? + + public init(username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil) { + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.email = email + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case email + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + email = try container.decodeIfPresent(String.self, forKey: .email) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/GroupRequest.swift b/authentikClient/Sources/Models/GroupRequest.swift new file mode 100644 index 0000000..2e02717 --- /dev/null +++ b/authentikClient/Sources/Models/GroupRequest.swift @@ -0,0 +1,57 @@ +// +// GroupRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Serializer +public struct GroupRequest: Codable { + public var name: String + /// Users added to this group will be superusers. + public var isSuperuser: Bool? + public var parent: UUID? + public var users: [Int]? + public var attributes: [String: AnyCodable]? + public var roles: [UUID]? + + public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil) { + self.name = name + self.isSuperuser = isSuperuser + self.parent = parent + self.users = users + self.attributes = attributes + self.roles = roles + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case isSuperuser = "is_superuser" + case parent + case users + case attributes + case roles + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + isSuperuser = try container.decodeIfPresent(Bool.self, forKey: .isSuperuser) + parent = try container.decodeIfPresent(UUID.self, forKey: .parent) + users = try container.decodeIfPresent([Int].self, forKey: .users) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + roles = try container.decodeIfPresent([UUID].self, forKey: .roles) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(parent, forKey: .parent) + try container.encodeIfPresent(users, forKey: .users) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encodeIfPresent(roles, forKey: .roles) + } +} diff --git a/authentikClient/Sources/Models/IdentificationChallenge.swift b/authentikClient/Sources/Models/IdentificationChallenge.swift new file mode 100644 index 0000000..969a604 --- /dev/null +++ b/authentikClient/Sources/Models/IdentificationChallenge.swift @@ -0,0 +1,91 @@ +// +// IdentificationChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Identification challenges with all UI elements +public struct IdentificationChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-identification" + public var responseErrors: [String: [ErrorDetail]]? + public var userFields: [String]? + public var passwordFields: Bool + public var applicationPre: String? + public var enrollUrl: String? + public var recoveryUrl: String? + public var passwordlessUrl: String? + public var primaryAction: String + public var sources: [LoginSource]? + public var showSourceLabels: Bool + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-identification", responseErrors: [String: [ErrorDetail]]? = nil, userFields: [String]?, passwordFields: Bool, applicationPre: String? = nil, enrollUrl: String? = nil, recoveryUrl: String? = nil, passwordlessUrl: String? = nil, primaryAction: String, sources: [LoginSource]? = nil, showSourceLabels: Bool) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.userFields = userFields + self.passwordFields = passwordFields + self.applicationPre = applicationPre + self.enrollUrl = enrollUrl + self.recoveryUrl = recoveryUrl + self.passwordlessUrl = passwordlessUrl + self.primaryAction = primaryAction + self.sources = sources + self.showSourceLabels = showSourceLabels + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case userFields = "user_fields" + case passwordFields = "password_fields" + case applicationPre = "application_pre" + case enrollUrl = "enroll_url" + case recoveryUrl = "recovery_url" + case passwordlessUrl = "passwordless_url" + case primaryAction = "primary_action" + case sources + case showSourceLabels = "show_source_labels" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + userFields = try container.decode([String].self, forKey: .userFields) + passwordFields = try container.decode(Bool.self, forKey: .passwordFields) + applicationPre = try container.decodeIfPresent(String.self, forKey: .applicationPre) + enrollUrl = try container.decodeIfPresent(String.self, forKey: .enrollUrl) + recoveryUrl = try container.decodeIfPresent(String.self, forKey: .recoveryUrl) + passwordlessUrl = try container.decodeIfPresent(String.self, forKey: .passwordlessUrl) + primaryAction = try container.decode(String.self, forKey: .primaryAction) + sources = try container.decodeIfPresent([LoginSource].self, forKey: .sources) + showSourceLabels = try container.decode(Bool.self, forKey: .showSourceLabels) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(userFields, forKey: .userFields) + try container.encode(passwordFields, forKey: .passwordFields) + try container.encodeIfPresent(applicationPre, forKey: .applicationPre) + try container.encodeIfPresent(enrollUrl, forKey: .enrollUrl) + try container.encodeIfPresent(recoveryUrl, forKey: .recoveryUrl) + try container.encodeIfPresent(passwordlessUrl, forKey: .passwordlessUrl) + try container.encode(primaryAction, forKey: .primaryAction) + try container.encodeIfPresent(sources, forKey: .sources) + try container.encode(showSourceLabels, forKey: .showSourceLabels) + } +} diff --git a/authentikClient/Sources/Models/IdentificationChallengeResponseRequest.swift b/authentikClient/Sources/Models/IdentificationChallengeResponseRequest.swift new file mode 100644 index 0000000..aa345af --- /dev/null +++ b/authentikClient/Sources/Models/IdentificationChallengeResponseRequest.swift @@ -0,0 +1,41 @@ +// +// IdentificationChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Identification challenge +public struct IdentificationChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-identification" + public var uidField: String + public var password: String? + + public init(component: String? = "ak-stage-identification", uidField: String, password: String? = nil) { + self.component = component + self.uidField = uidField + self.password = password + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case component + case uidField = "uid_field" + case password + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + component = try container.decodeIfPresent(String.self, forKey: .component) + uidField = try container.decode(String.self, forKey: .uidField) + password = try container.decodeIfPresent(String.self, forKey: .password) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(component, forKey: .component) + try container.encode(uidField, forKey: .uidField) + try container.encodeIfPresent(password, forKey: .password) + } +} diff --git a/authentikClient/Sources/Models/IdentificationStage.swift b/authentikClient/Sources/Models/IdentificationStage.swift new file mode 100644 index 0000000..e6238b6 --- /dev/null +++ b/authentikClient/Sources/Models/IdentificationStage.swift @@ -0,0 +1,124 @@ +// +// IdentificationStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// IdentificationStage Serializer +public struct IdentificationStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Fields of the user object to match against. (Hold shift to select multiple options) + public var userFields: [UserFieldsEnum]? + /// When set, shows a password field, instead of showing the password field as seaprate step. + public var passwordStage: UUID? + /// When enabled, user fields are matched regardless of their casing. + public var caseInsensitiveMatching: Bool? + /// When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown + public var showMatchedUser: Bool? + /// Optional enrollment flow, which is linked at the bottom of the page. + public var enrollmentFlow: UUID? + /// Optional recovery flow, which is linked at the bottom of the page. + public var recoveryFlow: UUID? + /// Optional passwordless flow, which is linked at the bottom of the page. + public var passwordlessFlow: UUID? + /// Specify which sources should be shown. + public var sources: [UUID]? + public var showSourceLabels: Bool? + /// When enabled, the stage will succeed and continue even when incorrect user info is entered. + public var pretendUserExists: Bool? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.userFields = userFields + self.passwordStage = passwordStage + self.caseInsensitiveMatching = caseInsensitiveMatching + self.showMatchedUser = showMatchedUser + self.enrollmentFlow = enrollmentFlow + self.recoveryFlow = recoveryFlow + self.passwordlessFlow = passwordlessFlow + self.sources = sources + self.showSourceLabels = showSourceLabels + self.pretendUserExists = pretendUserExists + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case userFields = "user_fields" + case passwordStage = "password_stage" + case caseInsensitiveMatching = "case_insensitive_matching" + case showMatchedUser = "show_matched_user" + case enrollmentFlow = "enrollment_flow" + case recoveryFlow = "recovery_flow" + case passwordlessFlow = "passwordless_flow" + case sources + case showSourceLabels = "show_source_labels" + case pretendUserExists = "pretend_user_exists" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + userFields = try container.decodeIfPresent([UserFieldsEnum].self, forKey: .userFields) + passwordStage = try container.decodeIfPresent(UUID.self, forKey: .passwordStage) + caseInsensitiveMatching = try container.decodeIfPresent(Bool.self, forKey: .caseInsensitiveMatching) + showMatchedUser = try container.decodeIfPresent(Bool.self, forKey: .showMatchedUser) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + recoveryFlow = try container.decodeIfPresent(UUID.self, forKey: .recoveryFlow) + passwordlessFlow = try container.decodeIfPresent(UUID.self, forKey: .passwordlessFlow) + sources = try container.decodeIfPresent([UUID].self, forKey: .sources) + showSourceLabels = try container.decodeIfPresent(Bool.self, forKey: .showSourceLabels) + pretendUserExists = try container.decodeIfPresent(Bool.self, forKey: .pretendUserExists) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userFields, forKey: .userFields) + try container.encodeIfPresent(passwordStage, forKey: .passwordStage) + try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) + try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) + try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) + try container.encodeIfPresent(sources, forKey: .sources) + try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) + try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) + } +} diff --git a/authentikClient/Sources/Models/IdentificationStageRequest.swift b/authentikClient/Sources/Models/IdentificationStageRequest.swift new file mode 100644 index 0000000..e1a04fc --- /dev/null +++ b/authentikClient/Sources/Models/IdentificationStageRequest.swift @@ -0,0 +1,95 @@ +// +// IdentificationStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// IdentificationStage Serializer +public struct IdentificationStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Fields of the user object to match against. (Hold shift to select multiple options) + public var userFields: [UserFieldsEnum]? + /// When set, shows a password field, instead of showing the password field as seaprate step. + public var passwordStage: UUID? + /// When enabled, user fields are matched regardless of their casing. + public var caseInsensitiveMatching: Bool? + /// When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown + public var showMatchedUser: Bool? + /// Optional enrollment flow, which is linked at the bottom of the page. + public var enrollmentFlow: UUID? + /// Optional recovery flow, which is linked at the bottom of the page. + public var recoveryFlow: UUID? + /// Optional passwordless flow, which is linked at the bottom of the page. + public var passwordlessFlow: UUID? + /// Specify which sources should be shown. + public var sources: [UUID]? + public var showSourceLabels: Bool? + /// When enabled, the stage will succeed and continue even when incorrect user info is entered. + public var pretendUserExists: Bool? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.userFields = userFields + self.passwordStage = passwordStage + self.caseInsensitiveMatching = caseInsensitiveMatching + self.showMatchedUser = showMatchedUser + self.enrollmentFlow = enrollmentFlow + self.recoveryFlow = recoveryFlow + self.passwordlessFlow = passwordlessFlow + self.sources = sources + self.showSourceLabels = showSourceLabels + self.pretendUserExists = pretendUserExists + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case userFields = "user_fields" + case passwordStage = "password_stage" + case caseInsensitiveMatching = "case_insensitive_matching" + case showMatchedUser = "show_matched_user" + case enrollmentFlow = "enrollment_flow" + case recoveryFlow = "recovery_flow" + case passwordlessFlow = "passwordless_flow" + case sources + case showSourceLabels = "show_source_labels" + case pretendUserExists = "pretend_user_exists" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + userFields = try container.decodeIfPresent([UserFieldsEnum].self, forKey: .userFields) + passwordStage = try container.decodeIfPresent(UUID.self, forKey: .passwordStage) + caseInsensitiveMatching = try container.decodeIfPresent(Bool.self, forKey: .caseInsensitiveMatching) + showMatchedUser = try container.decodeIfPresent(Bool.self, forKey: .showMatchedUser) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + recoveryFlow = try container.decodeIfPresent(UUID.self, forKey: .recoveryFlow) + passwordlessFlow = try container.decodeIfPresent(UUID.self, forKey: .passwordlessFlow) + sources = try container.decodeIfPresent([UUID].self, forKey: .sources) + showSourceLabels = try container.decodeIfPresent(Bool.self, forKey: .showSourceLabels) + pretendUserExists = try container.decodeIfPresent(Bool.self, forKey: .pretendUserExists) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userFields, forKey: .userFields) + try container.encodeIfPresent(passwordStage, forKey: .passwordStage) + try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) + try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) + try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) + try container.encodeIfPresent(sources, forKey: .sources) + try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) + try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) + } +} diff --git a/authentikClient/Sources/Models/InstallID.swift b/authentikClient/Sources/Models/InstallID.swift new file mode 100644 index 0000000..822d803 --- /dev/null +++ b/authentikClient/Sources/Models/InstallID.swift @@ -0,0 +1,30 @@ +// +// InstallID.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct InstallID: Codable { + public var installId: String + + public init(installId: String) { + self.installId = installId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case installId = "install_id" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + installId = try container.decode(String.self, forKey: .installId) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(installId, forKey: .installId) + } +} diff --git a/authentikClient/Sources/Models/IntentEnum.swift b/authentikClient/Sources/Models/IntentEnum.swift new file mode 100644 index 0000000..9c44767 --- /dev/null +++ b/authentikClient/Sources/Models/IntentEnum.swift @@ -0,0 +1,17 @@ +// +// IntentEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password +public enum IntentEnum: String, Codable, CaseIterable { + case verification = "verification" + case api = "api" + case recovery = "recovery" + case appPassword = "app_password" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/InvalidResponseActionEnum.swift b/authentikClient/Sources/Models/InvalidResponseActionEnum.swift new file mode 100644 index 0000000..ad134c5 --- /dev/null +++ b/authentikClient/Sources/Models/InvalidResponseActionEnum.swift @@ -0,0 +1,16 @@ +// +// InvalidResponseActionEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context +public enum InvalidResponseActionEnum: String, Codable, CaseIterable { + case retry = "retry" + case restart = "restart" + case restartWithContext = "restart_with_context" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Invitation.swift b/authentikClient/Sources/Models/Invitation.swift new file mode 100644 index 0000000..a9eb4f7 --- /dev/null +++ b/authentikClient/Sources/Models/Invitation.swift @@ -0,0 +1,68 @@ +// +// Invitation.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Invitation Serializer +public struct Invitation: Codable { + public var pk: UUID + public var name: String + public var expires: Date? + public var fixedData: [String: AnyCodable]? + public var createdBy: GroupMember + /// When enabled, the invitation will be deleted after usage. + public var singleUse: Bool? + /// When set, only the configured flow can use this invitation. + public var flow: UUID? + public var flowObj: Flow + + public init(pk: UUID, name: String, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, createdBy: GroupMember, singleUse: Bool? = nil, flow: UUID? = nil, flowObj: Flow) { + self.pk = pk + self.name = name + self.expires = expires + self.fixedData = fixedData + self.createdBy = createdBy + self.singleUse = singleUse + self.flow = flow + self.flowObj = flowObj + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case expires + case fixedData = "fixed_data" + case createdBy = "created_by" + case singleUse = "single_use" + case flow + case flowObj = "flow_obj" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + fixedData = try container.decodeIfPresent([String: AnyCodable].self, forKey: .fixedData) + createdBy = try container.decode(GroupMember.self, forKey: .createdBy) + singleUse = try container.decodeIfPresent(Bool.self, forKey: .singleUse) + flow = try container.decodeIfPresent(UUID.self, forKey: .flow) + flowObj = try container.decode(Flow.self, forKey: .flowObj) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(fixedData, forKey: .fixedData) + try container.encode(createdBy, forKey: .createdBy) + try container.encodeIfPresent(singleUse, forKey: .singleUse) + try container.encodeIfPresent(flow, forKey: .flow) + try container.encode(flowObj, forKey: .flowObj) + } +} diff --git a/authentikClient/Sources/Models/InvitationRequest.swift b/authentikClient/Sources/Models/InvitationRequest.swift new file mode 100644 index 0000000..76e0e1b --- /dev/null +++ b/authentikClient/Sources/Models/InvitationRequest.swift @@ -0,0 +1,53 @@ +// +// InvitationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Invitation Serializer +public struct InvitationRequest: Codable { + public var name: String + public var expires: Date? + public var fixedData: [String: AnyCodable]? + /// When enabled, the invitation will be deleted after usage. + public var singleUse: Bool? + /// When set, only the configured flow can use this invitation. + public var flow: UUID? + + public init(name: String, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, singleUse: Bool? = nil, flow: UUID? = nil) { + self.name = name + self.expires = expires + self.fixedData = fixedData + self.singleUse = singleUse + self.flow = flow + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case expires + case fixedData = "fixed_data" + case singleUse = "single_use" + case flow + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + fixedData = try container.decodeIfPresent([String: AnyCodable].self, forKey: .fixedData) + singleUse = try container.decodeIfPresent(Bool.self, forKey: .singleUse) + flow = try container.decodeIfPresent(UUID.self, forKey: .flow) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(fixedData, forKey: .fixedData) + try container.encodeIfPresent(singleUse, forKey: .singleUse) + try container.encodeIfPresent(flow, forKey: .flow) + } +} diff --git a/authentikClient/Sources/Models/InvitationStage.swift b/authentikClient/Sources/Models/InvitationStage.swift new file mode 100644 index 0000000..4ae10e6 --- /dev/null +++ b/authentikClient/Sources/Models/InvitationStage.swift @@ -0,0 +1,71 @@ +// +// InvitationStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// InvitationStage Serializer +public struct InvitationStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. + public var continueFlowWithoutInvitation: Bool? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, continueFlowWithoutInvitation: Bool? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.continueFlowWithoutInvitation = continueFlowWithoutInvitation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case continueFlowWithoutInvitation = "continue_flow_without_invitation" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + continueFlowWithoutInvitation = try container.decodeIfPresent(Bool.self, forKey: .continueFlowWithoutInvitation) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) + } +} diff --git a/authentikClient/Sources/Models/InvitationStageRequest.swift b/authentikClient/Sources/Models/InvitationStageRequest.swift new file mode 100644 index 0000000..5cf14f7 --- /dev/null +++ b/authentikClient/Sources/Models/InvitationStageRequest.swift @@ -0,0 +1,42 @@ +// +// InvitationStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// InvitationStage Serializer +public struct InvitationStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. + public var continueFlowWithoutInvitation: Bool? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, continueFlowWithoutInvitation: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.continueFlowWithoutInvitation = continueFlowWithoutInvitation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case continueFlowWithoutInvitation = "continue_flow_without_invitation" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + continueFlowWithoutInvitation = try container.decodeIfPresent(Bool.self, forKey: .continueFlowWithoutInvitation) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) + } +} diff --git a/authentikClient/Sources/Models/IssuerModeEnum.swift b/authentikClient/Sources/Models/IssuerModeEnum.swift new file mode 100644 index 0000000..029712c --- /dev/null +++ b/authentikClient/Sources/Models/IssuerModeEnum.swift @@ -0,0 +1,15 @@ +// +// IssuerModeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. +public enum IssuerModeEnum: String, Codable, CaseIterable { + case global = "global" + case perProvider = "per_provider" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ItemMatchingModeEnum.swift b/authentikClient/Sources/Models/ItemMatchingModeEnum.swift new file mode 100644 index 0000000..7015073 --- /dev/null +++ b/authentikClient/Sources/Models/ItemMatchingModeEnum.swift @@ -0,0 +1,16 @@ +// +// ItemMatchingModeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `accept_deny` - Accept Deny * `number_matching_2` - Number Matching 2 * `number_matching_3` - Number Matching 3 +public enum ItemMatchingModeEnum: String, Codable, CaseIterable { + case acceptDeny = "accept_deny" + case numberMatching2 = "number_matching_2" + case numberMatching3 = "number_matching_3" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/KubernetesServiceConnection.swift b/authentikClient/Sources/Models/KubernetesServiceConnection.swift new file mode 100644 index 0000000..584e2df --- /dev/null +++ b/authentikClient/Sources/Models/KubernetesServiceConnection.swift @@ -0,0 +1,77 @@ +// +// KubernetesServiceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// KubernetesServiceConnection Serializer +public struct KubernetesServiceConnection: Codable { + public var pk: UUID + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Paste your kubeconfig here. authentik will automatically use the currently selected context. + public var kubeconfig: [String: AnyCodable]? + /// Verify SSL Certificates of the Kubernetes API endpoint + public var verifySsl: Bool? + + public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { + self.pk = pk + self.name = name + self.local = local + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.kubeconfig = kubeconfig + self.verifySsl = verifySsl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case local + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case kubeconfig + case verifySsl = "verify_ssl" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + kubeconfig = try container.decodeIfPresent([String: AnyCodable].self, forKey: .kubeconfig) + verifySsl = try container.decodeIfPresent(Bool.self, forKey: .verifySsl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) + try container.encodeIfPresent(verifySsl, forKey: .verifySsl) + } +} diff --git a/authentikClient/Sources/Models/KubernetesServiceConnectionRequest.swift b/authentikClient/Sources/Models/KubernetesServiceConnectionRequest.swift new file mode 100644 index 0000000..0bfd792 --- /dev/null +++ b/authentikClient/Sources/Models/KubernetesServiceConnectionRequest.swift @@ -0,0 +1,49 @@ +// +// KubernetesServiceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// KubernetesServiceConnection Serializer +public struct KubernetesServiceConnectionRequest: Codable { + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + /// Paste your kubeconfig here. authentik will automatically use the currently selected context. + public var kubeconfig: [String: AnyCodable]? + /// Verify SSL Certificates of the Kubernetes API endpoint + public var verifySsl: Bool? + + public init(name: String, local: Bool? = nil, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { + self.name = name + self.local = local + self.kubeconfig = kubeconfig + self.verifySsl = verifySsl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case local + case kubeconfig + case verifySsl = "verify_ssl" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + kubeconfig = try container.decodeIfPresent([String: AnyCodable].self, forKey: .kubeconfig) + verifySsl = try container.decodeIfPresent(Bool.self, forKey: .verifySsl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) + try container.encodeIfPresent(verifySsl, forKey: .verifySsl) + } +} diff --git a/authentikClient/Sources/Models/LDAPAPIAccessMode.swift b/authentikClient/Sources/Models/LDAPAPIAccessMode.swift new file mode 100644 index 0000000..c09b851 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPAPIAccessMode.swift @@ -0,0 +1,15 @@ +// +// LDAPAPIAccessMode.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `direct` - Direct * `cached` - Cached +public enum LDAPAPIAccessMode: String, Codable, CaseIterable { + case direct = "direct" + case cached = "cached" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/LDAPDebug.swift b/authentikClient/Sources/Models/LDAPDebug.swift new file mode 100644 index 0000000..50df5b6 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPDebug.swift @@ -0,0 +1,20 @@ +// +// LDAPDebug.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct LDAPDebug: Codable { + public var user: [[String: AnyCodable]] + public var group: [[String: AnyCodable]] + public var membership: [[String: AnyCodable]] + + public init(user: [[String: AnyCodable]], group: [[String: AnyCodable]], membership: [[String: AnyCodable]]) { + self.user = user + self.group = group + self.membership = membership + } +} diff --git a/authentikClient/Sources/Models/LDAPOutpostConfig.swift b/authentikClient/Sources/Models/LDAPOutpostConfig.swift new file mode 100644 index 0000000..b4ede33 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPOutpostConfig.swift @@ -0,0 +1,97 @@ +// +// LDAPOutpostConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAPProvider Serializer +public struct LDAPOutpostConfig: Codable { + public var pk: Int + public var name: String + /// DN under which objects are accessible. + public var baseDn: String? + public var bindFlowSlug: String + /// Prioritise backchannel slug over direct application slug + public var applicationSlug: String + /// Users in this group can do search queries. If not set, every user can execute search queries. + public var searchGroup: UUID? + public var certificate: UUID? + public var tlsServerName: String? + /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber + public var uidStartNumber: Int? + /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber + public var gidStartNumber: Int? + public var searchMode: LDAPAPIAccessMode? + public var bindMode: LDAPAPIAccessMode? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(pk: Int, name: String, baseDn: String? = nil, bindFlowSlug: String, applicationSlug: String, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { + self.pk = pk + self.name = name + self.baseDn = baseDn + self.bindFlowSlug = bindFlowSlug + self.applicationSlug = applicationSlug + self.searchGroup = searchGroup + self.certificate = certificate + self.tlsServerName = tlsServerName + self.uidStartNumber = uidStartNumber + self.gidStartNumber = gidStartNumber + self.searchMode = searchMode + self.bindMode = bindMode + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case baseDn = "base_dn" + case bindFlowSlug = "bind_flow_slug" + case applicationSlug = "application_slug" + case searchGroup = "search_group" + case certificate + case tlsServerName = "tls_server_name" + case uidStartNumber = "uid_start_number" + case gidStartNumber = "gid_start_number" + case searchMode = "search_mode" + case bindMode = "bind_mode" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + baseDn = try container.decodeIfPresent(String.self, forKey: .baseDn) + bindFlowSlug = try container.decode(String.self, forKey: .bindFlowSlug) + applicationSlug = try container.decode(String.self, forKey: .applicationSlug) + searchGroup = try container.decodeIfPresent(UUID.self, forKey: .searchGroup) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + tlsServerName = try container.decodeIfPresent(String.self, forKey: .tlsServerName) + uidStartNumber = try container.decodeIfPresent(Int.self, forKey: .uidStartNumber) + gidStartNumber = try container.decodeIfPresent(Int.self, forKey: .gidStartNumber) + searchMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .searchMode) + bindMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .bindMode) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(baseDn, forKey: .baseDn) + try container.encode(bindFlowSlug, forKey: .bindFlowSlug) + try container.encode(applicationSlug, forKey: .applicationSlug) + try container.encodeIfPresent(searchGroup, forKey: .searchGroup) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) + try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) + try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) + try container.encodeIfPresent(searchMode, forKey: .searchMode) + try container.encodeIfPresent(bindMode, forKey: .bindMode) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/LDAPPropertyMapping.swift b/authentikClient/Sources/Models/LDAPPropertyMapping.swift new file mode 100644 index 0000000..a3a5f62 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPPropertyMapping.swift @@ -0,0 +1,76 @@ +// +// LDAPPropertyMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP PropertyMapping Serializer +public struct LDAPPropertyMapping: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Get object's component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var objectField: String + + public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, objectField: String) { + self.pk = pk + self.managed = managed + self.name = name + self.expression = expression + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.objectField = objectField + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case name + case expression + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case objectField = "object_field" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + objectField = try container.decode(String.self, forKey: .objectField) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(objectField, forKey: .objectField) + } +} diff --git a/authentikClient/Sources/Models/LDAPPropertyMappingRequest.swift b/authentikClient/Sources/Models/LDAPPropertyMappingRequest.swift new file mode 100644 index 0000000..0e01fc3 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPPropertyMappingRequest.swift @@ -0,0 +1,47 @@ +// +// LDAPPropertyMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP PropertyMapping Serializer +public struct LDAPPropertyMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + public var objectField: String + + public init(managed: String? = nil, name: String, expression: String, objectField: String) { + self.managed = managed + self.name = name + self.expression = expression + self.objectField = objectField + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case objectField = "object_field" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + objectField = try container.decode(String.self, forKey: .objectField) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(objectField, forKey: .objectField) + } +} diff --git a/authentikClient/Sources/Models/LDAPProvider.swift b/authentikClient/Sources/Models/LDAPProvider.swift new file mode 100644 index 0000000..9a95df0 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPProvider.swift @@ -0,0 +1,156 @@ +// +// LDAPProvider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAPProvider Serializer +public struct LDAPProvider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// DN under which objects are accessible. + public var baseDn: String? + /// Users in this group can do search queries. If not set, every user can execute search queries. + public var searchGroup: UUID? + public var certificate: UUID? + public var tlsServerName: String? + /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber + public var uidStartNumber: Int? + /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber + public var gidStartNumber: Int? + public var outpostSet: [String] + public var searchMode: LDAPAPIAccessMode? + public var bindMode: LDAPAPIAccessMode? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, outpostSet: [String], searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.baseDn = baseDn + self.searchGroup = searchGroup + self.certificate = certificate + self.tlsServerName = tlsServerName + self.uidStartNumber = uidStartNumber + self.gidStartNumber = gidStartNumber + self.outpostSet = outpostSet + self.searchMode = searchMode + self.bindMode = bindMode + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case baseDn = "base_dn" + case searchGroup = "search_group" + case certificate + case tlsServerName = "tls_server_name" + case uidStartNumber = "uid_start_number" + case gidStartNumber = "gid_start_number" + case outpostSet = "outpost_set" + case searchMode = "search_mode" + case bindMode = "bind_mode" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + baseDn = try container.decodeIfPresent(String.self, forKey: .baseDn) + searchGroup = try container.decodeIfPresent(UUID.self, forKey: .searchGroup) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + tlsServerName = try container.decodeIfPresent(String.self, forKey: .tlsServerName) + uidStartNumber = try container.decodeIfPresent(Int.self, forKey: .uidStartNumber) + gidStartNumber = try container.decodeIfPresent(Int.self, forKey: .gidStartNumber) + outpostSet = try container.decode([String].self, forKey: .outpostSet) + searchMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .searchMode) + bindMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .bindMode) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(baseDn, forKey: .baseDn) + try container.encodeIfPresent(searchGroup, forKey: .searchGroup) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) + try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) + try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) + try container.encode(outpostSet, forKey: .outpostSet) + try container.encodeIfPresent(searchMode, forKey: .searchMode) + try container.encodeIfPresent(bindMode, forKey: .bindMode) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/LDAPProviderRequest.swift b/authentikClient/Sources/Models/LDAPProviderRequest.swift new file mode 100644 index 0000000..2af5593 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPProviderRequest.swift @@ -0,0 +1,98 @@ +// +// LDAPProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAPProvider Serializer +public struct LDAPProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// DN under which objects are accessible. + public var baseDn: String? + /// Users in this group can do search queries. If not set, every user can execute search queries. + public var searchGroup: UUID? + public var certificate: UUID? + public var tlsServerName: String? + /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber + public var uidStartNumber: Int? + /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber + public var gidStartNumber: Int? + public var searchMode: LDAPAPIAccessMode? + public var bindMode: LDAPAPIAccessMode? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.baseDn = baseDn + self.searchGroup = searchGroup + self.certificate = certificate + self.tlsServerName = tlsServerName + self.uidStartNumber = uidStartNumber + self.gidStartNumber = gidStartNumber + self.searchMode = searchMode + self.bindMode = bindMode + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case baseDn = "base_dn" + case searchGroup = "search_group" + case certificate + case tlsServerName = "tls_server_name" + case uidStartNumber = "uid_start_number" + case gidStartNumber = "gid_start_number" + case searchMode = "search_mode" + case bindMode = "bind_mode" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + baseDn = try container.decodeIfPresent(String.self, forKey: .baseDn) + searchGroup = try container.decodeIfPresent(UUID.self, forKey: .searchGroup) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + tlsServerName = try container.decodeIfPresent(String.self, forKey: .tlsServerName) + uidStartNumber = try container.decodeIfPresent(Int.self, forKey: .uidStartNumber) + gidStartNumber = try container.decodeIfPresent(Int.self, forKey: .gidStartNumber) + searchMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .searchMode) + bindMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .bindMode) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(baseDn, forKey: .baseDn) + try container.encodeIfPresent(searchGroup, forKey: .searchGroup) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) + try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) + try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) + try container.encodeIfPresent(searchMode, forKey: .searchMode) + try container.encodeIfPresent(bindMode, forKey: .bindMode) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/LDAPSource.swift b/authentikClient/Sources/Models/LDAPSource.swift new file mode 100644 index 0000000..53d6631 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPSource.swift @@ -0,0 +1,222 @@ +// +// LDAPSource.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP Source Serializer +public struct LDAPSource: Codable { + public var pk: UUID + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var userPathTemplate: String? + /// Get the URL to the Icon. If the name is /static or starts with http it is returned as-is + public var icon: String? + public var serverUri: String + /// Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + public var peerCertificate: UUID? + /// Client certificate to authenticate against the LDAP Server's Certificate. + public var clientCertificate: UUID? + public var bindCn: String? + public var startTls: Bool? + public var sni: Bool? + public var baseDn: String + /// Prepended to Base DN for User-queries. + public var additionalUserDn: String? + /// Prepended to Base DN for Group-queries. + public var additionalGroupDn: String? + /// Consider Objects matching this filter to be Users. + public var userObjectFilter: String? + /// Consider Objects matching this filter to be Groups. + public var groupObjectFilter: String? + /// Field which contains members of a group. + public var groupMembershipField: String? + /// Field which contains a unique Identifier. + public var objectUniquenessField: String? + public var syncUsers: Bool? + /// When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + public var syncUsersPassword: Bool? + public var syncGroups: Bool? + public var syncParentGroup: UUID? + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + /// Get cached source connectivity + public var connectivity: [String: [String: String]]? + + public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, serverUri: String, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, connectivity: [String: [String: String]]?) { + self.pk = pk + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.managed = managed + self.userPathTemplate = userPathTemplate + self.icon = icon + self.serverUri = serverUri + self.peerCertificate = peerCertificate + self.clientCertificate = clientCertificate + self.bindCn = bindCn + self.startTls = startTls + self.sni = sni + self.baseDn = baseDn + self.additionalUserDn = additionalUserDn + self.additionalGroupDn = additionalGroupDn + self.userObjectFilter = userObjectFilter + self.groupObjectFilter = groupObjectFilter + self.groupMembershipField = groupMembershipField + self.objectUniquenessField = objectUniquenessField + self.syncUsers = syncUsers + self.syncUsersPassword = syncUsersPassword + self.syncGroups = syncGroups + self.syncParentGroup = syncParentGroup + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + self.connectivity = connectivity + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case managed + case userPathTemplate = "user_path_template" + case icon + case serverUri = "server_uri" + case peerCertificate = "peer_certificate" + case clientCertificate = "client_certificate" + case bindCn = "bind_cn" + case startTls = "start_tls" + case sni + case baseDn = "base_dn" + case additionalUserDn = "additional_user_dn" + case additionalGroupDn = "additional_group_dn" + case userObjectFilter = "user_object_filter" + case groupObjectFilter = "group_object_filter" + case groupMembershipField = "group_membership_field" + case objectUniquenessField = "object_uniqueness_field" + case syncUsers = "sync_users" + case syncUsersPassword = "sync_users_password" + case syncGroups = "sync_groups" + case syncParentGroup = "sync_parent_group" + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + case connectivity + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + managed = try container.decode(String.self, forKey: .managed) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + icon = try container.decode(String.self, forKey: .icon) + serverUri = try container.decode(String.self, forKey: .serverUri) + peerCertificate = try container.decodeIfPresent(UUID.self, forKey: .peerCertificate) + clientCertificate = try container.decodeIfPresent(UUID.self, forKey: .clientCertificate) + bindCn = try container.decodeIfPresent(String.self, forKey: .bindCn) + startTls = try container.decodeIfPresent(Bool.self, forKey: .startTls) + sni = try container.decodeIfPresent(Bool.self, forKey: .sni) + baseDn = try container.decode(String.self, forKey: .baseDn) + additionalUserDn = try container.decodeIfPresent(String.self, forKey: .additionalUserDn) + additionalGroupDn = try container.decodeIfPresent(String.self, forKey: .additionalGroupDn) + userObjectFilter = try container.decodeIfPresent(String.self, forKey: .userObjectFilter) + groupObjectFilter = try container.decodeIfPresent(String.self, forKey: .groupObjectFilter) + groupMembershipField = try container.decodeIfPresent(String.self, forKey: .groupMembershipField) + objectUniquenessField = try container.decodeIfPresent(String.self, forKey: .objectUniquenessField) + syncUsers = try container.decodeIfPresent(Bool.self, forKey: .syncUsers) + syncUsersPassword = try container.decodeIfPresent(Bool.self, forKey: .syncUsersPassword) + syncGroups = try container.decodeIfPresent(Bool.self, forKey: .syncGroups) + syncParentGroup = try container.decodeIfPresent(UUID.self, forKey: .syncParentGroup) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + connectivity = try container.decode([String: [String: String]].self, forKey: .connectivity) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encode(managed, forKey: .managed) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(icon, forKey: .icon) + try container.encode(serverUri, forKey: .serverUri) + try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) + try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) + try container.encodeIfPresent(bindCn, forKey: .bindCn) + try container.encodeIfPresent(startTls, forKey: .startTls) + try container.encodeIfPresent(sni, forKey: .sni) + try container.encode(baseDn, forKey: .baseDn) + try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) + try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) + try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) + try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) + try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) + try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) + try container.encodeIfPresent(syncUsers, forKey: .syncUsers) + try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) + try container.encodeIfPresent(syncGroups, forKey: .syncGroups) + try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + try container.encode(connectivity, forKey: .connectivity) + } +} diff --git a/authentikClient/Sources/Models/LDAPSourceRequest.swift b/authentikClient/Sources/Models/LDAPSourceRequest.swift new file mode 100644 index 0000000..a844fc5 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPSourceRequest.swift @@ -0,0 +1,180 @@ +// +// LDAPSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP Source Serializer +public struct LDAPSourceRequest: Codable { + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + public var serverUri: String + /// Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + public var peerCertificate: UUID? + /// Client certificate to authenticate against the LDAP Server's Certificate. + public var clientCertificate: UUID? + public var bindCn: String? + public var bindPassword: String? + public var startTls: Bool? + public var sni: Bool? + public var baseDn: String + /// Prepended to Base DN for User-queries. + public var additionalUserDn: String? + /// Prepended to Base DN for Group-queries. + public var additionalGroupDn: String? + /// Consider Objects matching this filter to be Users. + public var userObjectFilter: String? + /// Consider Objects matching this filter to be Groups. + public var groupObjectFilter: String? + /// Field which contains members of a group. + public var groupMembershipField: String? + /// Field which contains a unique Identifier. + public var objectUniquenessField: String? + public var syncUsers: Bool? + /// When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + public var syncUsersPassword: Bool? + public var syncGroups: Bool? + public var syncParentGroup: UUID? + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + + public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, serverUri: String, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, bindPassword: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.serverUri = serverUri + self.peerCertificate = peerCertificate + self.clientCertificate = clientCertificate + self.bindCn = bindCn + self.bindPassword = bindPassword + self.startTls = startTls + self.sni = sni + self.baseDn = baseDn + self.additionalUserDn = additionalUserDn + self.additionalGroupDn = additionalGroupDn + self.userObjectFilter = userObjectFilter + self.groupObjectFilter = groupObjectFilter + self.groupMembershipField = groupMembershipField + self.objectUniquenessField = objectUniquenessField + self.syncUsers = syncUsers + self.syncUsersPassword = syncUsersPassword + self.syncGroups = syncGroups + self.syncParentGroup = syncParentGroup + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case serverUri = "server_uri" + case peerCertificate = "peer_certificate" + case clientCertificate = "client_certificate" + case bindCn = "bind_cn" + case bindPassword = "bind_password" + case startTls = "start_tls" + case sni + case baseDn = "base_dn" + case additionalUserDn = "additional_user_dn" + case additionalGroupDn = "additional_group_dn" + case userObjectFilter = "user_object_filter" + case groupObjectFilter = "group_object_filter" + case groupMembershipField = "group_membership_field" + case objectUniquenessField = "object_uniqueness_field" + case syncUsers = "sync_users" + case syncUsersPassword = "sync_users_password" + case syncGroups = "sync_groups" + case syncParentGroup = "sync_parent_group" + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + serverUri = try container.decode(String.self, forKey: .serverUri) + peerCertificate = try container.decodeIfPresent(UUID.self, forKey: .peerCertificate) + clientCertificate = try container.decodeIfPresent(UUID.self, forKey: .clientCertificate) + bindCn = try container.decodeIfPresent(String.self, forKey: .bindCn) + bindPassword = try container.decodeIfPresent(String.self, forKey: .bindPassword) + startTls = try container.decodeIfPresent(Bool.self, forKey: .startTls) + sni = try container.decodeIfPresent(Bool.self, forKey: .sni) + baseDn = try container.decode(String.self, forKey: .baseDn) + additionalUserDn = try container.decodeIfPresent(String.self, forKey: .additionalUserDn) + additionalGroupDn = try container.decodeIfPresent(String.self, forKey: .additionalGroupDn) + userObjectFilter = try container.decodeIfPresent(String.self, forKey: .userObjectFilter) + groupObjectFilter = try container.decodeIfPresent(String.self, forKey: .groupObjectFilter) + groupMembershipField = try container.decodeIfPresent(String.self, forKey: .groupMembershipField) + objectUniquenessField = try container.decodeIfPresent(String.self, forKey: .objectUniquenessField) + syncUsers = try container.decodeIfPresent(Bool.self, forKey: .syncUsers) + syncUsersPassword = try container.decodeIfPresent(Bool.self, forKey: .syncUsersPassword) + syncGroups = try container.decodeIfPresent(Bool.self, forKey: .syncGroups) + syncParentGroup = try container.decodeIfPresent(UUID.self, forKey: .syncParentGroup) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(serverUri, forKey: .serverUri) + try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) + try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) + try container.encodeIfPresent(bindCn, forKey: .bindCn) + try container.encodeIfPresent(bindPassword, forKey: .bindPassword) + try container.encodeIfPresent(startTls, forKey: .startTls) + try container.encodeIfPresent(sni, forKey: .sni) + try container.encode(baseDn, forKey: .baseDn) + try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) + try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) + try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) + try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) + try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) + try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) + try container.encodeIfPresent(syncUsers, forKey: .syncUsers) + try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) + try container.encodeIfPresent(syncGroups, forKey: .syncGroups) + try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + } +} diff --git a/authentikClient/Sources/Models/LDAPSyncStatus.swift b/authentikClient/Sources/Models/LDAPSyncStatus.swift new file mode 100644 index 0000000..0eaf413 --- /dev/null +++ b/authentikClient/Sources/Models/LDAPSyncStatus.swift @@ -0,0 +1,36 @@ +// +// LDAPSyncStatus.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP Source sync status +public struct LDAPSyncStatus: Codable { + public var isRunning: Bool + public var tasks: [Task] + + public init(isRunning: Bool, tasks: [Task]) { + self.isRunning = isRunning + self.tasks = tasks + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case isRunning = "is_running" + case tasks + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + isRunning = try container.decode(Bool.self, forKey: .isRunning) + tasks = try container.decode([Task].self, forKey: .tasks) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(isRunning, forKey: .isRunning) + try container.encode(tasks, forKey: .tasks) + } +} diff --git a/authentikClient/Sources/Models/LayoutEnum.swift b/authentikClient/Sources/Models/LayoutEnum.swift new file mode 100644 index 0000000..c526236 --- /dev/null +++ b/authentikClient/Sources/Models/LayoutEnum.swift @@ -0,0 +1,18 @@ +// +// LayoutEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `stacked` - STACKED * `content_left` - CONTENT_LEFT * `content_right` - CONTENT_RIGHT * `sidebar_left` - SIDEBAR_LEFT * `sidebar_right` - SIDEBAR_RIGHT +public enum LayoutEnum: String, Codable, CaseIterable { + case stacked = "stacked" + case contentLeft = "content_left" + case contentRight = "content_right" + case sidebarLeft = "sidebar_left" + case sidebarRight = "sidebar_right" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/License.swift b/authentikClient/Sources/Models/License.swift new file mode 100644 index 0000000..010a29f --- /dev/null +++ b/authentikClient/Sources/Models/License.swift @@ -0,0 +1,56 @@ +// +// License.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// License Serializer +public struct License: Codable { + public var licenseUuid: UUID + public var name: String + public var key: String + public var expiry: Date + public var internalUsers: Int + public var externalUsers: Int + + public init(licenseUuid: UUID, name: String, key: String, expiry: Date, internalUsers: Int, externalUsers: Int) { + self.licenseUuid = licenseUuid + self.name = name + self.key = key + self.expiry = expiry + self.internalUsers = internalUsers + self.externalUsers = externalUsers + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case licenseUuid = "license_uuid" + case name + case key + case expiry + case internalUsers = "internal_users" + case externalUsers = "external_users" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + licenseUuid = try container.decode(UUID.self, forKey: .licenseUuid) + name = try container.decode(String.self, forKey: .name) + key = try container.decode(String.self, forKey: .key) + expiry = try container.decode(Date.self, forKey: .expiry) + internalUsers = try container.decode(Int.self, forKey: .internalUsers) + externalUsers = try container.decode(Int.self, forKey: .externalUsers) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(licenseUuid, forKey: .licenseUuid) + try container.encode(name, forKey: .name) + try container.encode(key, forKey: .key) + try container.encode(expiry, forKey: .expiry) + try container.encode(internalUsers, forKey: .internalUsers) + try container.encode(externalUsers, forKey: .externalUsers) + } +} diff --git a/authentikClient/Sources/Models/LicenseForecast.swift b/authentikClient/Sources/Models/LicenseForecast.swift new file mode 100644 index 0000000..655438f --- /dev/null +++ b/authentikClient/Sources/Models/LicenseForecast.swift @@ -0,0 +1,46 @@ +// +// LicenseForecast.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for license forecast +public struct LicenseForecast: Codable { + public var internalUsers: Int + public var externalUsers: Int + public var forecastedInternalUsers: Int + public var forecastedExternalUsers: Int + + public init(internalUsers: Int, externalUsers: Int, forecastedInternalUsers: Int, forecastedExternalUsers: Int) { + self.internalUsers = internalUsers + self.externalUsers = externalUsers + self.forecastedInternalUsers = forecastedInternalUsers + self.forecastedExternalUsers = forecastedExternalUsers + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case internalUsers = "internal_users" + case externalUsers = "external_users" + case forecastedInternalUsers = "forecasted_internal_users" + case forecastedExternalUsers = "forecasted_external_users" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + internalUsers = try container.decode(Int.self, forKey: .internalUsers) + externalUsers = try container.decode(Int.self, forKey: .externalUsers) + forecastedInternalUsers = try container.decode(Int.self, forKey: .forecastedInternalUsers) + forecastedExternalUsers = try container.decode(Int.self, forKey: .forecastedExternalUsers) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(internalUsers, forKey: .internalUsers) + try container.encode(externalUsers, forKey: .externalUsers) + try container.encode(forecastedInternalUsers, forKey: .forecastedInternalUsers) + try container.encode(forecastedExternalUsers, forKey: .forecastedExternalUsers) + } +} diff --git a/authentikClient/Sources/Models/LicenseRequest.swift b/authentikClient/Sources/Models/LicenseRequest.swift new file mode 100644 index 0000000..7563a16 --- /dev/null +++ b/authentikClient/Sources/Models/LicenseRequest.swift @@ -0,0 +1,17 @@ +// +// LicenseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// License Serializer +public struct LicenseRequest: Codable { + public var key: String + + public init(key: String) { + self.key = key + } +} diff --git a/authentikClient/Sources/Models/LicenseSummary.swift b/authentikClient/Sources/Models/LicenseSummary.swift new file mode 100644 index 0000000..8d1f8c0 --- /dev/null +++ b/authentikClient/Sources/Models/LicenseSummary.swift @@ -0,0 +1,66 @@ +// +// LicenseSummary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for license status +public struct LicenseSummary: Codable { + public var internalUsers: Int + public var externalUsers: Int + public var valid: Bool + public var showAdminWarning: Bool + public var showUserWarning: Bool + public var readOnly: Bool + public var latestValid: Date + public var hasLicense: Bool + + public init(internalUsers: Int, externalUsers: Int, valid: Bool, showAdminWarning: Bool, showUserWarning: Bool, readOnly: Bool, latestValid: Date, hasLicense: Bool) { + self.internalUsers = internalUsers + self.externalUsers = externalUsers + self.valid = valid + self.showAdminWarning = showAdminWarning + self.showUserWarning = showUserWarning + self.readOnly = readOnly + self.latestValid = latestValid + self.hasLicense = hasLicense + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case internalUsers = "internal_users" + case externalUsers = "external_users" + case valid + case showAdminWarning = "show_admin_warning" + case showUserWarning = "show_user_warning" + case readOnly = "read_only" + case latestValid = "latest_valid" + case hasLicense = "has_license" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + internalUsers = try container.decode(Int.self, forKey: .internalUsers) + externalUsers = try container.decode(Int.self, forKey: .externalUsers) + valid = try container.decode(Bool.self, forKey: .valid) + showAdminWarning = try container.decode(Bool.self, forKey: .showAdminWarning) + showUserWarning = try container.decode(Bool.self, forKey: .showUserWarning) + readOnly = try container.decode(Bool.self, forKey: .readOnly) + latestValid = try container.decode(Date.self, forKey: .latestValid) + hasLicense = try container.decode(Bool.self, forKey: .hasLicense) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(internalUsers, forKey: .internalUsers) + try container.encode(externalUsers, forKey: .externalUsers) + try container.encode(valid, forKey: .valid) + try container.encode(showAdminWarning, forKey: .showAdminWarning) + try container.encode(showUserWarning, forKey: .showUserWarning) + try container.encode(readOnly, forKey: .readOnly) + try container.encode(latestValid, forKey: .latestValid) + try container.encode(hasLicense, forKey: .hasLicense) + } +} diff --git a/authentikClient/Sources/Models/Link.swift b/authentikClient/Sources/Models/Link.swift new file mode 100644 index 0000000..50094e9 --- /dev/null +++ b/authentikClient/Sources/Models/Link.swift @@ -0,0 +1,17 @@ +// +// Link.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Returns a single link +public struct Link: Codable { + public var link: String + + public init(link: String) { + self.link = link + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/LoginChallengeTypes.swift b/authentikClient/Sources/Models/LoginChallengeTypes.swift similarity index 92% rename from authentikClient/Classes/OpenAPIs/Models/LoginChallengeTypes.swift rename to authentikClient/Sources/Models/LoginChallengeTypes.swift index 4e59166..f5614fd 100644 --- a/authentikClient/Classes/OpenAPIs/Models/LoginChallengeTypes.swift +++ b/authentikClient/Sources/Models/LoginChallengeTypes.swift @@ -6,11 +6,8 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -public enum LoginChallengeTypes: Codable, JSONEncodable, Hashable { +public enum LoginChallengeTypes: Codable { case typeAppleLoginChallenge(AppleLoginChallenge) case typePlexAuthenticationChallenge(PlexAuthenticationChallenge) case typeRedirectChallenge(RedirectChallenge) @@ -40,4 +37,3 @@ public enum LoginChallengeTypes: Codable, JSONEncodable, Hashable { } } } - diff --git a/authentikClient/Sources/Models/LoginMetrics.swift b/authentikClient/Sources/Models/LoginMetrics.swift new file mode 100644 index 0000000..09c4b8e --- /dev/null +++ b/authentikClient/Sources/Models/LoginMetrics.swift @@ -0,0 +1,41 @@ +// +// LoginMetrics.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Login Metrics per 1h +public struct LoginMetrics: Codable { + public var logins: [Coordinate] + public var loginsFailed: [Coordinate] + public var authorizations: [Coordinate] + + public init(logins: [Coordinate], loginsFailed: [Coordinate], authorizations: [Coordinate]) { + self.logins = logins + self.loginsFailed = loginsFailed + self.authorizations = authorizations + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case logins + case loginsFailed = "logins_failed" + case authorizations + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + logins = try container.decode([Coordinate].self, forKey: .logins) + loginsFailed = try container.decode([Coordinate].self, forKey: .loginsFailed) + authorizations = try container.decode([Coordinate].self, forKey: .authorizations) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(logins, forKey: .logins) + try container.encode(loginsFailed, forKey: .loginsFailed) + try container.encode(authorizations, forKey: .authorizations) + } +} diff --git a/authentikClient/Sources/Models/LoginSource.swift b/authentikClient/Sources/Models/LoginSource.swift new file mode 100644 index 0000000..fb59d16 --- /dev/null +++ b/authentikClient/Sources/Models/LoginSource.swift @@ -0,0 +1,41 @@ +// +// LoginSource.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Login buttons of sources +public struct LoginSource: Codable { + public var name: String + public var iconUrl: String? + public var challenge: LoginChallengeTypes + + public init(name: String, iconUrl: String? = nil, challenge: LoginChallengeTypes) { + self.name = name + self.iconUrl = iconUrl + self.challenge = challenge + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case iconUrl = "icon_url" + case challenge + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + iconUrl = try container.decodeIfPresent(String.self, forKey: .iconUrl) + challenge = try container.decode(LoginChallengeTypes.self, forKey: .challenge) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(iconUrl, forKey: .iconUrl) + try container.encode(challenge, forKey: .challenge) + } +} diff --git a/authentikClient/Sources/Models/Metadata.swift b/authentikClient/Sources/Models/Metadata.swift new file mode 100644 index 0000000..59715fd --- /dev/null +++ b/authentikClient/Sources/Models/Metadata.swift @@ -0,0 +1,19 @@ +// +// Metadata.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for blueprint metadata +public struct Metadata: Codable { + public var name: String + public var labels: [String: AnyCodable] + + public init(name: String, labels: [String: AnyCodable]) { + self.name = name + self.labels = labels + } +} diff --git a/authentikClient/Sources/Models/MobileDevice.swift b/authentikClient/Sources/Models/MobileDevice.swift new file mode 100644 index 0000000..ed0cd50 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDevice.swift @@ -0,0 +1,70 @@ +// +// MobileDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Mobile authenticator devices +public struct MobileDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + public var lastCheckin: MobileDeviceInfo + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool, lastCheckin: MobileDeviceInfo) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + self.lastCheckin = lastCheckin + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + case lastCheckin = "last_checkin" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + lastCheckin = try container.decode(MobileDeviceInfo.self, forKey: .lastCheckin) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + try container.encode(lastCheckin, forKey: .lastCheckin) + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceEnrollmentCallback.swift b/authentikClient/Sources/Models/MobileDeviceEnrollmentCallback.swift new file mode 100644 index 0000000..e8caace --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceEnrollmentCallback.swift @@ -0,0 +1,16 @@ +// +// MobileDeviceEnrollmentCallback.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MobileDeviceEnrollmentCallback: Codable { + public var token: String + + public init(token: String) { + self.token = token + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceEnrollmentRequest.swift b/authentikClient/Sources/Models/MobileDeviceEnrollmentRequest.swift new file mode 100644 index 0000000..9afe870 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceEnrollmentRequest.swift @@ -0,0 +1,36 @@ +// +// MobileDeviceEnrollmentRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Enrollment request, send the device's unique identifier +public struct MobileDeviceEnrollmentRequest: Codable { + public var deviceUid: String + public var info: MobileDeviceInfoRequest + + public init(deviceUid: String, info: MobileDeviceInfoRequest) { + self.deviceUid = deviceUid + self.info = info + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deviceUid = "device_uid" + case info + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + deviceUid = try container.decode(String.self, forKey: .deviceUid) + info = try container.decode(MobileDeviceInfoRequest.self, forKey: .info) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deviceUid, forKey: .deviceUid) + try container.encode(info, forKey: .info) + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceEnrollmentStatus.swift b/authentikClient/Sources/Models/MobileDeviceEnrollmentStatus.swift new file mode 100644 index 0000000..209ef9e --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceEnrollmentStatus.swift @@ -0,0 +1,16 @@ +// +// MobileDeviceEnrollmentStatus.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MobileDeviceEnrollmentStatus: Codable { + public var status: MobileDeviceEnrollmentStatusStatusEnum + + public init(status: MobileDeviceEnrollmentStatusStatusEnum) { + self.status = status + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceEnrollmentStatusStatusEnum.swift b/authentikClient/Sources/Models/MobileDeviceEnrollmentStatusStatusEnum.swift new file mode 100644 index 0000000..2e4d394 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceEnrollmentStatusStatusEnum.swift @@ -0,0 +1,15 @@ +// +// MobileDeviceEnrollmentStatusStatusEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `success` - Success * `waiting` - Waiting +public enum MobileDeviceEnrollmentStatusStatusEnum: String, Codable, CaseIterable { + case success = "success" + case waiting = "waiting" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/MobileDeviceInfo.swift b/authentikClient/Sources/Models/MobileDeviceInfo.swift new file mode 100644 index 0000000..60f0378 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceInfo.swift @@ -0,0 +1,56 @@ +// +// MobileDeviceInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Info about a mobile device +public struct MobileDeviceInfo: Codable { + public var platform: PlatformEnum + public var osVersion: String + public var model: String + public var hostname: String + public var appVersion: String + public var others: [String: AnyCodable] + + public init(platform: PlatformEnum, osVersion: String, model: String, hostname: String, appVersion: String, others: [String: AnyCodable]) { + self.platform = platform + self.osVersion = osVersion + self.model = model + self.hostname = hostname + self.appVersion = appVersion + self.others = others + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case platform + case osVersion = "os_version" + case model + case hostname + case appVersion = "app_version" + case others + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + platform = try container.decode(PlatformEnum.self, forKey: .platform) + osVersion = try container.decode(String.self, forKey: .osVersion) + model = try container.decode(String.self, forKey: .model) + hostname = try container.decode(String.self, forKey: .hostname) + appVersion = try container.decode(String.self, forKey: .appVersion) + others = try container.decode([String: AnyCodable].self, forKey: .others) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(platform, forKey: .platform) + try container.encode(osVersion, forKey: .osVersion) + try container.encode(model, forKey: .model) + try container.encode(hostname, forKey: .hostname) + try container.encode(appVersion, forKey: .appVersion) + try container.encode(others, forKey: .others) + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceInfoRequest.swift b/authentikClient/Sources/Models/MobileDeviceInfoRequest.swift new file mode 100644 index 0000000..ce1b159 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceInfoRequest.swift @@ -0,0 +1,56 @@ +// +// MobileDeviceInfoRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Info about a mobile device +public struct MobileDeviceInfoRequest: Codable { + public var platform: PlatformEnum + public var osVersion: String + public var model: String + public var hostname: String + public var appVersion: String + public var others: [String: AnyCodable] + + public init(platform: PlatformEnum, osVersion: String, model: String, hostname: String, appVersion: String, others: [String: AnyCodable]) { + self.platform = platform + self.osVersion = osVersion + self.model = model + self.hostname = hostname + self.appVersion = appVersion + self.others = others + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case platform + case osVersion = "os_version" + case model + case hostname + case appVersion = "app_version" + case others + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + platform = try container.decode(PlatformEnum.self, forKey: .platform) + osVersion = try container.decode(String.self, forKey: .osVersion) + model = try container.decode(String.self, forKey: .model) + hostname = try container.decode(String.self, forKey: .hostname) + appVersion = try container.decode(String.self, forKey: .appVersion) + others = try container.decode([String: AnyCodable].self, forKey: .others) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(platform, forKey: .platform) + try container.encode(osVersion, forKey: .osVersion) + try container.encode(model, forKey: .model) + try container.encode(hostname, forKey: .hostname) + try container.encode(appVersion, forKey: .appVersion) + try container.encode(others, forKey: .others) + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceRequest.swift b/authentikClient/Sources/Models/MobileDeviceRequest.swift new file mode 100644 index 0000000..61b050f --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// MobileDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Mobile authenticator devices +public struct MobileDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceResponseRequest.swift b/authentikClient/Sources/Models/MobileDeviceResponseRequest.swift new file mode 100644 index 0000000..4909647 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceResponseRequest.swift @@ -0,0 +1,36 @@ +// +// MobileDeviceResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Response from push sent to phone +public struct MobileDeviceResponseRequest: Codable { + public var txId: UUID + public var selectedItem: String + + public init(txId: UUID, selectedItem: String) { + self.txId = txId + self.selectedItem = selectedItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case txId = "tx_id" + case selectedItem = "selected_item" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + txId = try container.decode(UUID.self, forKey: .txId) + selectedItem = try container.decode(String.self, forKey: .selectedItem) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(txId, forKey: .txId) + try container.encode(selectedItem, forKey: .selectedItem) + } +} diff --git a/authentikClient/Sources/Models/MobileDeviceSetPushKeyRequest.swift b/authentikClient/Sources/Models/MobileDeviceSetPushKeyRequest.swift new file mode 100644 index 0000000..199be77 --- /dev/null +++ b/authentikClient/Sources/Models/MobileDeviceSetPushKeyRequest.swift @@ -0,0 +1,31 @@ +// +// MobileDeviceSetPushKeyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Set notification key +public struct MobileDeviceSetPushKeyRequest: Codable { + public var firebaseKey: String + + public init(firebaseKey: String) { + self.firebaseKey = firebaseKey + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case firebaseKey = "firebase_key" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + firebaseKey = try container.decode(String.self, forKey: .firebaseKey) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(firebaseKey, forKey: .firebaseKey) + } +} diff --git a/authentikClient/Sources/Models/ModelEnum.swift b/authentikClient/Sources/Models/ModelEnum.swift new file mode 100644 index 0000000..b6ecf5a --- /dev/null +++ b/authentikClient/Sources/Models/ModelEnum.swift @@ -0,0 +1,89 @@ +// +// ModelEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License +public enum ModelEnum: String, Codable, CaseIterable { + case cryptoCertificatekeypair = "authentik_crypto.certificatekeypair" + case eventsEvent = "authentik_events.event" + case eventsNotificationtransport = "authentik_events.notificationtransport" + case eventsNotification = "authentik_events.notification" + case eventsNotificationrule = "authentik_events.notificationrule" + case eventsNotificationwebhookmapping = "authentik_events.notificationwebhookmapping" + case flowsFlow = "authentik_flows.flow" + case flowsFlowstagebinding = "authentik_flows.flowstagebinding" + case outpostsDockerserviceconnection = "authentik_outposts.dockerserviceconnection" + case outpostsKubernetesserviceconnection = "authentik_outposts.kubernetesserviceconnection" + case outpostsOutpost = "authentik_outposts.outpost" + case policiesDummyDummypolicy = "authentik_policies_dummy.dummypolicy" + case policiesEventMatcherEventmatcherpolicy = "authentik_policies_event_matcher.eventmatcherpolicy" + case policiesExpiryPasswordexpirypolicy = "authentik_policies_expiry.passwordexpirypolicy" + case policiesExpressionExpressionpolicy = "authentik_policies_expression.expressionpolicy" + case policiesPasswordPasswordpolicy = "authentik_policies_password.passwordpolicy" + case policiesReputationReputationpolicy = "authentik_policies_reputation.reputationpolicy" + case policiesReputationReputation = "authentik_policies_reputation.reputation" + case policiesPolicybinding = "authentik_policies.policybinding" + case providersLdapLdapprovider = "authentik_providers_ldap.ldapprovider" + case providersOauth2Scopemapping = "authentik_providers_oauth2.scopemapping" + case providersOauth2Oauth2provider = "authentik_providers_oauth2.oauth2provider" + case providersOauth2Authorizationcode = "authentik_providers_oauth2.authorizationcode" + case providersOauth2Accesstoken = "authentik_providers_oauth2.accesstoken" + case providersOauth2Refreshtoken = "authentik_providers_oauth2.refreshtoken" + case providersProxyProxyprovider = "authentik_providers_proxy.proxyprovider" + case providersRadiusRadiusprovider = "authentik_providers_radius.radiusprovider" + case providersSamlSamlprovider = "authentik_providers_saml.samlprovider" + case providersSamlSamlpropertymapping = "authentik_providers_saml.samlpropertymapping" + case providersScimScimprovider = "authentik_providers_scim.scimprovider" + case providersScimScimmapping = "authentik_providers_scim.scimmapping" + case rbacRole = "authentik_rbac.role" + case sourcesLdapLdapsource = "authentik_sources_ldap.ldapsource" + case sourcesLdapLdappropertymapping = "authentik_sources_ldap.ldappropertymapping" + case sourcesOauthOauthsource = "authentik_sources_oauth.oauthsource" + case sourcesOauthUseroauthsourceconnection = "authentik_sources_oauth.useroauthsourceconnection" + case sourcesPlexPlexsource = "authentik_sources_plex.plexsource" + case sourcesPlexPlexsourceconnection = "authentik_sources_plex.plexsourceconnection" + case sourcesSamlSamlsource = "authentik_sources_saml.samlsource" + case sourcesSamlUsersamlsourceconnection = "authentik_sources_saml.usersamlsourceconnection" + case stagesAuthenticatorDuoAuthenticatorduostage = "authentik_stages_authenticator_duo.authenticatorduostage" + case stagesAuthenticatorDuoDuodevice = "authentik_stages_authenticator_duo.duodevice" + case stagesAuthenticatorMobileAuthenticatormobilestage = "authentik_stages_authenticator_mobile.authenticatormobilestage" + case stagesAuthenticatorMobileMobiledevice = "authentik_stages_authenticator_mobile.mobiledevice" + case stagesAuthenticatorSmsAuthenticatorsmsstage = "authentik_stages_authenticator_sms.authenticatorsmsstage" + case stagesAuthenticatorSmsSmsdevice = "authentik_stages_authenticator_sms.smsdevice" + case stagesAuthenticatorStaticAuthenticatorstaticstage = "authentik_stages_authenticator_static.authenticatorstaticstage" + case stagesAuthenticatorStaticStaticdevice = "authentik_stages_authenticator_static.staticdevice" + case stagesAuthenticatorTotpAuthenticatortotpstage = "authentik_stages_authenticator_totp.authenticatortotpstage" + case stagesAuthenticatorTotpTotpdevice = "authentik_stages_authenticator_totp.totpdevice" + case stagesAuthenticatorValidateAuthenticatorvalidatestage = "authentik_stages_authenticator_validate.authenticatorvalidatestage" + case stagesAuthenticatorWebauthnAuthenticatewebauthnstage = "authentik_stages_authenticator_webauthn.authenticatewebauthnstage" + case stagesAuthenticatorWebauthnWebauthndevice = "authentik_stages_authenticator_webauthn.webauthndevice" + case stagesCaptchaCaptchastage = "authentik_stages_captcha.captchastage" + case stagesConsentConsentstage = "authentik_stages_consent.consentstage" + case stagesConsentUserconsent = "authentik_stages_consent.userconsent" + case stagesDenyDenystage = "authentik_stages_deny.denystage" + case stagesDummyDummystage = "authentik_stages_dummy.dummystage" + case stagesEmailEmailstage = "authentik_stages_email.emailstage" + case stagesIdentificationIdentificationstage = "authentik_stages_identification.identificationstage" + case stagesInvitationInvitationstage = "authentik_stages_invitation.invitationstage" + case stagesInvitationInvitation = "authentik_stages_invitation.invitation" + case stagesPasswordPasswordstage = "authentik_stages_password.passwordstage" + case stagesPromptPrompt = "authentik_stages_prompt.prompt" + case stagesPromptPromptstage = "authentik_stages_prompt.promptstage" + case stagesUserDeleteUserdeletestage = "authentik_stages_user_delete.userdeletestage" + case stagesUserLoginUserloginstage = "authentik_stages_user_login.userloginstage" + case stagesUserLogoutUserlogoutstage = "authentik_stages_user_logout.userlogoutstage" + case stagesUserWriteUserwritestage = "authentik_stages_user_write.userwritestage" + case tenantsTenant = "authentik_tenants.tenant" + case blueprintsBlueprintinstance = "authentik_blueprints.blueprintinstance" + case coreGroup = "authentik_core.group" + case coreUser = "authentik_core.user" + case coreApplication = "authentik_core.application" + case coreToken = "authentik_core.token" + case enterpriseLicense = "authentik_enterprise.license" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Classes/OpenAPIs/Models/ModelRequest.swift b/authentikClient/Sources/Models/ModelRequest.swift similarity index 95% rename from authentikClient/Classes/OpenAPIs/Models/ModelRequest.swift rename to authentikClient/Sources/Models/ModelRequest.swift index 4a69f9d..ed677e1 100644 --- a/authentikClient/Classes/OpenAPIs/Models/ModelRequest.swift +++ b/authentikClient/Sources/Models/ModelRequest.swift @@ -6,11 +6,8 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -public enum ModelRequest: Codable, JSONEncodable, Hashable { +public enum ModelRequest: Codable { case typeLDAPProviderRequest(LDAPProviderRequest) case typeOAuth2ProviderRequest(OAuth2ProviderRequest) case typeProxyProviderRequest(ProxyProviderRequest) @@ -55,4 +52,3 @@ public enum ModelRequest: Codable, JSONEncodable, Hashable { } } } - diff --git a/authentikClient/Sources/Models/NameIdPolicyEnum.swift b/authentikClient/Sources/Models/NameIdPolicyEnum.swift new file mode 100644 index 0000000..8bd379d --- /dev/null +++ b/authentikClient/Sources/Models/NameIdPolicyEnum.swift @@ -0,0 +1,18 @@ +// +// NameIdPolicyEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient +public enum NameIdPolicyEnum: String, Codable, CaseIterable { + case _1_1_nameid_format_emailAddress = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" + case _2_0_nameid_format_persistent = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + case _2_0_nameid_format_X509SubjectName = "urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName" + case _2_0_nameid_format_WindowsDomainQualifiedName = "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" + case _2_0_nameid_format_transient = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/NotConfiguredActionEnum.swift b/authentikClient/Sources/Models/NotConfiguredActionEnum.swift new file mode 100644 index 0000000..684eacb --- /dev/null +++ b/authentikClient/Sources/Models/NotConfiguredActionEnum.swift @@ -0,0 +1,16 @@ +// +// NotConfiguredActionEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `skip` - Skip * `deny` - Deny * `configure` - Configure +public enum NotConfiguredActionEnum: String, Codable, CaseIterable { + case skip = "skip" + case deny = "deny" + case configure = "configure" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Notification.swift b/authentikClient/Sources/Models/Notification.swift new file mode 100644 index 0000000..76b515f --- /dev/null +++ b/authentikClient/Sources/Models/Notification.swift @@ -0,0 +1,27 @@ +// +// Notification.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Notification Serializer +public struct Notification: Codable { + public var pk: UUID + public var severity: SeverityEnum + public var body: String + public var created: Date + public var event: Event? + public var seen: Bool? + + public init(pk: UUID, severity: SeverityEnum, body: String, created: Date, event: Event? = nil, seen: Bool? = nil) { + self.pk = pk + self.severity = severity + self.body = body + self.created = created + self.event = event + self.seen = seen + } +} diff --git a/authentikClient/Sources/Models/NotificationRequest.swift b/authentikClient/Sources/Models/NotificationRequest.swift new file mode 100644 index 0000000..4f055ed --- /dev/null +++ b/authentikClient/Sources/Models/NotificationRequest.swift @@ -0,0 +1,19 @@ +// +// NotificationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Notification Serializer +public struct NotificationRequest: Codable { + public var event: EventRequest? + public var seen: Bool? + + public init(event: EventRequest? = nil, seen: Bool? = nil) { + self.event = event + self.seen = seen + } +} diff --git a/authentikClient/Sources/Models/NotificationRule.swift b/authentikClient/Sources/Models/NotificationRule.swift new file mode 100644 index 0000000..39607e4 --- /dev/null +++ b/authentikClient/Sources/Models/NotificationRule.swift @@ -0,0 +1,58 @@ +// +// NotificationRule.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationRule Serializer +public struct NotificationRule: Codable { + public var pk: UUID + public var name: String + /// Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. + public var transports: [UUID]? + public var severity: SeverityEnum? + /// Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + public var group: UUID? + public var groupObj: Group + + public init(pk: UUID, name: String, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil, groupObj: Group) { + self.pk = pk + self.name = name + self.transports = transports + self.severity = severity + self.group = group + self.groupObj = groupObj + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case transports + case severity + case group + case groupObj = "group_obj" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + transports = try container.decodeIfPresent([UUID].self, forKey: .transports) + severity = try container.decodeIfPresent(SeverityEnum.self, forKey: .severity) + group = try container.decodeIfPresent(UUID.self, forKey: .group) + groupObj = try container.decode(Group.self, forKey: .groupObj) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(transports, forKey: .transports) + try container.encodeIfPresent(severity, forKey: .severity) + try container.encodeIfPresent(group, forKey: .group) + try container.encode(groupObj, forKey: .groupObj) + } +} diff --git a/authentikClient/Sources/Models/NotificationRuleRequest.swift b/authentikClient/Sources/Models/NotificationRuleRequest.swift new file mode 100644 index 0000000..65b352b --- /dev/null +++ b/authentikClient/Sources/Models/NotificationRuleRequest.swift @@ -0,0 +1,25 @@ +// +// NotificationRuleRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationRule Serializer +public struct NotificationRuleRequest: Codable { + public var name: String + /// Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. + public var transports: [UUID]? + public var severity: SeverityEnum? + /// Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + public var group: UUID? + + public init(name: String, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil) { + self.name = name + self.transports = transports + self.severity = severity + self.group = group + } +} diff --git a/authentikClient/Sources/Models/NotificationTransport.swift b/authentikClient/Sources/Models/NotificationTransport.swift new file mode 100644 index 0000000..19b491b --- /dev/null +++ b/authentikClient/Sources/Models/NotificationTransport.swift @@ -0,0 +1,63 @@ +// +// NotificationTransport.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationTransport Serializer +public struct NotificationTransport: Codable { + public var pk: UUID + public var name: String + public var mode: NotificationTransportModeEnum? + /// Return selected mode with a UI Label + public var modeVerbose: String + public var webhookUrl: String? + public var webhookMapping: UUID? + /// Only send notification once, for example when sending a webhook into a chat channel. + public var sendOnce: Bool? + + public init(pk: UUID, name: String, mode: NotificationTransportModeEnum? = nil, modeVerbose: String, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { + self.pk = pk + self.name = name + self.mode = mode + self.modeVerbose = modeVerbose + self.webhookUrl = webhookUrl + self.webhookMapping = webhookMapping + self.sendOnce = sendOnce + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case mode + case modeVerbose = "mode_verbose" + case webhookUrl = "webhook_url" + case webhookMapping = "webhook_mapping" + case sendOnce = "send_once" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + mode = try container.decodeIfPresent(NotificationTransportModeEnum.self, forKey: .mode) + modeVerbose = try container.decode(String.self, forKey: .modeVerbose) + webhookUrl = try container.decodeIfPresent(String.self, forKey: .webhookUrl) + webhookMapping = try container.decodeIfPresent(UUID.self, forKey: .webhookMapping) + sendOnce = try container.decodeIfPresent(Bool.self, forKey: .sendOnce) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encode(modeVerbose, forKey: .modeVerbose) + try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) + try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) + try container.encodeIfPresent(sendOnce, forKey: .sendOnce) + } +} diff --git a/authentikClient/Sources/Models/NotificationTransportModeEnum.swift b/authentikClient/Sources/Models/NotificationTransportModeEnum.swift new file mode 100644 index 0000000..4167efa --- /dev/null +++ b/authentikClient/Sources/Models/NotificationTransportModeEnum.swift @@ -0,0 +1,17 @@ +// +// NotificationTransportModeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email +public enum NotificationTransportModeEnum: String, Codable, CaseIterable { + case local = "local" + case webhook = "webhook" + case webhookSlack = "webhook_slack" + case email = "email" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/NotificationTransportRequest.swift b/authentikClient/Sources/Models/NotificationTransportRequest.swift new file mode 100644 index 0000000..0d8ad2e --- /dev/null +++ b/authentikClient/Sources/Models/NotificationTransportRequest.swift @@ -0,0 +1,52 @@ +// +// NotificationTransportRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationTransport Serializer +public struct NotificationTransportRequest: Codable { + public var name: String + public var mode: NotificationTransportModeEnum? + public var webhookUrl: String? + public var webhookMapping: UUID? + /// Only send notification once, for example when sending a webhook into a chat channel. + public var sendOnce: Bool? + + public init(name: String, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { + self.name = name + self.mode = mode + self.webhookUrl = webhookUrl + self.webhookMapping = webhookMapping + self.sendOnce = sendOnce + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case mode + case webhookUrl = "webhook_url" + case webhookMapping = "webhook_mapping" + case sendOnce = "send_once" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + mode = try container.decodeIfPresent(NotificationTransportModeEnum.self, forKey: .mode) + webhookUrl = try container.decodeIfPresent(String.self, forKey: .webhookUrl) + webhookMapping = try container.decodeIfPresent(UUID.self, forKey: .webhookMapping) + sendOnce = try container.decodeIfPresent(Bool.self, forKey: .sendOnce) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) + try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) + try container.encodeIfPresent(sendOnce, forKey: .sendOnce) + } +} diff --git a/authentikClient/Sources/Models/NotificationTransportTest.swift b/authentikClient/Sources/Models/NotificationTransportTest.swift new file mode 100644 index 0000000..cd671e1 --- /dev/null +++ b/authentikClient/Sources/Models/NotificationTransportTest.swift @@ -0,0 +1,17 @@ +// +// NotificationTransportTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Notification test serializer +public struct NotificationTransportTest: Codable { + public var messages: [String] + + public init(messages: [String]) { + self.messages = messages + } +} diff --git a/authentikClient/Sources/Models/NotificationWebhookMapping.swift b/authentikClient/Sources/Models/NotificationWebhookMapping.swift new file mode 100644 index 0000000..f62778e --- /dev/null +++ b/authentikClient/Sources/Models/NotificationWebhookMapping.swift @@ -0,0 +1,21 @@ +// +// NotificationWebhookMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationWebhookMapping Serializer +public struct NotificationWebhookMapping: Codable { + public var pk: UUID + public var name: String + public var expression: String + + public init(pk: UUID, name: String, expression: String) { + self.pk = pk + self.name = name + self.expression = expression + } +} diff --git a/authentikClient/Sources/Models/NotificationWebhookMappingRequest.swift b/authentikClient/Sources/Models/NotificationWebhookMappingRequest.swift new file mode 100644 index 0000000..470d62d --- /dev/null +++ b/authentikClient/Sources/Models/NotificationWebhookMappingRequest.swift @@ -0,0 +1,19 @@ +// +// NotificationWebhookMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationWebhookMapping Serializer +public struct NotificationWebhookMappingRequest: Codable { + public var name: String + public var expression: String + + public init(name: String, expression: String) { + self.name = name + self.expression = expression + } +} diff --git a/authentikClient/Sources/Models/OAuth2Provider.swift b/authentikClient/Sources/Models/OAuth2Provider.swift new file mode 100644 index 0000000..b3478a7 --- /dev/null +++ b/authentikClient/Sources/Models/OAuth2Provider.swift @@ -0,0 +1,167 @@ +// +// OAuth2Provider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth2Provider Serializer +public struct OAuth2Provider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var clientType: ClientTypeEnum? + public var clientId: String? + public var clientSecret: String? + /// Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessCodeValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + /// Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + public var includeClaimsInIdToken: Bool? + /// Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. + public var signingKey: UUID? + /// Enter each URI on a new line. + public var redirectUris: String? + public var subMode: SubModeEnum? + public var issuerMode: IssuerModeEnum? + public var jwksSources: [UUID]? + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.clientType = clientType + self.clientId = clientId + self.clientSecret = clientSecret + self.accessCodeValidity = accessCodeValidity + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + self.includeClaimsInIdToken = includeClaimsInIdToken + self.signingKey = signingKey + self.redirectUris = redirectUris + self.subMode = subMode + self.issuerMode = issuerMode + self.jwksSources = jwksSources + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case clientType = "client_type" + case clientId = "client_id" + case clientSecret = "client_secret" + case accessCodeValidity = "access_code_validity" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + case includeClaimsInIdToken = "include_claims_in_id_token" + case signingKey = "signing_key" + case redirectUris = "redirect_uris" + case subMode = "sub_mode" + case issuerMode = "issuer_mode" + case jwksSources = "jwks_sources" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + clientType = try container.decodeIfPresent(ClientTypeEnum.self, forKey: .clientType) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) + accessCodeValidity = try container.decodeIfPresent(String.self, forKey: .accessCodeValidity) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + includeClaimsInIdToken = try container.decodeIfPresent(Bool.self, forKey: .includeClaimsInIdToken) + signingKey = try container.decodeIfPresent(UUID.self, forKey: .signingKey) + redirectUris = try container.decodeIfPresent(String.self, forKey: .redirectUris) + subMode = try container.decodeIfPresent(SubModeEnum.self, forKey: .subMode) + issuerMode = try container.decodeIfPresent(IssuerModeEnum.self, forKey: .issuerMode) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(clientType, forKey: .clientType) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(clientSecret, forKey: .clientSecret) + try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) + try container.encodeIfPresent(signingKey, forKey: .signingKey) + try container.encodeIfPresent(redirectUris, forKey: .redirectUris) + try container.encodeIfPresent(subMode, forKey: .subMode) + try container.encodeIfPresent(issuerMode, forKey: .issuerMode) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + } +} diff --git a/authentikClient/Sources/Models/OAuth2ProviderRequest.swift b/authentikClient/Sources/Models/OAuth2ProviderRequest.swift new file mode 100644 index 0000000..7bd1692 --- /dev/null +++ b/authentikClient/Sources/Models/OAuth2ProviderRequest.swift @@ -0,0 +1,114 @@ +// +// OAuth2ProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth2Provider Serializer +public struct OAuth2ProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + public var clientType: ClientTypeEnum? + public var clientId: String? + public var clientSecret: String? + /// Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessCodeValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + /// Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + public var includeClaimsInIdToken: Bool? + /// Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. + public var signingKey: UUID? + /// Enter each URI on a new line. + public var redirectUris: String? + public var subMode: SubModeEnum? + public var issuerMode: IssuerModeEnum? + public var jwksSources: [UUID]? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.clientType = clientType + self.clientId = clientId + self.clientSecret = clientSecret + self.accessCodeValidity = accessCodeValidity + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + self.includeClaimsInIdToken = includeClaimsInIdToken + self.signingKey = signingKey + self.redirectUris = redirectUris + self.subMode = subMode + self.issuerMode = issuerMode + self.jwksSources = jwksSources + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case clientType = "client_type" + case clientId = "client_id" + case clientSecret = "client_secret" + case accessCodeValidity = "access_code_validity" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + case includeClaimsInIdToken = "include_claims_in_id_token" + case signingKey = "signing_key" + case redirectUris = "redirect_uris" + case subMode = "sub_mode" + case issuerMode = "issuer_mode" + case jwksSources = "jwks_sources" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + clientType = try container.decodeIfPresent(ClientTypeEnum.self, forKey: .clientType) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) + accessCodeValidity = try container.decodeIfPresent(String.self, forKey: .accessCodeValidity) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + includeClaimsInIdToken = try container.decodeIfPresent(Bool.self, forKey: .includeClaimsInIdToken) + signingKey = try container.decodeIfPresent(UUID.self, forKey: .signingKey) + redirectUris = try container.decodeIfPresent(String.self, forKey: .redirectUris) + subMode = try container.decodeIfPresent(SubModeEnum.self, forKey: .subMode) + issuerMode = try container.decodeIfPresent(IssuerModeEnum.self, forKey: .issuerMode) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(clientType, forKey: .clientType) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(clientSecret, forKey: .clientSecret) + try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) + try container.encodeIfPresent(signingKey, forKey: .signingKey) + try container.encodeIfPresent(redirectUris, forKey: .redirectUris) + try container.encodeIfPresent(subMode, forKey: .subMode) + try container.encodeIfPresent(issuerMode, forKey: .issuerMode) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + } +} diff --git a/authentikClient/Sources/Models/OAuth2ProviderSetupURLs.swift b/authentikClient/Sources/Models/OAuth2ProviderSetupURLs.swift new file mode 100644 index 0000000..7285ac7 --- /dev/null +++ b/authentikClient/Sources/Models/OAuth2ProviderSetupURLs.swift @@ -0,0 +1,61 @@ +// +// OAuth2ProviderSetupURLs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth2 Provider Metadata serializer +public struct OAuth2ProviderSetupURLs: Codable { + public var issuer: String + public var authorize: String + public var token: String + public var userInfo: String + public var providerInfo: String + public var logout: String + public var jwks: String + + public init(issuer: String, authorize: String, token: String, userInfo: String, providerInfo: String, logout: String, jwks: String) { + self.issuer = issuer + self.authorize = authorize + self.token = token + self.userInfo = userInfo + self.providerInfo = providerInfo + self.logout = logout + self.jwks = jwks + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case issuer + case authorize + case token + case userInfo = "user_info" + case providerInfo = "provider_info" + case logout + case jwks + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + issuer = try container.decode(String.self, forKey: .issuer) + authorize = try container.decode(String.self, forKey: .authorize) + token = try container.decode(String.self, forKey: .token) + userInfo = try container.decode(String.self, forKey: .userInfo) + providerInfo = try container.decode(String.self, forKey: .providerInfo) + logout = try container.decode(String.self, forKey: .logout) + jwks = try container.decode(String.self, forKey: .jwks) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(issuer, forKey: .issuer) + try container.encode(authorize, forKey: .authorize) + try container.encode(token, forKey: .token) + try container.encode(userInfo, forKey: .userInfo) + try container.encode(providerInfo, forKey: .providerInfo) + try container.encode(logout, forKey: .logout) + try container.encode(jwks, forKey: .jwks) + } +} diff --git a/authentikClient/Sources/Models/OAuthDeviceCodeChallenge.swift b/authentikClient/Sources/Models/OAuthDeviceCodeChallenge.swift new file mode 100644 index 0000000..57a6b92 --- /dev/null +++ b/authentikClient/Sources/Models/OAuthDeviceCodeChallenge.swift @@ -0,0 +1,46 @@ +// +// OAuthDeviceCodeChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Device code challenge +public struct OAuthDeviceCodeChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-provider-oauth2-device-code" + public var responseErrors: [String: [ErrorDetail]]? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-provider-oauth2-device-code", responseErrors: [String: [ErrorDetail]]? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + } +} diff --git a/authentikClient/Sources/Models/OAuthDeviceCodeChallengeResponseRequest.swift b/authentikClient/Sources/Models/OAuthDeviceCodeChallengeResponseRequest.swift new file mode 100644 index 0000000..b13df46 --- /dev/null +++ b/authentikClient/Sources/Models/OAuthDeviceCodeChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// OAuthDeviceCodeChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Response that includes the user-entered device code +public struct OAuthDeviceCodeChallengeResponseRequest: Codable { + public var component: String? = "ak-provider-oauth2-device-code" + public var code: Int + + public init(component: String? = "ak-provider-oauth2-device-code", code: Int) { + self.component = component + self.code = code + } +} diff --git a/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallenge.swift b/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallenge.swift new file mode 100644 index 0000000..a2dcf70 --- /dev/null +++ b/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallenge.swift @@ -0,0 +1,46 @@ +// +// OAuthDeviceCodeFinishChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Final challenge after user enters their code +public struct OAuthDeviceCodeFinishChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-provider-oauth2-device-code-finish" + public var responseErrors: [String: [ErrorDetail]]? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-provider-oauth2-device-code-finish", responseErrors: [String: [ErrorDetail]]? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + } +} diff --git a/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift b/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift new file mode 100644 index 0000000..b142984 --- /dev/null +++ b/authentikClient/Sources/Models/OAuthDeviceCodeFinishChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// OAuthDeviceCodeFinishChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Response that device has been authenticated and tab can be closed +public struct OAuthDeviceCodeFinishChallengeResponseRequest: Codable { + public var component: String? = "ak-provider-oauth2-device-code-finish" + + public init(component: String? = "ak-provider-oauth2-device-code-finish") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/OAuthSource.swift b/authentikClient/Sources/Models/OAuthSource.swift new file mode 100644 index 0000000..1b0892a --- /dev/null +++ b/authentikClient/Sources/Models/OAuthSource.swift @@ -0,0 +1,176 @@ +// +// OAuthSource.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct OAuthSource: Codable { + public var pk: UUID + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var userPathTemplate: String? + /// Get the URL to the Icon. If the name is /static or starts with http it is returned as-is + public var icon: String? + public var providerType: ProviderTypeEnum + /// URL used to request the initial token. This URL is only required for OAuth 1. + public var requestTokenUrl: String? + /// URL the user is redirect to to conest the flow. + public var authorizationUrl: String? + /// URL used by authentik to retrieve tokens. + public var accessTokenUrl: String? + /// URL used by authentik to get user information. + public var profileUrl: String? + public var consumerKey: String + /// Get OAuth Callback URL + public var callbackUrl: String + public var additionalScopes: String? + public var type: SourceType + public var oidcWellKnownUrl: String? + public var oidcJwksUrl: String? + public var oidcJwks: [String: AnyCodable]? + + public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, providerType: ProviderTypeEnum, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String, callbackUrl: String, additionalScopes: String? = nil, type: SourceType, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { + self.pk = pk + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.managed = managed + self.userPathTemplate = userPathTemplate + self.icon = icon + self.providerType = providerType + self.requestTokenUrl = requestTokenUrl + self.authorizationUrl = authorizationUrl + self.accessTokenUrl = accessTokenUrl + self.profileUrl = profileUrl + self.consumerKey = consumerKey + self.callbackUrl = callbackUrl + self.additionalScopes = additionalScopes + self.type = type + self.oidcWellKnownUrl = oidcWellKnownUrl + self.oidcJwksUrl = oidcJwksUrl + self.oidcJwks = oidcJwks + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case managed + case userPathTemplate = "user_path_template" + case icon + case providerType = "provider_type" + case requestTokenUrl = "request_token_url" + case authorizationUrl = "authorization_url" + case accessTokenUrl = "access_token_url" + case profileUrl = "profile_url" + case consumerKey = "consumer_key" + case callbackUrl = "callback_url" + case additionalScopes = "additional_scopes" + case type + case oidcWellKnownUrl = "oidc_well_known_url" + case oidcJwksUrl = "oidc_jwks_url" + case oidcJwks = "oidc_jwks" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + managed = try container.decode(String.self, forKey: .managed) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + icon = try container.decode(String.self, forKey: .icon) + providerType = try container.decode(ProviderTypeEnum.self, forKey: .providerType) + requestTokenUrl = try container.decodeIfPresent(String.self, forKey: .requestTokenUrl) + authorizationUrl = try container.decodeIfPresent(String.self, forKey: .authorizationUrl) + accessTokenUrl = try container.decodeIfPresent(String.self, forKey: .accessTokenUrl) + profileUrl = try container.decodeIfPresent(String.self, forKey: .profileUrl) + consumerKey = try container.decode(String.self, forKey: .consumerKey) + callbackUrl = try container.decode(String.self, forKey: .callbackUrl) + additionalScopes = try container.decodeIfPresent(String.self, forKey: .additionalScopes) + type = try container.decode(SourceType.self, forKey: .type) + oidcWellKnownUrl = try container.decodeIfPresent(String.self, forKey: .oidcWellKnownUrl) + oidcJwksUrl = try container.decodeIfPresent(String.self, forKey: .oidcJwksUrl) + oidcJwks = try container.decodeIfPresent([String: AnyCodable].self, forKey: .oidcJwks) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encode(managed, forKey: .managed) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(icon, forKey: .icon) + try container.encode(providerType, forKey: .providerType) + try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) + try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) + try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) + try container.encodeIfPresent(profileUrl, forKey: .profileUrl) + try container.encode(consumerKey, forKey: .consumerKey) + try container.encode(callbackUrl, forKey: .callbackUrl) + try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) + try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) + try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) + } +} diff --git a/authentikClient/Sources/Models/OAuthSourceRequest.swift b/authentikClient/Sources/Models/OAuthSourceRequest.swift new file mode 100644 index 0000000..cf2aed9 --- /dev/null +++ b/authentikClient/Sources/Models/OAuthSourceRequest.swift @@ -0,0 +1,129 @@ +// +// OAuthSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct OAuthSourceRequest: Codable { + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + public var providerType: ProviderTypeEnum + /// URL used to request the initial token. This URL is only required for OAuth 1. + public var requestTokenUrl: String? + /// URL the user is redirect to to conest the flow. + public var authorizationUrl: String? + /// URL used by authentik to retrieve tokens. + public var accessTokenUrl: String? + /// URL used by authentik to get user information. + public var profileUrl: String? + public var consumerKey: String + public var consumerSecret: String + public var additionalScopes: String? + public var oidcWellKnownUrl: String? + public var oidcJwksUrl: String? + public var oidcJwks: [String: AnyCodable]? + + public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, providerType: ProviderTypeEnum, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String, consumerSecret: String, additionalScopes: String? = nil, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.providerType = providerType + self.requestTokenUrl = requestTokenUrl + self.authorizationUrl = authorizationUrl + self.accessTokenUrl = accessTokenUrl + self.profileUrl = profileUrl + self.consumerKey = consumerKey + self.consumerSecret = consumerSecret + self.additionalScopes = additionalScopes + self.oidcWellKnownUrl = oidcWellKnownUrl + self.oidcJwksUrl = oidcJwksUrl + self.oidcJwks = oidcJwks + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case providerType = "provider_type" + case requestTokenUrl = "request_token_url" + case authorizationUrl = "authorization_url" + case accessTokenUrl = "access_token_url" + case profileUrl = "profile_url" + case consumerKey = "consumer_key" + case consumerSecret = "consumer_secret" + case additionalScopes = "additional_scopes" + case oidcWellKnownUrl = "oidc_well_known_url" + case oidcJwksUrl = "oidc_jwks_url" + case oidcJwks = "oidc_jwks" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + providerType = try container.decode(ProviderTypeEnum.self, forKey: .providerType) + requestTokenUrl = try container.decodeIfPresent(String.self, forKey: .requestTokenUrl) + authorizationUrl = try container.decodeIfPresent(String.self, forKey: .authorizationUrl) + accessTokenUrl = try container.decodeIfPresent(String.self, forKey: .accessTokenUrl) + profileUrl = try container.decodeIfPresent(String.self, forKey: .profileUrl) + consumerKey = try container.decode(String.self, forKey: .consumerKey) + consumerSecret = try container.decode(String.self, forKey: .consumerSecret) + additionalScopes = try container.decodeIfPresent(String.self, forKey: .additionalScopes) + oidcWellKnownUrl = try container.decodeIfPresent(String.self, forKey: .oidcWellKnownUrl) + oidcJwksUrl = try container.decodeIfPresent(String.self, forKey: .oidcJwksUrl) + oidcJwks = try container.decodeIfPresent([String: AnyCodable].self, forKey: .oidcJwks) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(providerType, forKey: .providerType) + try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) + try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) + try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) + try container.encodeIfPresent(profileUrl, forKey: .profileUrl) + try container.encode(consumerKey, forKey: .consumerKey) + try container.encode(consumerSecret, forKey: .consumerSecret) + try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) + try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) + try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) + try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) + } +} diff --git a/authentikClient/Sources/Models/OpenIDConnectConfiguration.swift b/authentikClient/Sources/Models/OpenIDConnectConfiguration.swift new file mode 100644 index 0000000..f9344e3 --- /dev/null +++ b/authentikClient/Sources/Models/OpenIDConnectConfiguration.swift @@ -0,0 +1,81 @@ +// +// OpenIDConnectConfiguration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// rest_framework Serializer for OIDC Configuration +public struct OpenIDConnectConfiguration: Codable { + public var issuer: String + public var authorizationEndpoint: String + public var tokenEndpoint: String + public var userinfoEndpoint: String + public var endSessionEndpoint: String + public var introspectionEndpoint: String + public var jwksUri: String + public var responseTypesSupported: [String] + public var idTokenSigningAlgValuesSupported: [String] + public var subjectTypesSupported: [String] + public var tokenEndpointAuthMethodsSupported: [String] + + public init(issuer: String, authorizationEndpoint: String, tokenEndpoint: String, userinfoEndpoint: String, endSessionEndpoint: String, introspectionEndpoint: String, jwksUri: String, responseTypesSupported: [String], idTokenSigningAlgValuesSupported: [String], subjectTypesSupported: [String], tokenEndpointAuthMethodsSupported: [String]) { + self.issuer = issuer + self.authorizationEndpoint = authorizationEndpoint + self.tokenEndpoint = tokenEndpoint + self.userinfoEndpoint = userinfoEndpoint + self.endSessionEndpoint = endSessionEndpoint + self.introspectionEndpoint = introspectionEndpoint + self.jwksUri = jwksUri + self.responseTypesSupported = responseTypesSupported + self.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported + self.subjectTypesSupported = subjectTypesSupported + self.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case issuer + case authorizationEndpoint = "authorization_endpoint" + case tokenEndpoint = "token_endpoint" + case userinfoEndpoint = "userinfo_endpoint" + case endSessionEndpoint = "end_session_endpoint" + case introspectionEndpoint = "introspection_endpoint" + case jwksUri = "jwks_uri" + case responseTypesSupported = "response_types_supported" + case idTokenSigningAlgValuesSupported = "id_token_signing_alg_values_supported" + case subjectTypesSupported = "subject_types_supported" + case tokenEndpointAuthMethodsSupported = "token_endpoint_auth_methods_supported" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + issuer = try container.decode(String.self, forKey: .issuer) + authorizationEndpoint = try container.decode(String.self, forKey: .authorizationEndpoint) + tokenEndpoint = try container.decode(String.self, forKey: .tokenEndpoint) + userinfoEndpoint = try container.decode(String.self, forKey: .userinfoEndpoint) + endSessionEndpoint = try container.decode(String.self, forKey: .endSessionEndpoint) + introspectionEndpoint = try container.decode(String.self, forKey: .introspectionEndpoint) + jwksUri = try container.decode(String.self, forKey: .jwksUri) + responseTypesSupported = try container.decode([String].self, forKey: .responseTypesSupported) + idTokenSigningAlgValuesSupported = try container.decode([String].self, forKey: .idTokenSigningAlgValuesSupported) + subjectTypesSupported = try container.decode([String].self, forKey: .subjectTypesSupported) + tokenEndpointAuthMethodsSupported = try container.decode([String].self, forKey: .tokenEndpointAuthMethodsSupported) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(issuer, forKey: .issuer) + try container.encode(authorizationEndpoint, forKey: .authorizationEndpoint) + try container.encode(tokenEndpoint, forKey: .tokenEndpoint) + try container.encode(userinfoEndpoint, forKey: .userinfoEndpoint) + try container.encode(endSessionEndpoint, forKey: .endSessionEndpoint) + try container.encode(introspectionEndpoint, forKey: .introspectionEndpoint) + try container.encode(jwksUri, forKey: .jwksUri) + try container.encode(responseTypesSupported, forKey: .responseTypesSupported) + try container.encode(idTokenSigningAlgValuesSupported, forKey: .idTokenSigningAlgValuesSupported) + try container.encode(subjectTypesSupported, forKey: .subjectTypesSupported) + try container.encode(tokenEndpointAuthMethodsSupported, forKey: .tokenEndpointAuthMethodsSupported) + } +} diff --git a/authentikClient/Sources/Models/Outpost.swift b/authentikClient/Sources/Models/Outpost.swift new file mode 100644 index 0000000..50714fe --- /dev/null +++ b/authentikClient/Sources/Models/Outpost.swift @@ -0,0 +1,79 @@ +// +// Outpost.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Outpost Serializer +public struct Outpost: Codable { + public var pk: UUID + public var name: String + public var type: OutpostTypeEnum + public var providers: [Int] + public var providersObj: [Provider] + /// Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + public var serviceConnection: UUID? + public var serviceConnectionObj: ServiceConnection + /// Get Token identifier + public var tokenIdentifier: String + public var config: [String: AnyCodable] + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + + public init(pk: UUID, name: String, type: OutpostTypeEnum, providers: [Int], providersObj: [Provider], serviceConnection: UUID? = nil, serviceConnectionObj: ServiceConnection, tokenIdentifier: String, config: [String: AnyCodable], managed: String? = nil) { + self.pk = pk + self.name = name + self.type = type + self.providers = providers + self.providersObj = providersObj + self.serviceConnection = serviceConnection + self.serviceConnectionObj = serviceConnectionObj + self.tokenIdentifier = tokenIdentifier + self.config = config + self.managed = managed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case type + case providers + case providersObj = "providers_obj" + case serviceConnection = "service_connection" + case serviceConnectionObj = "service_connection_obj" + case tokenIdentifier = "token_identifier" + case config + case managed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(OutpostTypeEnum.self, forKey: .type) + providers = try container.decode([Int].self, forKey: .providers) + providersObj = try container.decode([Provider].self, forKey: .providersObj) + serviceConnection = try container.decodeIfPresent(UUID.self, forKey: .serviceConnection) + serviceConnectionObj = try container.decode(ServiceConnection.self, forKey: .serviceConnectionObj) + tokenIdentifier = try container.decode(String.self, forKey: .tokenIdentifier) + config = try container.decode([String: AnyCodable].self, forKey: .config) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(providers, forKey: .providers) + try container.encode(providersObj, forKey: .providersObj) + try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) + try container.encode(serviceConnectionObj, forKey: .serviceConnectionObj) + try container.encode(tokenIdentifier, forKey: .tokenIdentifier) + try container.encode(config, forKey: .config) + try container.encodeIfPresent(managed, forKey: .managed) + } +} diff --git a/authentikClient/Sources/Models/OutpostDefaultConfig.swift b/authentikClient/Sources/Models/OutpostDefaultConfig.swift new file mode 100644 index 0000000..18bf2cc --- /dev/null +++ b/authentikClient/Sources/Models/OutpostDefaultConfig.swift @@ -0,0 +1,17 @@ +// +// OutpostDefaultConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Global default outpost config +public struct OutpostDefaultConfig: Codable { + public var config: [String: AnyCodable] + + public init(config: [String: AnyCodable]) { + self.config = config + } +} diff --git a/authentikClient/Sources/Models/OutpostHealth.swift b/authentikClient/Sources/Models/OutpostHealth.swift new file mode 100644 index 0000000..4839e4c --- /dev/null +++ b/authentikClient/Sources/Models/OutpostHealth.swift @@ -0,0 +1,66 @@ +// +// OutpostHealth.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Outpost health status +public struct OutpostHealth: Codable { + public var uid: String + public var lastSeen: Date + public var version: String + public var versionShould: String + public var versionOutdated: Bool + public var buildHash: String + public var buildHashShould: String + public var hostname: String + + public init(uid: String, lastSeen: Date, version: String, versionShould: String, versionOutdated: Bool, buildHash: String, buildHashShould: String, hostname: String) { + self.uid = uid + self.lastSeen = lastSeen + self.version = version + self.versionShould = versionShould + self.versionOutdated = versionOutdated + self.buildHash = buildHash + self.buildHashShould = buildHashShould + self.hostname = hostname + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case uid + case lastSeen = "last_seen" + case version + case versionShould = "version_should" + case versionOutdated = "version_outdated" + case buildHash = "build_hash" + case buildHashShould = "build_hash_should" + case hostname + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + uid = try container.decode(String.self, forKey: .uid) + lastSeen = try container.decode(Date.self, forKey: .lastSeen) + version = try container.decode(String.self, forKey: .version) + versionShould = try container.decode(String.self, forKey: .versionShould) + versionOutdated = try container.decode(Bool.self, forKey: .versionOutdated) + buildHash = try container.decode(String.self, forKey: .buildHash) + buildHashShould = try container.decode(String.self, forKey: .buildHashShould) + hostname = try container.decode(String.self, forKey: .hostname) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(uid, forKey: .uid) + try container.encode(lastSeen, forKey: .lastSeen) + try container.encode(version, forKey: .version) + try container.encode(versionShould, forKey: .versionShould) + try container.encode(versionOutdated, forKey: .versionOutdated) + try container.encode(buildHash, forKey: .buildHash) + try container.encode(buildHashShould, forKey: .buildHashShould) + try container.encode(hostname, forKey: .hostname) + } +} diff --git a/authentikClient/Sources/Models/OutpostRequest.swift b/authentikClient/Sources/Models/OutpostRequest.swift new file mode 100644 index 0000000..e0f8c7b --- /dev/null +++ b/authentikClient/Sources/Models/OutpostRequest.swift @@ -0,0 +1,58 @@ +// +// OutpostRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Outpost Serializer +public struct OutpostRequest: Codable { + public var name: String + public var type: OutpostTypeEnum + public var providers: [Int] + /// Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + public var serviceConnection: UUID? + public var config: [String: AnyCodable] + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + + public init(name: String, type: OutpostTypeEnum, providers: [Int], serviceConnection: UUID? = nil, config: [String: AnyCodable], managed: String? = nil) { + self.name = name + self.type = type + self.providers = providers + self.serviceConnection = serviceConnection + self.config = config + self.managed = managed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case type + case providers + case serviceConnection = "service_connection" + case config + case managed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(OutpostTypeEnum.self, forKey: .type) + providers = try container.decode([Int].self, forKey: .providers) + serviceConnection = try container.decodeIfPresent(UUID.self, forKey: .serviceConnection) + config = try container.decode([String: AnyCodable].self, forKey: .config) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(providers, forKey: .providers) + try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) + try container.encode(config, forKey: .config) + try container.encodeIfPresent(managed, forKey: .managed) + } +} diff --git a/authentikClient/Sources/Models/OutpostTypeEnum.swift b/authentikClient/Sources/Models/OutpostTypeEnum.swift new file mode 100644 index 0000000..2369d81 --- /dev/null +++ b/authentikClient/Sources/Models/OutpostTypeEnum.swift @@ -0,0 +1,16 @@ +// +// OutpostTypeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `proxy` - Proxy * `ldap` - Ldap * `radius` - Radius +public enum OutpostTypeEnum: String, Codable, CaseIterable { + case proxy = "proxy" + case ldap = "ldap" + case radius = "radius" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/PaginatedApplicationList.swift b/authentikClient/Sources/Models/PaginatedApplicationList.swift new file mode 100644 index 0000000..063f546 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedApplicationList.swift @@ -0,0 +1,18 @@ +// +// PaginatedApplicationList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedApplicationList: Codable { + public var pagination: Pagination + public var results: [Application] + + public init(pagination: Pagination, results: [Application]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticateWebAuthnStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticateWebAuthnStageList.swift new file mode 100644 index 0000000..94a8f63 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticateWebAuthnStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticateWebAuthnStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticateWebAuthnStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticateWebAuthnStage] + + public init(pagination: Pagination, results: [AuthenticateWebAuthnStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatedSessionList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatedSessionList.swift new file mode 100644 index 0000000..b4068c4 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatedSessionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatedSessionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatedSessionList: Codable { + public var pagination: Pagination + public var results: [AuthenticatedSession] + + public init(pagination: Pagination, results: [AuthenticatedSession]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorDuoStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorDuoStageList.swift new file mode 100644 index 0000000..867350c --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorDuoStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorDuoStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorDuoStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorDuoStage] + + public init(pagination: Pagination, results: [AuthenticatorDuoStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorMobileStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorMobileStageList.swift new file mode 100644 index 0000000..9fa42dc --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorMobileStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorMobileStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorMobileStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorMobileStage] + + public init(pagination: Pagination, results: [AuthenticatorMobileStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorSMSStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorSMSStageList.swift new file mode 100644 index 0000000..da446ad --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorSMSStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorSMSStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorSMSStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorSMSStage] + + public init(pagination: Pagination, results: [AuthenticatorSMSStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorStaticStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorStaticStageList.swift new file mode 100644 index 0000000..d784c7d --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorStaticStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorStaticStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorStaticStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorStaticStage] + + public init(pagination: Pagination, results: [AuthenticatorStaticStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorTOTPStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorTOTPStageList.swift new file mode 100644 index 0000000..3036a83 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorTOTPStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorTOTPStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorTOTPStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorTOTPStage] + + public init(pagination: Pagination, results: [AuthenticatorTOTPStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedAuthenticatorValidateStageList.swift b/authentikClient/Sources/Models/PaginatedAuthenticatorValidateStageList.swift new file mode 100644 index 0000000..286b0e2 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedAuthenticatorValidateStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedAuthenticatorValidateStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedAuthenticatorValidateStageList: Codable { + public var pagination: Pagination + public var results: [AuthenticatorValidateStage] + + public init(pagination: Pagination, results: [AuthenticatorValidateStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedBlueprintInstanceList.swift b/authentikClient/Sources/Models/PaginatedBlueprintInstanceList.swift new file mode 100644 index 0000000..65f0c96 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedBlueprintInstanceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedBlueprintInstanceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedBlueprintInstanceList: Codable { + public var pagination: Pagination + public var results: [BlueprintInstance] + + public init(pagination: Pagination, results: [BlueprintInstance]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedCaptchaStageList.swift b/authentikClient/Sources/Models/PaginatedCaptchaStageList.swift new file mode 100644 index 0000000..231e3b1 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedCaptchaStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedCaptchaStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedCaptchaStageList: Codable { + public var pagination: Pagination + public var results: [CaptchaStage] + + public init(pagination: Pagination, results: [CaptchaStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedCertificateKeyPairList.swift b/authentikClient/Sources/Models/PaginatedCertificateKeyPairList.swift new file mode 100644 index 0000000..b3e6e6a --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedCertificateKeyPairList.swift @@ -0,0 +1,18 @@ +// +// PaginatedCertificateKeyPairList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedCertificateKeyPairList: Codable { + public var pagination: Pagination + public var results: [CertificateKeyPair] + + public init(pagination: Pagination, results: [CertificateKeyPair]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedConsentStageList.swift b/authentikClient/Sources/Models/PaginatedConsentStageList.swift new file mode 100644 index 0000000..e155c04 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedConsentStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedConsentStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedConsentStageList: Codable { + public var pagination: Pagination + public var results: [ConsentStage] + + public init(pagination: Pagination, results: [ConsentStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedDenyStageList.swift b/authentikClient/Sources/Models/PaginatedDenyStageList.swift new file mode 100644 index 0000000..87c7f15 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedDenyStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedDenyStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedDenyStageList: Codable { + public var pagination: Pagination + public var results: [DenyStage] + + public init(pagination: Pagination, results: [DenyStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedDockerServiceConnectionList.swift b/authentikClient/Sources/Models/PaginatedDockerServiceConnectionList.swift new file mode 100644 index 0000000..e610c1b --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedDockerServiceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedDockerServiceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedDockerServiceConnectionList: Codable { + public var pagination: Pagination + public var results: [DockerServiceConnection] + + public init(pagination: Pagination, results: [DockerServiceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedDummyPolicyList.swift b/authentikClient/Sources/Models/PaginatedDummyPolicyList.swift new file mode 100644 index 0000000..d532194 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedDummyPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedDummyPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedDummyPolicyList: Codable { + public var pagination: Pagination + public var results: [DummyPolicy] + + public init(pagination: Pagination, results: [DummyPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedDummyStageList.swift b/authentikClient/Sources/Models/PaginatedDummyStageList.swift new file mode 100644 index 0000000..084ec4f --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedDummyStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedDummyStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedDummyStageList: Codable { + public var pagination: Pagination + public var results: [DummyStage] + + public init(pagination: Pagination, results: [DummyStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedDuoDeviceList.swift b/authentikClient/Sources/Models/PaginatedDuoDeviceList.swift new file mode 100644 index 0000000..cd183af --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedDuoDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedDuoDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedDuoDeviceList: Codable { + public var pagination: Pagination + public var results: [DuoDevice] + + public init(pagination: Pagination, results: [DuoDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedEmailStageList.swift b/authentikClient/Sources/Models/PaginatedEmailStageList.swift new file mode 100644 index 0000000..10eebf8 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedEmailStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedEmailStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedEmailStageList: Codable { + public var pagination: Pagination + public var results: [EmailStage] + + public init(pagination: Pagination, results: [EmailStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedEventList.swift b/authentikClient/Sources/Models/PaginatedEventList.swift new file mode 100644 index 0000000..f6d3015 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedEventList.swift @@ -0,0 +1,18 @@ +// +// PaginatedEventList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedEventList: Codable { + public var pagination: Pagination + public var results: [Event] + + public init(pagination: Pagination, results: [Event]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedEventMatcherPolicyList.swift b/authentikClient/Sources/Models/PaginatedEventMatcherPolicyList.swift new file mode 100644 index 0000000..6552f9b --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedEventMatcherPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedEventMatcherPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedEventMatcherPolicyList: Codable { + public var pagination: Pagination + public var results: [EventMatcherPolicy] + + public init(pagination: Pagination, results: [EventMatcherPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedExpiringBaseGrantModelList.swift b/authentikClient/Sources/Models/PaginatedExpiringBaseGrantModelList.swift new file mode 100644 index 0000000..7a51b2b --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedExpiringBaseGrantModelList.swift @@ -0,0 +1,18 @@ +// +// PaginatedExpiringBaseGrantModelList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedExpiringBaseGrantModelList: Codable { + public var pagination: Pagination + public var results: [ExpiringBaseGrantModel] + + public init(pagination: Pagination, results: [ExpiringBaseGrantModel]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedExpressionPolicyList.swift b/authentikClient/Sources/Models/PaginatedExpressionPolicyList.swift new file mode 100644 index 0000000..d6cbc59 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedExpressionPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedExpressionPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedExpressionPolicyList: Codable { + public var pagination: Pagination + public var results: [ExpressionPolicy] + + public init(pagination: Pagination, results: [ExpressionPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedExtraRoleObjectPermissionList.swift b/authentikClient/Sources/Models/PaginatedExtraRoleObjectPermissionList.swift new file mode 100644 index 0000000..22da6e9 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedExtraRoleObjectPermissionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedExtraRoleObjectPermissionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedExtraRoleObjectPermissionList: Codable { + public var pagination: Pagination + public var results: [ExtraRoleObjectPermission] + + public init(pagination: Pagination, results: [ExtraRoleObjectPermission]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedExtraUserObjectPermissionList.swift b/authentikClient/Sources/Models/PaginatedExtraUserObjectPermissionList.swift new file mode 100644 index 0000000..5be0cc1 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedExtraUserObjectPermissionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedExtraUserObjectPermissionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedExtraUserObjectPermissionList: Codable { + public var pagination: Pagination + public var results: [ExtraUserObjectPermission] + + public init(pagination: Pagination, results: [ExtraUserObjectPermission]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedFlowList.swift b/authentikClient/Sources/Models/PaginatedFlowList.swift new file mode 100644 index 0000000..906dc40 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedFlowList.swift @@ -0,0 +1,18 @@ +// +// PaginatedFlowList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedFlowList: Codable { + public var pagination: Pagination + public var results: [Flow] + + public init(pagination: Pagination, results: [Flow]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedFlowStageBindingList.swift b/authentikClient/Sources/Models/PaginatedFlowStageBindingList.swift new file mode 100644 index 0000000..0d5789e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedFlowStageBindingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedFlowStageBindingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedFlowStageBindingList: Codable { + public var pagination: Pagination + public var results: [FlowStageBinding] + + public init(pagination: Pagination, results: [FlowStageBinding]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedGroupList.swift b/authentikClient/Sources/Models/PaginatedGroupList.swift new file mode 100644 index 0000000..90193f2 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedGroupList.swift @@ -0,0 +1,18 @@ +// +// PaginatedGroupList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedGroupList: Codable { + public var pagination: Pagination + public var results: [Group] + + public init(pagination: Pagination, results: [Group]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedIdentificationStageList.swift b/authentikClient/Sources/Models/PaginatedIdentificationStageList.swift new file mode 100644 index 0000000..a896a71 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedIdentificationStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedIdentificationStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedIdentificationStageList: Codable { + public var pagination: Pagination + public var results: [IdentificationStage] + + public init(pagination: Pagination, results: [IdentificationStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedInvitationList.swift b/authentikClient/Sources/Models/PaginatedInvitationList.swift new file mode 100644 index 0000000..946b54e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedInvitationList.swift @@ -0,0 +1,18 @@ +// +// PaginatedInvitationList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedInvitationList: Codable { + public var pagination: Pagination + public var results: [Invitation] + + public init(pagination: Pagination, results: [Invitation]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedInvitationStageList.swift b/authentikClient/Sources/Models/PaginatedInvitationStageList.swift new file mode 100644 index 0000000..3cbf737 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedInvitationStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedInvitationStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedInvitationStageList: Codable { + public var pagination: Pagination + public var results: [InvitationStage] + + public init(pagination: Pagination, results: [InvitationStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedKubernetesServiceConnectionList.swift b/authentikClient/Sources/Models/PaginatedKubernetesServiceConnectionList.swift new file mode 100644 index 0000000..b9732d0 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedKubernetesServiceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedKubernetesServiceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedKubernetesServiceConnectionList: Codable { + public var pagination: Pagination + public var results: [KubernetesServiceConnection] + + public init(pagination: Pagination, results: [KubernetesServiceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedLDAPOutpostConfigList.swift b/authentikClient/Sources/Models/PaginatedLDAPOutpostConfigList.swift new file mode 100644 index 0000000..e4b018a --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedLDAPOutpostConfigList.swift @@ -0,0 +1,18 @@ +// +// PaginatedLDAPOutpostConfigList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedLDAPOutpostConfigList: Codable { + public var pagination: Pagination + public var results: [LDAPOutpostConfig] + + public init(pagination: Pagination, results: [LDAPOutpostConfig]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedLDAPPropertyMappingList.swift b/authentikClient/Sources/Models/PaginatedLDAPPropertyMappingList.swift new file mode 100644 index 0000000..3cd06c0 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedLDAPPropertyMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedLDAPPropertyMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedLDAPPropertyMappingList: Codable { + public var pagination: Pagination + public var results: [LDAPPropertyMapping] + + public init(pagination: Pagination, results: [LDAPPropertyMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedLDAPProviderList.swift b/authentikClient/Sources/Models/PaginatedLDAPProviderList.swift new file mode 100644 index 0000000..f5e81cc --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedLDAPProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedLDAPProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedLDAPProviderList: Codable { + public var pagination: Pagination + public var results: [LDAPProvider] + + public init(pagination: Pagination, results: [LDAPProvider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedLDAPSourceList.swift b/authentikClient/Sources/Models/PaginatedLDAPSourceList.swift new file mode 100644 index 0000000..655d5e0 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedLDAPSourceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedLDAPSourceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedLDAPSourceList: Codable { + public var pagination: Pagination + public var results: [LDAPSource] + + public init(pagination: Pagination, results: [LDAPSource]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedLicenseList.swift b/authentikClient/Sources/Models/PaginatedLicenseList.swift new file mode 100644 index 0000000..59b8eb3 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedLicenseList.swift @@ -0,0 +1,18 @@ +// +// PaginatedLicenseList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedLicenseList: Codable { + public var pagination: Pagination + public var results: [License] + + public init(pagination: Pagination, results: [License]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedMobileDeviceList.swift b/authentikClient/Sources/Models/PaginatedMobileDeviceList.swift new file mode 100644 index 0000000..4630986 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedMobileDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedMobileDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedMobileDeviceList: Codable { + public var pagination: Pagination + public var results: [MobileDevice] + + public init(pagination: Pagination, results: [MobileDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedNotificationList.swift b/authentikClient/Sources/Models/PaginatedNotificationList.swift new file mode 100644 index 0000000..16c39a1 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedNotificationList.swift @@ -0,0 +1,18 @@ +// +// PaginatedNotificationList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedNotificationList: Codable { + public var pagination: Pagination + public var results: [Notification] + + public init(pagination: Pagination, results: [Notification]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedNotificationRuleList.swift b/authentikClient/Sources/Models/PaginatedNotificationRuleList.swift new file mode 100644 index 0000000..0c8a670 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedNotificationRuleList.swift @@ -0,0 +1,18 @@ +// +// PaginatedNotificationRuleList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedNotificationRuleList: Codable { + public var pagination: Pagination + public var results: [NotificationRule] + + public init(pagination: Pagination, results: [NotificationRule]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedNotificationTransportList.swift b/authentikClient/Sources/Models/PaginatedNotificationTransportList.swift new file mode 100644 index 0000000..917aa58 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedNotificationTransportList.swift @@ -0,0 +1,18 @@ +// +// PaginatedNotificationTransportList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedNotificationTransportList: Codable { + public var pagination: Pagination + public var results: [NotificationTransport] + + public init(pagination: Pagination, results: [NotificationTransport]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedNotificationWebhookMappingList.swift b/authentikClient/Sources/Models/PaginatedNotificationWebhookMappingList.swift new file mode 100644 index 0000000..efd7335 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedNotificationWebhookMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedNotificationWebhookMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedNotificationWebhookMappingList: Codable { + public var pagination: Pagination + public var results: [NotificationWebhookMapping] + + public init(pagination: Pagination, results: [NotificationWebhookMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedOAuth2ProviderList.swift b/authentikClient/Sources/Models/PaginatedOAuth2ProviderList.swift new file mode 100644 index 0000000..7e0bea7 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedOAuth2ProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedOAuth2ProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedOAuth2ProviderList: Codable { + public var pagination: Pagination + public var results: [OAuth2Provider] + + public init(pagination: Pagination, results: [OAuth2Provider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedOAuthSourceList.swift b/authentikClient/Sources/Models/PaginatedOAuthSourceList.swift new file mode 100644 index 0000000..cf5ff49 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedOAuthSourceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedOAuthSourceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedOAuthSourceList: Codable { + public var pagination: Pagination + public var results: [OAuthSource] + + public init(pagination: Pagination, results: [OAuthSource]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedOutpostList.swift b/authentikClient/Sources/Models/PaginatedOutpostList.swift new file mode 100644 index 0000000..26faff4 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedOutpostList.swift @@ -0,0 +1,18 @@ +// +// PaginatedOutpostList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedOutpostList: Codable { + public var pagination: Pagination + public var results: [Outpost] + + public init(pagination: Pagination, results: [Outpost]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPasswordExpiryPolicyList.swift b/authentikClient/Sources/Models/PaginatedPasswordExpiryPolicyList.swift new file mode 100644 index 0000000..1b54c6e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPasswordExpiryPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPasswordExpiryPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPasswordExpiryPolicyList: Codable { + public var pagination: Pagination + public var results: [PasswordExpiryPolicy] + + public init(pagination: Pagination, results: [PasswordExpiryPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPasswordPolicyList.swift b/authentikClient/Sources/Models/PaginatedPasswordPolicyList.swift new file mode 100644 index 0000000..4e20aad --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPasswordPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPasswordPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPasswordPolicyList: Codable { + public var pagination: Pagination + public var results: [PasswordPolicy] + + public init(pagination: Pagination, results: [PasswordPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPasswordStageList.swift b/authentikClient/Sources/Models/PaginatedPasswordStageList.swift new file mode 100644 index 0000000..b82b1b8 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPasswordStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPasswordStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPasswordStageList: Codable { + public var pagination: Pagination + public var results: [PasswordStage] + + public init(pagination: Pagination, results: [PasswordStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPermissionList.swift b/authentikClient/Sources/Models/PaginatedPermissionList.swift new file mode 100644 index 0000000..f7a6ace --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPermissionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPermissionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPermissionList: Codable { + public var pagination: Pagination + public var results: [Permission] + + public init(pagination: Pagination, results: [Permission]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPlexSourceConnectionList.swift b/authentikClient/Sources/Models/PaginatedPlexSourceConnectionList.swift new file mode 100644 index 0000000..9e9551b --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPlexSourceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPlexSourceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPlexSourceConnectionList: Codable { + public var pagination: Pagination + public var results: [PlexSourceConnection] + + public init(pagination: Pagination, results: [PlexSourceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPlexSourceList.swift b/authentikClient/Sources/Models/PaginatedPlexSourceList.swift new file mode 100644 index 0000000..9d60d98 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPlexSourceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPlexSourceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPlexSourceList: Codable { + public var pagination: Pagination + public var results: [PlexSource] + + public init(pagination: Pagination, results: [PlexSource]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPolicyBindingList.swift b/authentikClient/Sources/Models/PaginatedPolicyBindingList.swift new file mode 100644 index 0000000..9118965 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPolicyBindingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPolicyBindingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPolicyBindingList: Codable { + public var pagination: Pagination + public var results: [PolicyBinding] + + public init(pagination: Pagination, results: [PolicyBinding]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPolicyList.swift b/authentikClient/Sources/Models/PaginatedPolicyList.swift new file mode 100644 index 0000000..3d8436c --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPolicyList: Codable { + public var pagination: Pagination + public var results: [Policy] + + public init(pagination: Pagination, results: [Policy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPromptList.swift b/authentikClient/Sources/Models/PaginatedPromptList.swift new file mode 100644 index 0000000..d445036 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPromptList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPromptList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPromptList: Codable { + public var pagination: Pagination + public var results: [Prompt] + + public init(pagination: Pagination, results: [Prompt]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPromptStageList.swift b/authentikClient/Sources/Models/PaginatedPromptStageList.swift new file mode 100644 index 0000000..3175b3f --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPromptStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPromptStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPromptStageList: Codable { + public var pagination: Pagination + public var results: [PromptStage] + + public init(pagination: Pagination, results: [PromptStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedPropertyMappingList.swift b/authentikClient/Sources/Models/PaginatedPropertyMappingList.swift new file mode 100644 index 0000000..e1c53ba --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedPropertyMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedPropertyMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedPropertyMappingList: Codable { + public var pagination: Pagination + public var results: [PropertyMapping] + + public init(pagination: Pagination, results: [PropertyMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedProviderList.swift b/authentikClient/Sources/Models/PaginatedProviderList.swift new file mode 100644 index 0000000..4870cb0 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedProviderList: Codable { + public var pagination: Pagination + public var results: [Provider] + + public init(pagination: Pagination, results: [Provider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedProxyOutpostConfigList.swift b/authentikClient/Sources/Models/PaginatedProxyOutpostConfigList.swift new file mode 100644 index 0000000..aedd096 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedProxyOutpostConfigList.swift @@ -0,0 +1,18 @@ +// +// PaginatedProxyOutpostConfigList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedProxyOutpostConfigList: Codable { + public var pagination: Pagination + public var results: [ProxyOutpostConfig] + + public init(pagination: Pagination, results: [ProxyOutpostConfig]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedProxyProviderList.swift b/authentikClient/Sources/Models/PaginatedProxyProviderList.swift new file mode 100644 index 0000000..f5c9179 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedProxyProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedProxyProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedProxyProviderList: Codable { + public var pagination: Pagination + public var results: [ProxyProvider] + + public init(pagination: Pagination, results: [ProxyProvider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedRadiusOutpostConfigList.swift b/authentikClient/Sources/Models/PaginatedRadiusOutpostConfigList.swift new file mode 100644 index 0000000..f670869 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedRadiusOutpostConfigList.swift @@ -0,0 +1,18 @@ +// +// PaginatedRadiusOutpostConfigList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedRadiusOutpostConfigList: Codable { + public var pagination: Pagination + public var results: [RadiusOutpostConfig] + + public init(pagination: Pagination, results: [RadiusOutpostConfig]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedRadiusProviderList.swift b/authentikClient/Sources/Models/PaginatedRadiusProviderList.swift new file mode 100644 index 0000000..1302422 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedRadiusProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedRadiusProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedRadiusProviderList: Codable { + public var pagination: Pagination + public var results: [RadiusProvider] + + public init(pagination: Pagination, results: [RadiusProvider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedReputationList.swift b/authentikClient/Sources/Models/PaginatedReputationList.swift new file mode 100644 index 0000000..bc91811 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedReputationList.swift @@ -0,0 +1,18 @@ +// +// PaginatedReputationList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedReputationList: Codable { + public var pagination: Pagination + public var results: [Reputation] + + public init(pagination: Pagination, results: [Reputation]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedReputationPolicyList.swift b/authentikClient/Sources/Models/PaginatedReputationPolicyList.swift new file mode 100644 index 0000000..09592d3 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedReputationPolicyList.swift @@ -0,0 +1,18 @@ +// +// PaginatedReputationPolicyList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedReputationPolicyList: Codable { + public var pagination: Pagination + public var results: [ReputationPolicy] + + public init(pagination: Pagination, results: [ReputationPolicy]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedRoleAssignedObjectPermissionList.swift b/authentikClient/Sources/Models/PaginatedRoleAssignedObjectPermissionList.swift new file mode 100644 index 0000000..401ca28 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedRoleAssignedObjectPermissionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedRoleAssignedObjectPermissionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedRoleAssignedObjectPermissionList: Codable { + public var pagination: Pagination + public var results: [RoleAssignedObjectPermission] + + public init(pagination: Pagination, results: [RoleAssignedObjectPermission]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedRoleList.swift b/authentikClient/Sources/Models/PaginatedRoleList.swift new file mode 100644 index 0000000..8918e1e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedRoleList.swift @@ -0,0 +1,18 @@ +// +// PaginatedRoleList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedRoleList: Codable { + public var pagination: Pagination + public var results: [Role] + + public init(pagination: Pagination, results: [Role]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSAMLPropertyMappingList.swift b/authentikClient/Sources/Models/PaginatedSAMLPropertyMappingList.swift new file mode 100644 index 0000000..55844c7 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSAMLPropertyMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSAMLPropertyMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSAMLPropertyMappingList: Codable { + public var pagination: Pagination + public var results: [SAMLPropertyMapping] + + public init(pagination: Pagination, results: [SAMLPropertyMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSAMLProviderList.swift b/authentikClient/Sources/Models/PaginatedSAMLProviderList.swift new file mode 100644 index 0000000..a6dca71 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSAMLProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSAMLProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSAMLProviderList: Codable { + public var pagination: Pagination + public var results: [SAMLProvider] + + public init(pagination: Pagination, results: [SAMLProvider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSAMLSourceList.swift b/authentikClient/Sources/Models/PaginatedSAMLSourceList.swift new file mode 100644 index 0000000..e141c2b --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSAMLSourceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSAMLSourceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSAMLSourceList: Codable { + public var pagination: Pagination + public var results: [SAMLSource] + + public init(pagination: Pagination, results: [SAMLSource]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSCIMMappingList.swift b/authentikClient/Sources/Models/PaginatedSCIMMappingList.swift new file mode 100644 index 0000000..1de7521 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSCIMMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSCIMMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSCIMMappingList: Codable { + public var pagination: Pagination + public var results: [SCIMMapping] + + public init(pagination: Pagination, results: [SCIMMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSCIMProviderList.swift b/authentikClient/Sources/Models/PaginatedSCIMProviderList.swift new file mode 100644 index 0000000..b85cf37 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSCIMProviderList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSCIMProviderList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSCIMProviderList: Codable { + public var pagination: Pagination + public var results: [SCIMProvider] + + public init(pagination: Pagination, results: [SCIMProvider]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSMSDeviceList.swift b/authentikClient/Sources/Models/PaginatedSMSDeviceList.swift new file mode 100644 index 0000000..4103494 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSMSDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSMSDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSMSDeviceList: Codable { + public var pagination: Pagination + public var results: [SMSDevice] + + public init(pagination: Pagination, results: [SMSDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedScopeMappingList.swift b/authentikClient/Sources/Models/PaginatedScopeMappingList.swift new file mode 100644 index 0000000..d16cbef --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedScopeMappingList.swift @@ -0,0 +1,18 @@ +// +// PaginatedScopeMappingList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedScopeMappingList: Codable { + public var pagination: Pagination + public var results: [ScopeMapping] + + public init(pagination: Pagination, results: [ScopeMapping]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedServiceConnectionList.swift b/authentikClient/Sources/Models/PaginatedServiceConnectionList.swift new file mode 100644 index 0000000..ad9b1ab --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedServiceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedServiceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedServiceConnectionList: Codable { + public var pagination: Pagination + public var results: [ServiceConnection] + + public init(pagination: Pagination, results: [ServiceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedSourceList.swift b/authentikClient/Sources/Models/PaginatedSourceList.swift new file mode 100644 index 0000000..d21e148 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedSourceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedSourceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedSourceList: Codable { + public var pagination: Pagination + public var results: [Source] + + public init(pagination: Pagination, results: [Source]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedStageList.swift b/authentikClient/Sources/Models/PaginatedStageList.swift new file mode 100644 index 0000000..cf73100 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedStageList: Codable { + public var pagination: Pagination + public var results: [Stage] + + public init(pagination: Pagination, results: [Stage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedStaticDeviceList.swift b/authentikClient/Sources/Models/PaginatedStaticDeviceList.swift new file mode 100644 index 0000000..4ba6485 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedStaticDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedStaticDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedStaticDeviceList: Codable { + public var pagination: Pagination + public var results: [StaticDevice] + + public init(pagination: Pagination, results: [StaticDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedTOTPDeviceList.swift b/authentikClient/Sources/Models/PaginatedTOTPDeviceList.swift new file mode 100644 index 0000000..0fe539e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedTOTPDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedTOTPDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedTOTPDeviceList: Codable { + public var pagination: Pagination + public var results: [TOTPDevice] + + public init(pagination: Pagination, results: [TOTPDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedTenantList.swift b/authentikClient/Sources/Models/PaginatedTenantList.swift new file mode 100644 index 0000000..26c6fd7 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedTenantList.swift @@ -0,0 +1,18 @@ +// +// PaginatedTenantList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedTenantList: Codable { + public var pagination: Pagination + public var results: [Tenant] + + public init(pagination: Pagination, results: [Tenant]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedTokenList.swift b/authentikClient/Sources/Models/PaginatedTokenList.swift new file mode 100644 index 0000000..95a3ace --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedTokenList.swift @@ -0,0 +1,18 @@ +// +// PaginatedTokenList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedTokenList: Codable { + public var pagination: Pagination + public var results: [Token] + + public init(pagination: Pagination, results: [Token]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedTokenModelList.swift b/authentikClient/Sources/Models/PaginatedTokenModelList.swift new file mode 100644 index 0000000..f33cfd8 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedTokenModelList.swift @@ -0,0 +1,18 @@ +// +// PaginatedTokenModelList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedTokenModelList: Codable { + public var pagination: Pagination + public var results: [TokenModel] + + public init(pagination: Pagination, results: [TokenModel]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserAssignedObjectPermissionList.swift b/authentikClient/Sources/Models/PaginatedUserAssignedObjectPermissionList.swift new file mode 100644 index 0000000..5060e6a --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserAssignedObjectPermissionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserAssignedObjectPermissionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserAssignedObjectPermissionList: Codable { + public var pagination: Pagination + public var results: [UserAssignedObjectPermission] + + public init(pagination: Pagination, results: [UserAssignedObjectPermission]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserConsentList.swift b/authentikClient/Sources/Models/PaginatedUserConsentList.swift new file mode 100644 index 0000000..ac5e4b3 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserConsentList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserConsentList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserConsentList: Codable { + public var pagination: Pagination + public var results: [UserConsent] + + public init(pagination: Pagination, results: [UserConsent]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserDeleteStageList.swift b/authentikClient/Sources/Models/PaginatedUserDeleteStageList.swift new file mode 100644 index 0000000..f85b779 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserDeleteStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserDeleteStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserDeleteStageList: Codable { + public var pagination: Pagination + public var results: [UserDeleteStage] + + public init(pagination: Pagination, results: [UserDeleteStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserList.swift b/authentikClient/Sources/Models/PaginatedUserList.swift new file mode 100644 index 0000000..38d051a --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserList: Codable { + public var pagination: Pagination + public var results: [User] + + public init(pagination: Pagination, results: [User]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserLoginStageList.swift b/authentikClient/Sources/Models/PaginatedUserLoginStageList.swift new file mode 100644 index 0000000..752dd7d --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserLoginStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserLoginStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserLoginStageList: Codable { + public var pagination: Pagination + public var results: [UserLoginStage] + + public init(pagination: Pagination, results: [UserLoginStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserLogoutStageList.swift b/authentikClient/Sources/Models/PaginatedUserLogoutStageList.swift new file mode 100644 index 0000000..8a27f70 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserLogoutStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserLogoutStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserLogoutStageList: Codable { + public var pagination: Pagination + public var results: [UserLogoutStage] + + public init(pagination: Pagination, results: [UserLogoutStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserOAuthSourceConnectionList.swift b/authentikClient/Sources/Models/PaginatedUserOAuthSourceConnectionList.swift new file mode 100644 index 0000000..5eb5190 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserOAuthSourceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserOAuthSourceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserOAuthSourceConnectionList: Codable { + public var pagination: Pagination + public var results: [UserOAuthSourceConnection] + + public init(pagination: Pagination, results: [UserOAuthSourceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserSAMLSourceConnectionList.swift b/authentikClient/Sources/Models/PaginatedUserSAMLSourceConnectionList.swift new file mode 100644 index 0000000..e6ae47e --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserSAMLSourceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserSAMLSourceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserSAMLSourceConnectionList: Codable { + public var pagination: Pagination + public var results: [UserSAMLSourceConnection] + + public init(pagination: Pagination, results: [UserSAMLSourceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserSourceConnectionList.swift b/authentikClient/Sources/Models/PaginatedUserSourceConnectionList.swift new file mode 100644 index 0000000..b306380 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserSourceConnectionList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserSourceConnectionList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserSourceConnectionList: Codable { + public var pagination: Pagination + public var results: [UserSourceConnection] + + public init(pagination: Pagination, results: [UserSourceConnection]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedUserWriteStageList.swift b/authentikClient/Sources/Models/PaginatedUserWriteStageList.swift new file mode 100644 index 0000000..4703241 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedUserWriteStageList.swift @@ -0,0 +1,18 @@ +// +// PaginatedUserWriteStageList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedUserWriteStageList: Codable { + public var pagination: Pagination + public var results: [UserWriteStage] + + public init(pagination: Pagination, results: [UserWriteStage]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/PaginatedWebAuthnDeviceList.swift b/authentikClient/Sources/Models/PaginatedWebAuthnDeviceList.swift new file mode 100644 index 0000000..0eea2b4 --- /dev/null +++ b/authentikClient/Sources/Models/PaginatedWebAuthnDeviceList.swift @@ -0,0 +1,18 @@ +// +// PaginatedWebAuthnDeviceList.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PaginatedWebAuthnDeviceList: Codable { + public var pagination: Pagination + public var results: [WebAuthnDevice] + + public init(pagination: Pagination, results: [WebAuthnDevice]) { + self.pagination = pagination + self.results = results + } +} diff --git a/authentikClient/Sources/Models/Pagination.swift b/authentikClient/Sources/Models/Pagination.swift new file mode 100644 index 0000000..3e6ca75 --- /dev/null +++ b/authentikClient/Sources/Models/Pagination.swift @@ -0,0 +1,60 @@ +// +// Pagination.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pagination: Codable { + public var next: Double + public var previous: Double + public var count: Double + public var current: Double + public var totalPages: Double + public var startIndex: Double + public var endIndex: Double + + public init(next: Double, previous: Double, count: Double, current: Double, totalPages: Double, startIndex: Double, endIndex: Double) { + self.next = next + self.previous = previous + self.count = count + self.current = current + self.totalPages = totalPages + self.startIndex = startIndex + self.endIndex = endIndex + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case next + case previous + case count + case current + case totalPages = "total_pages" + case startIndex = "start_index" + case endIndex = "end_index" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + next = try container.decode(Double.self, forKey: .next) + previous = try container.decode(Double.self, forKey: .previous) + count = try container.decode(Double.self, forKey: .count) + current = try container.decode(Double.self, forKey: .current) + totalPages = try container.decode(Double.self, forKey: .totalPages) + startIndex = try container.decode(Double.self, forKey: .startIndex) + endIndex = try container.decode(Double.self, forKey: .endIndex) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(next, forKey: .next) + try container.encode(previous, forKey: .previous) + try container.encode(count, forKey: .count) + try container.encode(current, forKey: .current) + try container.encode(totalPages, forKey: .totalPages) + try container.encode(startIndex, forKey: .startIndex) + try container.encode(endIndex, forKey: .endIndex) + } +} diff --git a/authentikClient/Sources/Models/PasswordChallenge.swift b/authentikClient/Sources/Models/PasswordChallenge.swift new file mode 100644 index 0000000..58db334 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordChallenge.swift @@ -0,0 +1,61 @@ +// +// PasswordChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password challenge UI fields +public struct PasswordChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-password" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + public var recoveryUrl: String? + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-password", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String, recoveryUrl: String? = nil) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + self.recoveryUrl = recoveryUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + case recoveryUrl = "recovery_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + recoveryUrl = try container.decodeIfPresent(String.self, forKey: .recoveryUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + try container.encodeIfPresent(recoveryUrl, forKey: .recoveryUrl) + } +} diff --git a/authentikClient/Sources/Models/PasswordChallengeResponseRequest.swift b/authentikClient/Sources/Models/PasswordChallengeResponseRequest.swift new file mode 100644 index 0000000..7a5109e --- /dev/null +++ b/authentikClient/Sources/Models/PasswordChallengeResponseRequest.swift @@ -0,0 +1,19 @@ +// +// PasswordChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password challenge response +public struct PasswordChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-password" + public var password: String + + public init(component: String? = "ak-stage-password", password: String) { + self.component = component + self.password = password + } +} diff --git a/authentikClient/Sources/Models/PasswordExpiryPolicy.swift b/authentikClient/Sources/Models/PasswordExpiryPolicy.swift new file mode 100644 index 0000000..620475d --- /dev/null +++ b/authentikClient/Sources/Models/PasswordExpiryPolicy.swift @@ -0,0 +1,82 @@ +// +// PasswordExpiryPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Expiry Policy Serializer +public struct PasswordExpiryPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + public var days: Int + public var denyOnly: Bool? + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, days: Int, denyOnly: Bool? = nil) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.days = days + self.denyOnly = denyOnly + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case days + case denyOnly = "deny_only" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + days = try container.decode(Int.self, forKey: .days) + denyOnly = try container.decodeIfPresent(Bool.self, forKey: .denyOnly) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encode(days, forKey: .days) + try container.encodeIfPresent(denyOnly, forKey: .denyOnly) + } +} diff --git a/authentikClient/Sources/Models/PasswordExpiryPolicyRequest.swift b/authentikClient/Sources/Models/PasswordExpiryPolicyRequest.swift new file mode 100644 index 0000000..9ea2963 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordExpiryPolicyRequest.swift @@ -0,0 +1,47 @@ +// +// PasswordExpiryPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Expiry Policy Serializer +public struct PasswordExpiryPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var days: Int + public var denyOnly: Bool? + + public init(name: String, executionLogging: Bool? = nil, days: Int, denyOnly: Bool? = nil) { + self.name = name + self.executionLogging = executionLogging + self.days = days + self.denyOnly = denyOnly + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case days + case denyOnly = "deny_only" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + days = try container.decode(Int.self, forKey: .days) + denyOnly = try container.decodeIfPresent(Bool.self, forKey: .denyOnly) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(days, forKey: .days) + try container.encodeIfPresent(denyOnly, forKey: .denyOnly) + } +} diff --git a/authentikClient/Sources/Models/PasswordPolicy.swift b/authentikClient/Sources/Models/PasswordPolicy.swift new file mode 100644 index 0000000..3ddc5c3 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordPolicy.swift @@ -0,0 +1,140 @@ +// +// PasswordPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Policy Serializer +public struct PasswordPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + /// Field key to check, field keys defined in Prompt stages are available. + public var passwordField: String? + public var amountDigits: Int? + public var amountUppercase: Int? + public var amountLowercase: Int? + public var amountSymbols: Int? + public var lengthMin: Int? + public var symbolCharset: String? + public var errorMessage: String? + public var checkStaticRules: Bool? + public var checkHaveIBeenPwned: Bool? + public var checkZxcvbn: Bool? + /// How many times the password hash is allowed to be on haveibeenpwned + public var hibpAllowedCount: Int? + /// If the zxcvbn score is equal or less than this value, the policy will fail. + public var zxcvbnScoreThreshold: Int? + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.passwordField = passwordField + self.amountDigits = amountDigits + self.amountUppercase = amountUppercase + self.amountLowercase = amountLowercase + self.amountSymbols = amountSymbols + self.lengthMin = lengthMin + self.symbolCharset = symbolCharset + self.errorMessage = errorMessage + self.checkStaticRules = checkStaticRules + self.checkHaveIBeenPwned = checkHaveIBeenPwned + self.checkZxcvbn = checkZxcvbn + self.hibpAllowedCount = hibpAllowedCount + self.zxcvbnScoreThreshold = zxcvbnScoreThreshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case passwordField = "password_field" + case amountDigits = "amount_digits" + case amountUppercase = "amount_uppercase" + case amountLowercase = "amount_lowercase" + case amountSymbols = "amount_symbols" + case lengthMin = "length_min" + case symbolCharset = "symbol_charset" + case errorMessage = "error_message" + case checkStaticRules = "check_static_rules" + case checkHaveIBeenPwned = "check_have_i_been_pwned" + case checkZxcvbn = "check_zxcvbn" + case hibpAllowedCount = "hibp_allowed_count" + case zxcvbnScoreThreshold = "zxcvbn_score_threshold" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + passwordField = try container.decodeIfPresent(String.self, forKey: .passwordField) + amountDigits = try container.decodeIfPresent(Int.self, forKey: .amountDigits) + amountUppercase = try container.decodeIfPresent(Int.self, forKey: .amountUppercase) + amountLowercase = try container.decodeIfPresent(Int.self, forKey: .amountLowercase) + amountSymbols = try container.decodeIfPresent(Int.self, forKey: .amountSymbols) + lengthMin = try container.decodeIfPresent(Int.self, forKey: .lengthMin) + symbolCharset = try container.decodeIfPresent(String.self, forKey: .symbolCharset) + errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) + checkStaticRules = try container.decodeIfPresent(Bool.self, forKey: .checkStaticRules) + checkHaveIBeenPwned = try container.decodeIfPresent(Bool.self, forKey: .checkHaveIBeenPwned) + checkZxcvbn = try container.decodeIfPresent(Bool.self, forKey: .checkZxcvbn) + hibpAllowedCount = try container.decodeIfPresent(Int.self, forKey: .hibpAllowedCount) + zxcvbnScoreThreshold = try container.decodeIfPresent(Int.self, forKey: .zxcvbnScoreThreshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encodeIfPresent(passwordField, forKey: .passwordField) + try container.encodeIfPresent(amountDigits, forKey: .amountDigits) + try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) + try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) + try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) + try container.encodeIfPresent(lengthMin, forKey: .lengthMin) + try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) + try container.encodeIfPresent(errorMessage, forKey: .errorMessage) + try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) + try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) + try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) + try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) + try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) + } +} diff --git a/authentikClient/Sources/Models/PasswordPolicyRequest.swift b/authentikClient/Sources/Models/PasswordPolicyRequest.swift new file mode 100644 index 0000000..1ea1ab3 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordPolicyRequest.swift @@ -0,0 +1,105 @@ +// +// PasswordPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Policy Serializer +public struct PasswordPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Field key to check, field keys defined in Prompt stages are available. + public var passwordField: String? + public var amountDigits: Int? + public var amountUppercase: Int? + public var amountLowercase: Int? + public var amountSymbols: Int? + public var lengthMin: Int? + public var symbolCharset: String? + public var errorMessage: String? + public var checkStaticRules: Bool? + public var checkHaveIBeenPwned: Bool? + public var checkZxcvbn: Bool? + /// How many times the password hash is allowed to be on haveibeenpwned + public var hibpAllowedCount: Int? + /// If the zxcvbn score is equal or less than this value, the policy will fail. + public var zxcvbnScoreThreshold: Int? + + public init(name: String, executionLogging: Bool? = nil, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.passwordField = passwordField + self.amountDigits = amountDigits + self.amountUppercase = amountUppercase + self.amountLowercase = amountLowercase + self.amountSymbols = amountSymbols + self.lengthMin = lengthMin + self.symbolCharset = symbolCharset + self.errorMessage = errorMessage + self.checkStaticRules = checkStaticRules + self.checkHaveIBeenPwned = checkHaveIBeenPwned + self.checkZxcvbn = checkZxcvbn + self.hibpAllowedCount = hibpAllowedCount + self.zxcvbnScoreThreshold = zxcvbnScoreThreshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case passwordField = "password_field" + case amountDigits = "amount_digits" + case amountUppercase = "amount_uppercase" + case amountLowercase = "amount_lowercase" + case amountSymbols = "amount_symbols" + case lengthMin = "length_min" + case symbolCharset = "symbol_charset" + case errorMessage = "error_message" + case checkStaticRules = "check_static_rules" + case checkHaveIBeenPwned = "check_have_i_been_pwned" + case checkZxcvbn = "check_zxcvbn" + case hibpAllowedCount = "hibp_allowed_count" + case zxcvbnScoreThreshold = "zxcvbn_score_threshold" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + passwordField = try container.decodeIfPresent(String.self, forKey: .passwordField) + amountDigits = try container.decodeIfPresent(Int.self, forKey: .amountDigits) + amountUppercase = try container.decodeIfPresent(Int.self, forKey: .amountUppercase) + amountLowercase = try container.decodeIfPresent(Int.self, forKey: .amountLowercase) + amountSymbols = try container.decodeIfPresent(Int.self, forKey: .amountSymbols) + lengthMin = try container.decodeIfPresent(Int.self, forKey: .lengthMin) + symbolCharset = try container.decodeIfPresent(String.self, forKey: .symbolCharset) + errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) + checkStaticRules = try container.decodeIfPresent(Bool.self, forKey: .checkStaticRules) + checkHaveIBeenPwned = try container.decodeIfPresent(Bool.self, forKey: .checkHaveIBeenPwned) + checkZxcvbn = try container.decodeIfPresent(Bool.self, forKey: .checkZxcvbn) + hibpAllowedCount = try container.decodeIfPresent(Int.self, forKey: .hibpAllowedCount) + zxcvbnScoreThreshold = try container.decodeIfPresent(Int.self, forKey: .zxcvbnScoreThreshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(passwordField, forKey: .passwordField) + try container.encodeIfPresent(amountDigits, forKey: .amountDigits) + try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) + try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) + try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) + try container.encodeIfPresent(lengthMin, forKey: .lengthMin) + try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) + try container.encodeIfPresent(errorMessage, forKey: .errorMessage) + try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) + try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) + try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) + try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) + try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) + } +} diff --git a/authentikClient/Sources/Models/PasswordStage.swift b/authentikClient/Sources/Models/PasswordStage.swift new file mode 100644 index 0000000..ccceea9 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordStage.swift @@ -0,0 +1,83 @@ +// +// PasswordStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PasswordStage Serializer +public struct PasswordStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Selection of backends to test the password against. + public var backends: [BackendsEnum] + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + /// How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. + public var failedAttemptsBeforeCancel: Int? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, backends: [BackendsEnum], configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.backends = backends + self.configureFlow = configureFlow + self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case backends + case configureFlow = "configure_flow" + case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + backends = try container.decode([BackendsEnum].self, forKey: .backends) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + failedAttemptsBeforeCancel = try container.decodeIfPresent(Int.self, forKey: .failedAttemptsBeforeCancel) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(backends, forKey: .backends) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) + } +} diff --git a/authentikClient/Sources/Models/PasswordStageRequest.swift b/authentikClient/Sources/Models/PasswordStageRequest.swift new file mode 100644 index 0000000..49be235 --- /dev/null +++ b/authentikClient/Sources/Models/PasswordStageRequest.swift @@ -0,0 +1,54 @@ +// +// PasswordStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PasswordStage Serializer +public struct PasswordStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Selection of backends to test the password against. + public var backends: [BackendsEnum] + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + /// How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. + public var failedAttemptsBeforeCancel: Int? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, backends: [BackendsEnum], configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { + self.name = name + self.flowSet = flowSet + self.backends = backends + self.configureFlow = configureFlow + self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case backends + case configureFlow = "configure_flow" + case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + backends = try container.decode([BackendsEnum].self, forKey: .backends) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + failedAttemptsBeforeCancel = try container.decodeIfPresent(Int.self, forKey: .failedAttemptsBeforeCancel) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(backends, forKey: .backends) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) + } +} diff --git a/authentikClient/Sources/Models/PatchedApplicationRequest.swift b/authentikClient/Sources/Models/PatchedApplicationRequest.swift new file mode 100644 index 0000000..0a8ab7c --- /dev/null +++ b/authentikClient/Sources/Models/PatchedApplicationRequest.swift @@ -0,0 +1,79 @@ +// +// PatchedApplicationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Application Serializer +public struct PatchedApplicationRequest: Codable { + /// Application's display Name. + public var name: String? + /// Internal application name, used in URLs. + public var slug: String? + public var provider: Int? + public var backchannelProviders: [Int]? + /// Open launch URL in a new browser tab or window. + public var openInNewTab: Bool? + public var metaLaunchUrl: String? + public var metaDescription: String? + public var metaPublisher: String? + public var policyEngineMode: PolicyEngineMode? + public var group: String? + + public init(name: String? = nil, slug: String? = nil, provider: Int? = nil, backchannelProviders: [Int]? = nil, openInNewTab: Bool? = nil, metaLaunchUrl: String? = nil, metaDescription: String? = nil, metaPublisher: String? = nil, policyEngineMode: PolicyEngineMode? = nil, group: String? = nil) { + self.name = name + self.slug = slug + self.provider = provider + self.backchannelProviders = backchannelProviders + self.openInNewTab = openInNewTab + self.metaLaunchUrl = metaLaunchUrl + self.metaDescription = metaDescription + self.metaPublisher = metaPublisher + self.policyEngineMode = policyEngineMode + self.group = group + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case provider + case backchannelProviders = "backchannel_providers" + case openInNewTab = "open_in_new_tab" + case metaLaunchUrl = "meta_launch_url" + case metaDescription = "meta_description" + case metaPublisher = "meta_publisher" + case policyEngineMode = "policy_engine_mode" + case group + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + provider = try container.decodeIfPresent(Int.self, forKey: .provider) + backchannelProviders = try container.decodeIfPresent([Int].self, forKey: .backchannelProviders) + openInNewTab = try container.decodeIfPresent(Bool.self, forKey: .openInNewTab) + metaLaunchUrl = try container.decodeIfPresent(String.self, forKey: .metaLaunchUrl) + metaDescription = try container.decodeIfPresent(String.self, forKey: .metaDescription) + metaPublisher = try container.decodeIfPresent(String.self, forKey: .metaPublisher) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + group = try container.decodeIfPresent(String.self, forKey: .group) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(provider, forKey: .provider) + try container.encodeIfPresent(backchannelProviders, forKey: .backchannelProviders) + try container.encodeIfPresent(openInNewTab, forKey: .openInNewTab) + try container.encodeIfPresent(metaLaunchUrl, forKey: .metaLaunchUrl) + try container.encodeIfPresent(metaDescription, forKey: .metaDescription) + try container.encodeIfPresent(metaPublisher, forKey: .metaPublisher) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(group, forKey: .group) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticateWebAuthnStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticateWebAuthnStageRequest.swift new file mode 100644 index 0000000..e5d461c --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticateWebAuthnStageRequest.swift @@ -0,0 +1,62 @@ +// +// PatchedAuthenticateWebAuthnStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticateWebAuthnStage Serializer +public struct PatchedAuthenticateWebAuthnStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var userVerification: UserVerificationEnum? + public var authenticatorAttachment: AuthenticatorAttachmentEnum? + public var residentKeyRequirement: ResidentKeyRequirementEnum? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, userVerification: UserVerificationEnum? = nil, authenticatorAttachment: AuthenticatorAttachmentEnum? = nil, residentKeyRequirement: ResidentKeyRequirementEnum? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.userVerification = userVerification + self.authenticatorAttachment = authenticatorAttachment + self.residentKeyRequirement = residentKeyRequirement + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case userVerification = "user_verification" + case authenticatorAttachment = "authenticator_attachment" + case residentKeyRequirement = "resident_key_requirement" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + userVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .userVerification) + authenticatorAttachment = try container.decodeIfPresent(AuthenticatorAttachmentEnum.self, forKey: .authenticatorAttachment) + residentKeyRequirement = try container.decodeIfPresent(ResidentKeyRequirementEnum.self, forKey: .residentKeyRequirement) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(userVerification, forKey: .userVerification) + try container.encodeIfPresent(authenticatorAttachment, forKey: .authenticatorAttachment) + try container.encodeIfPresent(residentKeyRequirement, forKey: .residentKeyRequirement) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorDuoStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorDuoStageRequest.swift new file mode 100644 index 0000000..893c7ee --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorDuoStageRequest.swift @@ -0,0 +1,72 @@ +// +// PatchedAuthenticatorDuoStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorDuoStage Serializer +public struct PatchedAuthenticatorDuoStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var clientId: String? + public var clientSecret: String? + public var apiHostname: String? + public var adminIntegrationKey: String? + public var adminSecretKey: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, clientId: String? = nil, clientSecret: String? = nil, apiHostname: String? = nil, adminIntegrationKey: String? = nil, adminSecretKey: String? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.clientId = clientId + self.clientSecret = clientSecret + self.apiHostname = apiHostname + self.adminIntegrationKey = adminIntegrationKey + self.adminSecretKey = adminSecretKey + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case clientId = "client_id" + case clientSecret = "client_secret" + case apiHostname = "api_hostname" + case adminIntegrationKey = "admin_integration_key" + case adminSecretKey = "admin_secret_key" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) + apiHostname = try container.decodeIfPresent(String.self, forKey: .apiHostname) + adminIntegrationKey = try container.decodeIfPresent(String.self, forKey: .adminIntegrationKey) + adminSecretKey = try container.decodeIfPresent(String.self, forKey: .adminSecretKey) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(clientSecret, forKey: .clientSecret) + try container.encodeIfPresent(apiHostname, forKey: .apiHostname) + try container.encodeIfPresent(adminIntegrationKey, forKey: .adminIntegrationKey) + try container.encodeIfPresent(adminSecretKey, forKey: .adminSecretKey) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorMobileStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorMobileStageRequest.swift new file mode 100644 index 0000000..6657b79 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorMobileStageRequest.swift @@ -0,0 +1,57 @@ +// +// PatchedAuthenticatorMobileStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorMobileStage Serializer +public struct PatchedAuthenticatorMobileStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var itemMatchingMode: ItemMatchingModeEnum? + public var cgwEndpoint: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, itemMatchingMode: ItemMatchingModeEnum? = nil, cgwEndpoint: String? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.itemMatchingMode = itemMatchingMode + self.cgwEndpoint = cgwEndpoint + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case itemMatchingMode = "item_matching_mode" + case cgwEndpoint = "cgw_endpoint" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + itemMatchingMode = try container.decodeIfPresent(ItemMatchingModeEnum.self, forKey: .itemMatchingMode) + cgwEndpoint = try container.decodeIfPresent(String.self, forKey: .cgwEndpoint) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(itemMatchingMode, forKey: .itemMatchingMode) + try container.encodeIfPresent(cgwEndpoint, forKey: .cgwEndpoint) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorSMSStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorSMSStageRequest.swift new file mode 100644 index 0000000..f06d266 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorSMSStageRequest.swift @@ -0,0 +1,89 @@ +// +// PatchedAuthenticatorSMSStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorSMSStage Serializer +public struct PatchedAuthenticatorSMSStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var provider: ProviderEnum? + public var fromNumber: String? + public var accountSid: String? + public var auth: String? + public var authPassword: String? + public var authType: AuthTypeEnum? + /// When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. + public var verifyOnly: Bool? + /// Optionally modify the payload being sent to custom providers. + public var mapping: UUID? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, provider: ProviderEnum? = nil, fromNumber: String? = nil, accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: AuthTypeEnum? = nil, verifyOnly: Bool? = nil, mapping: UUID? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.provider = provider + self.fromNumber = fromNumber + self.accountSid = accountSid + self.auth = auth + self.authPassword = authPassword + self.authType = authType + self.verifyOnly = verifyOnly + self.mapping = mapping + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case provider + case fromNumber = "from_number" + case accountSid = "account_sid" + case auth + case authPassword = "auth_password" + case authType = "auth_type" + case verifyOnly = "verify_only" + case mapping + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + provider = try container.decodeIfPresent(ProviderEnum.self, forKey: .provider) + fromNumber = try container.decodeIfPresent(String.self, forKey: .fromNumber) + accountSid = try container.decodeIfPresent(String.self, forKey: .accountSid) + auth = try container.decodeIfPresent(String.self, forKey: .auth) + authPassword = try container.decodeIfPresent(String.self, forKey: .authPassword) + authType = try container.decodeIfPresent(AuthTypeEnum.self, forKey: .authType) + verifyOnly = try container.decodeIfPresent(Bool.self, forKey: .verifyOnly) + mapping = try container.decodeIfPresent(UUID.self, forKey: .mapping) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(provider, forKey: .provider) + try container.encodeIfPresent(fromNumber, forKey: .fromNumber) + try container.encodeIfPresent(accountSid, forKey: .accountSid) + try container.encodeIfPresent(auth, forKey: .auth) + try container.encodeIfPresent(authPassword, forKey: .authPassword) + try container.encodeIfPresent(authType, forKey: .authType) + try container.encodeIfPresent(verifyOnly, forKey: .verifyOnly) + try container.encodeIfPresent(mapping, forKey: .mapping) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorStaticStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorStaticStageRequest.swift new file mode 100644 index 0000000..3c62ec6 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorStaticStageRequest.swift @@ -0,0 +1,57 @@ +// +// PatchedAuthenticatorStaticStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorStaticStage Serializer +public struct PatchedAuthenticatorStaticStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var tokenCount: Int? + public var tokenLength: Int? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.tokenCount = tokenCount + self.tokenLength = tokenLength + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case tokenCount = "token_count" + case tokenLength = "token_length" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + tokenCount = try container.decodeIfPresent(Int.self, forKey: .tokenCount) + tokenLength = try container.decodeIfPresent(Int.self, forKey: .tokenLength) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(tokenCount, forKey: .tokenCount) + try container.encodeIfPresent(tokenLength, forKey: .tokenLength) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorTOTPStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorTOTPStageRequest.swift new file mode 100644 index 0000000..8a41466 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorTOTPStageRequest.swift @@ -0,0 +1,52 @@ +// +// PatchedAuthenticatorTOTPStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorTOTPStage Serializer +public struct PatchedAuthenticatorTOTPStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + public var friendlyName: String? + public var digits: DigitsEnum? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, digits: DigitsEnum? = nil) { + self.name = name + self.flowSet = flowSet + self.configureFlow = configureFlow + self.friendlyName = friendlyName + self.digits = digits + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case configureFlow = "configure_flow" + case friendlyName = "friendly_name" + case digits + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + digits = try container.decodeIfPresent(DigitsEnum.self, forKey: .digits) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + try container.encodeIfPresent(digits, forKey: .digits) + } +} diff --git a/authentikClient/Sources/Models/PatchedAuthenticatorValidateStageRequest.swift b/authentikClient/Sources/Models/PatchedAuthenticatorValidateStageRequest.swift new file mode 100644 index 0000000..0819306 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedAuthenticatorValidateStageRequest.swift @@ -0,0 +1,64 @@ +// +// PatchedAuthenticatorValidateStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// AuthenticatorValidateStage Serializer +public struct PatchedAuthenticatorValidateStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var notConfiguredAction: NotConfiguredActionEnum? + /// Device classes which can be used to authenticate + public var deviceClasses: [DeviceClassesEnum]? + /// Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + public var configurationStages: [UUID]? + /// If any of the user's device has been used within this threshold, this stage will be skipped + public var lastAuthThreshold: String? + public var webauthnUserVerification: UserVerificationEnum? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, notConfiguredAction: NotConfiguredActionEnum? = nil, deviceClasses: [DeviceClassesEnum]? = nil, configurationStages: [UUID]? = nil, lastAuthThreshold: String? = nil, webauthnUserVerification: UserVerificationEnum? = nil) { + self.name = name + self.flowSet = flowSet + self.notConfiguredAction = notConfiguredAction + self.deviceClasses = deviceClasses + self.configurationStages = configurationStages + self.lastAuthThreshold = lastAuthThreshold + self.webauthnUserVerification = webauthnUserVerification + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case notConfiguredAction = "not_configured_action" + case deviceClasses = "device_classes" + case configurationStages = "configuration_stages" + case lastAuthThreshold = "last_auth_threshold" + case webauthnUserVerification = "webauthn_user_verification" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + notConfiguredAction = try container.decodeIfPresent(NotConfiguredActionEnum.self, forKey: .notConfiguredAction) + deviceClasses = try container.decodeIfPresent([DeviceClassesEnum].self, forKey: .deviceClasses) + configurationStages = try container.decodeIfPresent([UUID].self, forKey: .configurationStages) + lastAuthThreshold = try container.decodeIfPresent(String.self, forKey: .lastAuthThreshold) + webauthnUserVerification = try container.decodeIfPresent(UserVerificationEnum.self, forKey: .webauthnUserVerification) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(notConfiguredAction, forKey: .notConfiguredAction) + try container.encodeIfPresent(deviceClasses, forKey: .deviceClasses) + try container.encodeIfPresent(configurationStages, forKey: .configurationStages) + try container.encodeIfPresent(lastAuthThreshold, forKey: .lastAuthThreshold) + try container.encodeIfPresent(webauthnUserVerification, forKey: .webauthnUserVerification) + } +} diff --git a/authentikClient/Sources/Models/PatchedBlueprintInstanceRequest.swift b/authentikClient/Sources/Models/PatchedBlueprintInstanceRequest.swift new file mode 100644 index 0000000..1d84701 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedBlueprintInstanceRequest.swift @@ -0,0 +1,25 @@ +// +// PatchedBlueprintInstanceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Info about a single blueprint instance file +public struct PatchedBlueprintInstanceRequest: Codable { + public var name: String? + public var path: String? = "" + public var context: [String: AnyCodable]? + public var enabled: Bool? + public var content: String? + + public init(name: String? = nil, path: String? = "", context: [String: AnyCodable]? = nil, enabled: Bool? = nil, content: String? = nil) { + self.name = name + self.path = path + self.context = context + self.enabled = enabled + self.content = content + } +} diff --git a/authentikClient/Sources/Models/PatchedCaptchaStageRequest.swift b/authentikClient/Sources/Models/PatchedCaptchaStageRequest.swift new file mode 100644 index 0000000..5843b97 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedCaptchaStageRequest.swift @@ -0,0 +1,58 @@ +// +// PatchedCaptchaStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CaptchaStage Serializer +public struct PatchedCaptchaStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Public key, acquired your captcha Provider. + public var publicKey: String? + /// Private key, acquired your captcha Provider. + public var privateKey: String? + public var jsUrl: String? + public var apiUrl: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, publicKey: String? = nil, privateKey: String? = nil, jsUrl: String? = nil, apiUrl: String? = nil) { + self.name = name + self.flowSet = flowSet + self.publicKey = publicKey + self.privateKey = privateKey + self.jsUrl = jsUrl + self.apiUrl = apiUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case publicKey = "public_key" + case privateKey = "private_key" + case jsUrl = "js_url" + case apiUrl = "api_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + publicKey = try container.decodeIfPresent(String.self, forKey: .publicKey) + privateKey = try container.decodeIfPresent(String.self, forKey: .privateKey) + jsUrl = try container.decodeIfPresent(String.self, forKey: .jsUrl) + apiUrl = try container.decodeIfPresent(String.self, forKey: .apiUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(publicKey, forKey: .publicKey) + try container.encodeIfPresent(privateKey, forKey: .privateKey) + try container.encodeIfPresent(jsUrl, forKey: .jsUrl) + try container.encodeIfPresent(apiUrl, forKey: .apiUrl) + } +} diff --git a/authentikClient/Sources/Models/PatchedCertificateKeyPairRequest.swift b/authentikClient/Sources/Models/PatchedCertificateKeyPairRequest.swift new file mode 100644 index 0000000..5e4202f --- /dev/null +++ b/authentikClient/Sources/Models/PatchedCertificateKeyPairRequest.swift @@ -0,0 +1,43 @@ +// +// PatchedCertificateKeyPairRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// CertificateKeyPair Serializer +public struct PatchedCertificateKeyPairRequest: Codable { + public var name: String? + /// PEM-encoded Certificate data + public var certificateData: String? + /// Optional Private Key. If this is set, you can use this keypair for encryption. + public var keyData: String? + + public init(name: String? = nil, certificateData: String? = nil, keyData: String? = nil) { + self.name = name + self.certificateData = certificateData + self.keyData = keyData + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case certificateData = "certificate_data" + case keyData = "key_data" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + certificateData = try container.decodeIfPresent(String.self, forKey: .certificateData) + keyData = try container.decodeIfPresent(String.self, forKey: .keyData) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(certificateData, forKey: .certificateData) + try container.encodeIfPresent(keyData, forKey: .keyData) + } +} diff --git a/authentikClient/Sources/Models/PatchedConsentStageRequest.swift b/authentikClient/Sources/Models/PatchedConsentStageRequest.swift new file mode 100644 index 0000000..27c81aa --- /dev/null +++ b/authentikClient/Sources/Models/PatchedConsentStageRequest.swift @@ -0,0 +1,47 @@ +// +// PatchedConsentStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ConsentStage Serializer +public struct PatchedConsentStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var mode: ConsentStageModeEnum? + /// Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + public var consentExpireIn: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, mode: ConsentStageModeEnum? = nil, consentExpireIn: String? = nil) { + self.name = name + self.flowSet = flowSet + self.mode = mode + self.consentExpireIn = consentExpireIn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case mode + case consentExpireIn = "consent_expire_in" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + mode = try container.decodeIfPresent(ConsentStageModeEnum.self, forKey: .mode) + consentExpireIn = try container.decodeIfPresent(String.self, forKey: .consentExpireIn) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(consentExpireIn, forKey: .consentExpireIn) + } +} diff --git a/authentikClient/Sources/Models/PatchedDenyStageRequest.swift b/authentikClient/Sources/Models/PatchedDenyStageRequest.swift new file mode 100644 index 0000000..20c2793 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedDenyStageRequest.swift @@ -0,0 +1,41 @@ +// +// PatchedDenyStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DenyStage Serializer +public struct PatchedDenyStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var denyMessage: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, denyMessage: String? = nil) { + self.name = name + self.flowSet = flowSet + self.denyMessage = denyMessage + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case denyMessage = "deny_message" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + denyMessage = try container.decodeIfPresent(String.self, forKey: .denyMessage) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(denyMessage, forKey: .denyMessage) + } +} diff --git a/authentikClient/Sources/Models/PatchedDockerServiceConnectionRequest.swift b/authentikClient/Sources/Models/PatchedDockerServiceConnectionRequest.swift new file mode 100644 index 0000000..0a9e765 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedDockerServiceConnectionRequest.swift @@ -0,0 +1,55 @@ +// +// PatchedDockerServiceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DockerServiceConnection Serializer +public struct PatchedDockerServiceConnectionRequest: Codable { + public var name: String? + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + /// Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. + public var url: String? + /// CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + public var tlsVerification: UUID? + /// Certificate/Key used for authentication. Can be left empty for no authentication. + public var tlsAuthentication: UUID? + + public init(name: String? = nil, local: Bool? = nil, url: String? = nil, tlsVerification: UUID? = nil, tlsAuthentication: UUID? = nil) { + self.name = name + self.local = local + self.url = url + self.tlsVerification = tlsVerification + self.tlsAuthentication = tlsAuthentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case local + case url + case tlsVerification = "tls_verification" + case tlsAuthentication = "tls_authentication" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + url = try container.decodeIfPresent(String.self, forKey: .url) + tlsVerification = try container.decodeIfPresent(UUID.self, forKey: .tlsVerification) + tlsAuthentication = try container.decodeIfPresent(UUID.self, forKey: .tlsAuthentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encodeIfPresent(url, forKey: .url) + try container.encodeIfPresent(tlsVerification, forKey: .tlsVerification) + try container.encodeIfPresent(tlsAuthentication, forKey: .tlsAuthentication) + } +} diff --git a/authentikClient/Sources/Models/PatchedDummyPolicyRequest.swift b/authentikClient/Sources/Models/PatchedDummyPolicyRequest.swift new file mode 100644 index 0000000..91bd1b9 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedDummyPolicyRequest.swift @@ -0,0 +1,52 @@ +// +// PatchedDummyPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Dummy Policy Serializer +public struct PatchedDummyPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var result: Bool? + public var waitMin: Int? + public var waitMax: Int? + + public init(name: String? = nil, executionLogging: Bool? = nil, result: Bool? = nil, waitMin: Int? = nil, waitMax: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.result = result + self.waitMin = waitMin + self.waitMax = waitMax + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case result + case waitMin = "wait_min" + case waitMax = "wait_max" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + result = try container.decodeIfPresent(Bool.self, forKey: .result) + waitMin = try container.decodeIfPresent(Int.self, forKey: .waitMin) + waitMax = try container.decodeIfPresent(Int.self, forKey: .waitMax) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(result, forKey: .result) + try container.encodeIfPresent(waitMin, forKey: .waitMin) + try container.encodeIfPresent(waitMax, forKey: .waitMax) + } +} diff --git a/authentikClient/Sources/Models/PatchedDummyStageRequest.swift b/authentikClient/Sources/Models/PatchedDummyStageRequest.swift new file mode 100644 index 0000000..b607b49 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedDummyStageRequest.swift @@ -0,0 +1,41 @@ +// +// PatchedDummyStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// DummyStage Serializer +public struct PatchedDummyStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var throwError: Bool? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, throwError: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.throwError = throwError + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case throwError = "throw_error" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + throwError = try container.decodeIfPresent(Bool.self, forKey: .throwError) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(throwError, forKey: .throwError) + } +} diff --git a/authentikClient/Sources/Models/PatchedDuoDeviceRequest.swift b/authentikClient/Sources/Models/PatchedDuoDeviceRequest.swift new file mode 100644 index 0000000..c035367 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedDuoDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedDuoDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Duo authenticator devices +public struct PatchedDuoDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedEmailStageRequest.swift b/authentikClient/Sources/Models/PatchedEmailStageRequest.swift new file mode 100644 index 0000000..8eb6cda --- /dev/null +++ b/authentikClient/Sources/Models/PatchedEmailStageRequest.swift @@ -0,0 +1,104 @@ +// +// PatchedEmailStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// EmailStage Serializer +public struct PatchedEmailStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// When enabled, global Email connection settings will be used and connection settings below will be ignored. + public var useGlobalSettings: Bool? + public var host: String? + public var port: Int? + public var username: String? + public var password: String? + public var useTls: Bool? + public var useSsl: Bool? + public var timeout: Int? + public var fromAddress: String? + /// Time in minutes the token sent is valid. + public var tokenExpiry: Int? + public var subject: String? + public var template: String? + /// Activate users upon completion of stage. + public var activateUserOnSuccess: Bool? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, useGlobalSettings: Bool? = nil, host: String? = nil, port: Int? = nil, username: String? = nil, password: String? = nil, useTls: Bool? = nil, useSsl: Bool? = nil, timeout: Int? = nil, fromAddress: String? = nil, tokenExpiry: Int? = nil, subject: String? = nil, template: String? = nil, activateUserOnSuccess: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.useGlobalSettings = useGlobalSettings + self.host = host + self.port = port + self.username = username + self.password = password + self.useTls = useTls + self.useSsl = useSsl + self.timeout = timeout + self.fromAddress = fromAddress + self.tokenExpiry = tokenExpiry + self.subject = subject + self.template = template + self.activateUserOnSuccess = activateUserOnSuccess + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case useGlobalSettings = "use_global_settings" + case host + case port + case username + case password + case useTls = "use_tls" + case useSsl = "use_ssl" + case timeout + case fromAddress = "from_address" + case tokenExpiry = "token_expiry" + case subject + case template + case activateUserOnSuccess = "activate_user_on_success" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + useGlobalSettings = try container.decodeIfPresent(Bool.self, forKey: .useGlobalSettings) + host = try container.decodeIfPresent(String.self, forKey: .host) + port = try container.decodeIfPresent(Int.self, forKey: .port) + username = try container.decodeIfPresent(String.self, forKey: .username) + password = try container.decodeIfPresent(String.self, forKey: .password) + useTls = try container.decodeIfPresent(Bool.self, forKey: .useTls) + useSsl = try container.decodeIfPresent(Bool.self, forKey: .useSsl) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + fromAddress = try container.decodeIfPresent(String.self, forKey: .fromAddress) + tokenExpiry = try container.decodeIfPresent(Int.self, forKey: .tokenExpiry) + subject = try container.decodeIfPresent(String.self, forKey: .subject) + template = try container.decodeIfPresent(String.self, forKey: .template) + activateUserOnSuccess = try container.decodeIfPresent(Bool.self, forKey: .activateUserOnSuccess) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(useGlobalSettings, forKey: .useGlobalSettings) + try container.encodeIfPresent(host, forKey: .host) + try container.encodeIfPresent(port, forKey: .port) + try container.encodeIfPresent(username, forKey: .username) + try container.encodeIfPresent(password, forKey: .password) + try container.encodeIfPresent(useTls, forKey: .useTls) + try container.encodeIfPresent(useSsl, forKey: .useSsl) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(fromAddress, forKey: .fromAddress) + try container.encodeIfPresent(tokenExpiry, forKey: .tokenExpiry) + try container.encodeIfPresent(subject, forKey: .subject) + try container.encodeIfPresent(template, forKey: .template) + try container.encodeIfPresent(activateUserOnSuccess, forKey: .activateUserOnSuccess) + } +} diff --git a/authentikClient/Sources/Models/PatchedEventMatcherPolicyRequest.swift b/authentikClient/Sources/Models/PatchedEventMatcherPolicyRequest.swift new file mode 100644 index 0000000..b55efdf --- /dev/null +++ b/authentikClient/Sources/Models/PatchedEventMatcherPolicyRequest.swift @@ -0,0 +1,58 @@ +// +// PatchedEventMatcherPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Matcher Policy Serializer +public struct PatchedEventMatcherPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var action: EventActions? + /// Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + public var clientIp: String? + public var app: AppEnum? + public var model: ModelEnum? + + public init(name: String? = nil, executionLogging: Bool? = nil, action: EventActions? = nil, clientIp: String? = nil, app: AppEnum? = nil, model: ModelEnum? = nil) { + self.name = name + self.executionLogging = executionLogging + self.action = action + self.clientIp = clientIp + self.app = app + self.model = model + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case action + case clientIp = "client_ip" + case app + case model + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + action = try container.decodeIfPresent(EventActions.self, forKey: .action) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + app = try container.decodeIfPresent(AppEnum.self, forKey: .app) + model = try container.decodeIfPresent(ModelEnum.self, forKey: .model) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(action, forKey: .action) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encodeIfPresent(app, forKey: .app) + try container.encodeIfPresent(model, forKey: .model) + } +} diff --git a/authentikClient/Sources/Models/PatchedEventRequest.swift b/authentikClient/Sources/Models/PatchedEventRequest.swift new file mode 100644 index 0000000..e38faca --- /dev/null +++ b/authentikClient/Sources/Models/PatchedEventRequest.swift @@ -0,0 +1,61 @@ +// +// PatchedEventRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Event Serializer +public struct PatchedEventRequest: Codable { + public var user: [String: AnyCodable]? + public var action: EventActions? + public var app: String? + public var context: [String: AnyCodable]? + public var clientIp: String? + public var expires: Date? + public var tenant: [String: AnyCodable]? + + public init(user: [String: AnyCodable]? = nil, action: EventActions? = nil, app: String? = nil, context: [String: AnyCodable]? = nil, clientIp: String? = nil, expires: Date? = nil, tenant: [String: AnyCodable]? = nil) { + self.user = user + self.action = action + self.app = app + self.context = context + self.clientIp = clientIp + self.expires = expires + self.tenant = tenant + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case user + case action + case app + case context + case clientIp = "client_ip" + case expires + case tenant + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + user = try container.decodeIfPresent([String: AnyCodable].self, forKey: .user) + action = try container.decodeIfPresent(EventActions.self, forKey: .action) + app = try container.decodeIfPresent(String.self, forKey: .app) + context = try container.decodeIfPresent([String: AnyCodable].self, forKey: .context) + clientIp = try container.decodeIfPresent(String.self, forKey: .clientIp) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + tenant = try container.decodeIfPresent([String: AnyCodable].self, forKey: .tenant) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(user, forKey: .user) + try container.encodeIfPresent(action, forKey: .action) + try container.encodeIfPresent(app, forKey: .app) + try container.encodeIfPresent(context, forKey: .context) + try container.encodeIfPresent(clientIp, forKey: .clientIp) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(tenant, forKey: .tenant) + } +} diff --git a/authentikClient/Sources/Models/PatchedExpressionPolicyRequest.swift b/authentikClient/Sources/Models/PatchedExpressionPolicyRequest.swift new file mode 100644 index 0000000..a4d8315 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedExpressionPolicyRequest.swift @@ -0,0 +1,42 @@ +// +// PatchedExpressionPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Membership Policy Serializer +public struct PatchedExpressionPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var expression: String? + + public init(name: String? = nil, executionLogging: Bool? = nil, expression: String? = nil) { + self.name = name + self.executionLogging = executionLogging + self.expression = expression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case expression + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + expression = try container.decodeIfPresent(String.self, forKey: .expression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(expression, forKey: .expression) + } +} diff --git a/authentikClient/Sources/Models/PatchedFlowRequest.swift b/authentikClient/Sources/Models/PatchedFlowRequest.swift new file mode 100644 index 0000000..d56171c --- /dev/null +++ b/authentikClient/Sources/Models/PatchedFlowRequest.swift @@ -0,0 +1,74 @@ +// +// PatchedFlowRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Flow Serializer +public struct PatchedFlowRequest: Codable { + public var name: String? + /// Visible in the URL. + public var slug: String? + /// Shown as the Title in Flow pages. + public var title: String? + public var designation: FlowDesignationEnum? + public var policyEngineMode: PolicyEngineMode? + /// Enable compatibility mode, increases compatibility with password managers on mobile devices. + public var compatibilityMode: Bool? + public var layout: LayoutEnum? + public var deniedAction: DeniedActionEnum? + public var authentication: AuthenticationEnum? + + public init(name: String? = nil, slug: String? = nil, title: String? = nil, designation: FlowDesignationEnum? = nil, policyEngineMode: PolicyEngineMode? = nil, compatibilityMode: Bool? = nil, layout: LayoutEnum? = nil, deniedAction: DeniedActionEnum? = nil, authentication: AuthenticationEnum? = nil) { + self.name = name + self.slug = slug + self.title = title + self.designation = designation + self.policyEngineMode = policyEngineMode + self.compatibilityMode = compatibilityMode + self.layout = layout + self.deniedAction = deniedAction + self.authentication = authentication + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case title + case designation + case policyEngineMode = "policy_engine_mode" + case compatibilityMode = "compatibility_mode" + case layout + case deniedAction = "denied_action" + case authentication + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + title = try container.decodeIfPresent(String.self, forKey: .title) + designation = try container.decodeIfPresent(FlowDesignationEnum.self, forKey: .designation) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + compatibilityMode = try container.decodeIfPresent(Bool.self, forKey: .compatibilityMode) + layout = try container.decodeIfPresent(LayoutEnum.self, forKey: .layout) + deniedAction = try container.decodeIfPresent(DeniedActionEnum.self, forKey: .deniedAction) + authentication = try container.decodeIfPresent(AuthenticationEnum.self, forKey: .authentication) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(title, forKey: .title) + try container.encodeIfPresent(designation, forKey: .designation) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(compatibilityMode, forKey: .compatibilityMode) + try container.encodeIfPresent(layout, forKey: .layout) + try container.encodeIfPresent(deniedAction, forKey: .deniedAction) + try container.encodeIfPresent(authentication, forKey: .authentication) + } +} diff --git a/authentikClient/Sources/Models/PatchedFlowStageBindingRequest.swift b/authentikClient/Sources/Models/PatchedFlowStageBindingRequest.swift new file mode 100644 index 0000000..1eed786 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedFlowStageBindingRequest.swift @@ -0,0 +1,63 @@ +// +// PatchedFlowStageBindingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// FlowStageBinding Serializer +public struct PatchedFlowStageBindingRequest: Codable { + public var target: UUID? + public var stage: UUID? + /// Evaluate policies during the Flow planning process. + public var evaluateOnPlan: Bool? + /// Evaluate policies when the Stage is present to the user. + public var reEvaluatePolicies: Bool? + public var order: Int? + public var policyEngineMode: PolicyEngineMode? + public var invalidResponseAction: InvalidResponseActionEnum? + + public init(target: UUID? = nil, stage: UUID? = nil, evaluateOnPlan: Bool? = nil, reEvaluatePolicies: Bool? = nil, order: Int? = nil, policyEngineMode: PolicyEngineMode? = nil, invalidResponseAction: InvalidResponseActionEnum? = nil) { + self.target = target + self.stage = stage + self.evaluateOnPlan = evaluateOnPlan + self.reEvaluatePolicies = reEvaluatePolicies + self.order = order + self.policyEngineMode = policyEngineMode + self.invalidResponseAction = invalidResponseAction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case target + case stage + case evaluateOnPlan = "evaluate_on_plan" + case reEvaluatePolicies = "re_evaluate_policies" + case order + case policyEngineMode = "policy_engine_mode" + case invalidResponseAction = "invalid_response_action" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + target = try container.decodeIfPresent(UUID.self, forKey: .target) + stage = try container.decodeIfPresent(UUID.self, forKey: .stage) + evaluateOnPlan = try container.decodeIfPresent(Bool.self, forKey: .evaluateOnPlan) + reEvaluatePolicies = try container.decodeIfPresent(Bool.self, forKey: .reEvaluatePolicies) + order = try container.decodeIfPresent(Int.self, forKey: .order) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + invalidResponseAction = try container.decodeIfPresent(InvalidResponseActionEnum.self, forKey: .invalidResponseAction) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(target, forKey: .target) + try container.encodeIfPresent(stage, forKey: .stage) + try container.encodeIfPresent(evaluateOnPlan, forKey: .evaluateOnPlan) + try container.encodeIfPresent(reEvaluatePolicies, forKey: .reEvaluatePolicies) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(invalidResponseAction, forKey: .invalidResponseAction) + } +} diff --git a/authentikClient/Sources/Models/PatchedGroupRequest.swift b/authentikClient/Sources/Models/PatchedGroupRequest.swift new file mode 100644 index 0000000..8613ab5 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedGroupRequest.swift @@ -0,0 +1,57 @@ +// +// PatchedGroupRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Group Serializer +public struct PatchedGroupRequest: Codable { + public var name: String? + /// Users added to this group will be superusers. + public var isSuperuser: Bool? + public var parent: UUID? + public var users: [Int]? + public var attributes: [String: AnyCodable]? + public var roles: [UUID]? + + public init(name: String? = nil, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: AnyCodable]? = nil, roles: [UUID]? = nil) { + self.name = name + self.isSuperuser = isSuperuser + self.parent = parent + self.users = users + self.attributes = attributes + self.roles = roles + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case isSuperuser = "is_superuser" + case parent + case users + case attributes + case roles + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + isSuperuser = try container.decodeIfPresent(Bool.self, forKey: .isSuperuser) + parent = try container.decodeIfPresent(UUID.self, forKey: .parent) + users = try container.decodeIfPresent([Int].self, forKey: .users) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + roles = try container.decodeIfPresent([UUID].self, forKey: .roles) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(parent, forKey: .parent) + try container.encodeIfPresent(users, forKey: .users) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encodeIfPresent(roles, forKey: .roles) + } +} diff --git a/authentikClient/Sources/Models/PatchedIdentificationStageRequest.swift b/authentikClient/Sources/Models/PatchedIdentificationStageRequest.swift new file mode 100644 index 0000000..38be3d1 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedIdentificationStageRequest.swift @@ -0,0 +1,95 @@ +// +// PatchedIdentificationStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// IdentificationStage Serializer +public struct PatchedIdentificationStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Fields of the user object to match against. (Hold shift to select multiple options) + public var userFields: [UserFieldsEnum]? + /// When set, shows a password field, instead of showing the password field as seaprate step. + public var passwordStage: UUID? + /// When enabled, user fields are matched regardless of their casing. + public var caseInsensitiveMatching: Bool? + /// When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown + public var showMatchedUser: Bool? + /// Optional enrollment flow, which is linked at the bottom of the page. + public var enrollmentFlow: UUID? + /// Optional recovery flow, which is linked at the bottom of the page. + public var recoveryFlow: UUID? + /// Optional passwordless flow, which is linked at the bottom of the page. + public var passwordlessFlow: UUID? + /// Specify which sources should be shown. + public var sources: [UUID]? + public var showSourceLabels: Bool? + /// When enabled, the stage will succeed and continue even when incorrect user info is entered. + public var pretendUserExists: Bool? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, userFields: [UserFieldsEnum]? = nil, passwordStage: UUID? = nil, caseInsensitiveMatching: Bool? = nil, showMatchedUser: Bool? = nil, enrollmentFlow: UUID? = nil, recoveryFlow: UUID? = nil, passwordlessFlow: UUID? = nil, sources: [UUID]? = nil, showSourceLabels: Bool? = nil, pretendUserExists: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.userFields = userFields + self.passwordStage = passwordStage + self.caseInsensitiveMatching = caseInsensitiveMatching + self.showMatchedUser = showMatchedUser + self.enrollmentFlow = enrollmentFlow + self.recoveryFlow = recoveryFlow + self.passwordlessFlow = passwordlessFlow + self.sources = sources + self.showSourceLabels = showSourceLabels + self.pretendUserExists = pretendUserExists + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case userFields = "user_fields" + case passwordStage = "password_stage" + case caseInsensitiveMatching = "case_insensitive_matching" + case showMatchedUser = "show_matched_user" + case enrollmentFlow = "enrollment_flow" + case recoveryFlow = "recovery_flow" + case passwordlessFlow = "passwordless_flow" + case sources + case showSourceLabels = "show_source_labels" + case pretendUserExists = "pretend_user_exists" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + userFields = try container.decodeIfPresent([UserFieldsEnum].self, forKey: .userFields) + passwordStage = try container.decodeIfPresent(UUID.self, forKey: .passwordStage) + caseInsensitiveMatching = try container.decodeIfPresent(Bool.self, forKey: .caseInsensitiveMatching) + showMatchedUser = try container.decodeIfPresent(Bool.self, forKey: .showMatchedUser) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + recoveryFlow = try container.decodeIfPresent(UUID.self, forKey: .recoveryFlow) + passwordlessFlow = try container.decodeIfPresent(UUID.self, forKey: .passwordlessFlow) + sources = try container.decodeIfPresent([UUID].self, forKey: .sources) + showSourceLabels = try container.decodeIfPresent(Bool.self, forKey: .showSourceLabels) + pretendUserExists = try container.decodeIfPresent(Bool.self, forKey: .pretendUserExists) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userFields, forKey: .userFields) + try container.encodeIfPresent(passwordStage, forKey: .passwordStage) + try container.encodeIfPresent(caseInsensitiveMatching, forKey: .caseInsensitiveMatching) + try container.encodeIfPresent(showMatchedUser, forKey: .showMatchedUser) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(recoveryFlow, forKey: .recoveryFlow) + try container.encodeIfPresent(passwordlessFlow, forKey: .passwordlessFlow) + try container.encodeIfPresent(sources, forKey: .sources) + try container.encodeIfPresent(showSourceLabels, forKey: .showSourceLabels) + try container.encodeIfPresent(pretendUserExists, forKey: .pretendUserExists) + } +} diff --git a/authentikClient/Sources/Models/PatchedInvitationRequest.swift b/authentikClient/Sources/Models/PatchedInvitationRequest.swift new file mode 100644 index 0000000..2db8c44 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedInvitationRequest.swift @@ -0,0 +1,53 @@ +// +// PatchedInvitationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Invitation Serializer +public struct PatchedInvitationRequest: Codable { + public var name: String? + public var expires: Date? + public var fixedData: [String: AnyCodable]? + /// When enabled, the invitation will be deleted after usage. + public var singleUse: Bool? + /// When set, only the configured flow can use this invitation. + public var flow: UUID? + + public init(name: String? = nil, expires: Date? = nil, fixedData: [String: AnyCodable]? = nil, singleUse: Bool? = nil, flow: UUID? = nil) { + self.name = name + self.expires = expires + self.fixedData = fixedData + self.singleUse = singleUse + self.flow = flow + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case expires + case fixedData = "fixed_data" + case singleUse = "single_use" + case flow + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + fixedData = try container.decodeIfPresent([String: AnyCodable].self, forKey: .fixedData) + singleUse = try container.decodeIfPresent(Bool.self, forKey: .singleUse) + flow = try container.decodeIfPresent(UUID.self, forKey: .flow) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(fixedData, forKey: .fixedData) + try container.encodeIfPresent(singleUse, forKey: .singleUse) + try container.encodeIfPresent(flow, forKey: .flow) + } +} diff --git a/authentikClient/Sources/Models/PatchedInvitationStageRequest.swift b/authentikClient/Sources/Models/PatchedInvitationStageRequest.swift new file mode 100644 index 0000000..7654cd8 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedInvitationStageRequest.swift @@ -0,0 +1,42 @@ +// +// PatchedInvitationStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// InvitationStage Serializer +public struct PatchedInvitationStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. + public var continueFlowWithoutInvitation: Bool? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, continueFlowWithoutInvitation: Bool? = nil) { + self.name = name + self.flowSet = flowSet + self.continueFlowWithoutInvitation = continueFlowWithoutInvitation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case continueFlowWithoutInvitation = "continue_flow_without_invitation" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + continueFlowWithoutInvitation = try container.decodeIfPresent(Bool.self, forKey: .continueFlowWithoutInvitation) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(continueFlowWithoutInvitation, forKey: .continueFlowWithoutInvitation) + } +} diff --git a/authentikClient/Sources/Models/PatchedKubernetesServiceConnectionRequest.swift b/authentikClient/Sources/Models/PatchedKubernetesServiceConnectionRequest.swift new file mode 100644 index 0000000..4f79be0 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedKubernetesServiceConnectionRequest.swift @@ -0,0 +1,49 @@ +// +// PatchedKubernetesServiceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// KubernetesServiceConnection Serializer +public struct PatchedKubernetesServiceConnectionRequest: Codable { + public var name: String? + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + /// Paste your kubeconfig here. authentik will automatically use the currently selected context. + public var kubeconfig: [String: AnyCodable]? + /// Verify SSL Certificates of the Kubernetes API endpoint + public var verifySsl: Bool? + + public init(name: String? = nil, local: Bool? = nil, kubeconfig: [String: AnyCodable]? = nil, verifySsl: Bool? = nil) { + self.name = name + self.local = local + self.kubeconfig = kubeconfig + self.verifySsl = verifySsl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case local + case kubeconfig + case verifySsl = "verify_ssl" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + kubeconfig = try container.decodeIfPresent([String: AnyCodable].self, forKey: .kubeconfig) + verifySsl = try container.decodeIfPresent(Bool.self, forKey: .verifySsl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encodeIfPresent(kubeconfig, forKey: .kubeconfig) + try container.encodeIfPresent(verifySsl, forKey: .verifySsl) + } +} diff --git a/authentikClient/Sources/Models/PatchedLDAPPropertyMappingRequest.swift b/authentikClient/Sources/Models/PatchedLDAPPropertyMappingRequest.swift new file mode 100644 index 0000000..3a23191 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedLDAPPropertyMappingRequest.swift @@ -0,0 +1,47 @@ +// +// PatchedLDAPPropertyMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP PropertyMapping Serializer +public struct PatchedLDAPPropertyMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String? + public var expression: String? + public var objectField: String? + + public init(managed: String? = nil, name: String? = nil, expression: String? = nil, objectField: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + self.objectField = objectField + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case objectField = "object_field" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decodeIfPresent(String.self, forKey: .name) + expression = try container.decodeIfPresent(String.self, forKey: .expression) + objectField = try container.decodeIfPresent(String.self, forKey: .objectField) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(expression, forKey: .expression) + try container.encodeIfPresent(objectField, forKey: .objectField) + } +} diff --git a/authentikClient/Sources/Models/PatchedLDAPProviderRequest.swift b/authentikClient/Sources/Models/PatchedLDAPProviderRequest.swift new file mode 100644 index 0000000..97733ef --- /dev/null +++ b/authentikClient/Sources/Models/PatchedLDAPProviderRequest.swift @@ -0,0 +1,98 @@ +// +// PatchedLDAPProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAPProvider Serializer +public struct PatchedLDAPProviderRequest: Codable { + public var name: String? + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID? + public var propertyMappings: [UUID]? + /// DN under which objects are accessible. + public var baseDn: String? + /// Users in this group can do search queries. If not set, every user can execute search queries. + public var searchGroup: UUID? + public var certificate: UUID? + public var tlsServerName: String? + /// The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber + public var uidStartNumber: Int? + /// The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber + public var gidStartNumber: Int? + public var searchMode: LDAPAPIAccessMode? + public var bindMode: LDAPAPIAccessMode? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, baseDn: String? = nil, searchGroup: UUID? = nil, certificate: UUID? = nil, tlsServerName: String? = nil, uidStartNumber: Int? = nil, gidStartNumber: Int? = nil, searchMode: LDAPAPIAccessMode? = nil, bindMode: LDAPAPIAccessMode? = nil, mfaSupport: Bool? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.baseDn = baseDn + self.searchGroup = searchGroup + self.certificate = certificate + self.tlsServerName = tlsServerName + self.uidStartNumber = uidStartNumber + self.gidStartNumber = gidStartNumber + self.searchMode = searchMode + self.bindMode = bindMode + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case baseDn = "base_dn" + case searchGroup = "search_group" + case certificate + case tlsServerName = "tls_server_name" + case uidStartNumber = "uid_start_number" + case gidStartNumber = "gid_start_number" + case searchMode = "search_mode" + case bindMode = "bind_mode" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decodeIfPresent(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + baseDn = try container.decodeIfPresent(String.self, forKey: .baseDn) + searchGroup = try container.decodeIfPresent(UUID.self, forKey: .searchGroup) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + tlsServerName = try container.decodeIfPresent(String.self, forKey: .tlsServerName) + uidStartNumber = try container.decodeIfPresent(Int.self, forKey: .uidStartNumber) + gidStartNumber = try container.decodeIfPresent(Int.self, forKey: .gidStartNumber) + searchMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .searchMode) + bindMode = try container.decodeIfPresent(LDAPAPIAccessMode.self, forKey: .bindMode) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(baseDn, forKey: .baseDn) + try container.encodeIfPresent(searchGroup, forKey: .searchGroup) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(tlsServerName, forKey: .tlsServerName) + try container.encodeIfPresent(uidStartNumber, forKey: .uidStartNumber) + try container.encodeIfPresent(gidStartNumber, forKey: .gidStartNumber) + try container.encodeIfPresent(searchMode, forKey: .searchMode) + try container.encodeIfPresent(bindMode, forKey: .bindMode) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/PatchedLDAPSourceRequest.swift b/authentikClient/Sources/Models/PatchedLDAPSourceRequest.swift new file mode 100644 index 0000000..0bb1cd0 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedLDAPSourceRequest.swift @@ -0,0 +1,180 @@ +// +// PatchedLDAPSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// LDAP Source Serializer +public struct PatchedLDAPSourceRequest: Codable { + /// Source's display Name. + public var name: String? + /// Internal source name, used in URLs. + public var slug: String? + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + public var serverUri: String? + /// Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + public var peerCertificate: UUID? + /// Client certificate to authenticate against the LDAP Server's Certificate. + public var clientCertificate: UUID? + public var bindCn: String? + public var bindPassword: String? + public var startTls: Bool? + public var sni: Bool? + public var baseDn: String? + /// Prepended to Base DN for User-queries. + public var additionalUserDn: String? + /// Prepended to Base DN for Group-queries. + public var additionalGroupDn: String? + /// Consider Objects matching this filter to be Users. + public var userObjectFilter: String? + /// Consider Objects matching this filter to be Groups. + public var groupObjectFilter: String? + /// Field which contains members of a group. + public var groupMembershipField: String? + /// Field which contains a unique Identifier. + public var objectUniquenessField: String? + public var syncUsers: Bool? + /// When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + public var syncUsersPassword: Bool? + public var syncGroups: Bool? + public var syncParentGroup: UUID? + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + + public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, serverUri: String? = nil, peerCertificate: UUID? = nil, clientCertificate: UUID? = nil, bindCn: String? = nil, bindPassword: String? = nil, startTls: Bool? = nil, sni: Bool? = nil, baseDn: String? = nil, additionalUserDn: String? = nil, additionalGroupDn: String? = nil, userObjectFilter: String? = nil, groupObjectFilter: String? = nil, groupMembershipField: String? = nil, objectUniquenessField: String? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.serverUri = serverUri + self.peerCertificate = peerCertificate + self.clientCertificate = clientCertificate + self.bindCn = bindCn + self.bindPassword = bindPassword + self.startTls = startTls + self.sni = sni + self.baseDn = baseDn + self.additionalUserDn = additionalUserDn + self.additionalGroupDn = additionalGroupDn + self.userObjectFilter = userObjectFilter + self.groupObjectFilter = groupObjectFilter + self.groupMembershipField = groupMembershipField + self.objectUniquenessField = objectUniquenessField + self.syncUsers = syncUsers + self.syncUsersPassword = syncUsersPassword + self.syncGroups = syncGroups + self.syncParentGroup = syncParentGroup + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case serverUri = "server_uri" + case peerCertificate = "peer_certificate" + case clientCertificate = "client_certificate" + case bindCn = "bind_cn" + case bindPassword = "bind_password" + case startTls = "start_tls" + case sni + case baseDn = "base_dn" + case additionalUserDn = "additional_user_dn" + case additionalGroupDn = "additional_group_dn" + case userObjectFilter = "user_object_filter" + case groupObjectFilter = "group_object_filter" + case groupMembershipField = "group_membership_field" + case objectUniquenessField = "object_uniqueness_field" + case syncUsers = "sync_users" + case syncUsersPassword = "sync_users_password" + case syncGroups = "sync_groups" + case syncParentGroup = "sync_parent_group" + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + serverUri = try container.decodeIfPresent(String.self, forKey: .serverUri) + peerCertificate = try container.decodeIfPresent(UUID.self, forKey: .peerCertificate) + clientCertificate = try container.decodeIfPresent(UUID.self, forKey: .clientCertificate) + bindCn = try container.decodeIfPresent(String.self, forKey: .bindCn) + bindPassword = try container.decodeIfPresent(String.self, forKey: .bindPassword) + startTls = try container.decodeIfPresent(Bool.self, forKey: .startTls) + sni = try container.decodeIfPresent(Bool.self, forKey: .sni) + baseDn = try container.decodeIfPresent(String.self, forKey: .baseDn) + additionalUserDn = try container.decodeIfPresent(String.self, forKey: .additionalUserDn) + additionalGroupDn = try container.decodeIfPresent(String.self, forKey: .additionalGroupDn) + userObjectFilter = try container.decodeIfPresent(String.self, forKey: .userObjectFilter) + groupObjectFilter = try container.decodeIfPresent(String.self, forKey: .groupObjectFilter) + groupMembershipField = try container.decodeIfPresent(String.self, forKey: .groupMembershipField) + objectUniquenessField = try container.decodeIfPresent(String.self, forKey: .objectUniquenessField) + syncUsers = try container.decodeIfPresent(Bool.self, forKey: .syncUsers) + syncUsersPassword = try container.decodeIfPresent(Bool.self, forKey: .syncUsersPassword) + syncGroups = try container.decodeIfPresent(Bool.self, forKey: .syncGroups) + syncParentGroup = try container.decodeIfPresent(UUID.self, forKey: .syncParentGroup) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encodeIfPresent(serverUri, forKey: .serverUri) + try container.encodeIfPresent(peerCertificate, forKey: .peerCertificate) + try container.encodeIfPresent(clientCertificate, forKey: .clientCertificate) + try container.encodeIfPresent(bindCn, forKey: .bindCn) + try container.encodeIfPresent(bindPassword, forKey: .bindPassword) + try container.encodeIfPresent(startTls, forKey: .startTls) + try container.encodeIfPresent(sni, forKey: .sni) + try container.encodeIfPresent(baseDn, forKey: .baseDn) + try container.encodeIfPresent(additionalUserDn, forKey: .additionalUserDn) + try container.encodeIfPresent(additionalGroupDn, forKey: .additionalGroupDn) + try container.encodeIfPresent(userObjectFilter, forKey: .userObjectFilter) + try container.encodeIfPresent(groupObjectFilter, forKey: .groupObjectFilter) + try container.encodeIfPresent(groupMembershipField, forKey: .groupMembershipField) + try container.encodeIfPresent(objectUniquenessField, forKey: .objectUniquenessField) + try container.encodeIfPresent(syncUsers, forKey: .syncUsers) + try container.encodeIfPresent(syncUsersPassword, forKey: .syncUsersPassword) + try container.encodeIfPresent(syncGroups, forKey: .syncGroups) + try container.encodeIfPresent(syncParentGroup, forKey: .syncParentGroup) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + } +} diff --git a/authentikClient/Sources/Models/PatchedLicenseRequest.swift b/authentikClient/Sources/Models/PatchedLicenseRequest.swift new file mode 100644 index 0000000..064fe08 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedLicenseRequest.swift @@ -0,0 +1,17 @@ +// +// PatchedLicenseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// License Serializer +public struct PatchedLicenseRequest: Codable { + public var key: String? + + public init(key: String? = nil) { + self.key = key + } +} diff --git a/authentikClient/Sources/Models/PatchedMobileDeviceRequest.swift b/authentikClient/Sources/Models/PatchedMobileDeviceRequest.swift new file mode 100644 index 0000000..8098b20 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedMobileDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedMobileDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Mobile authenticator devices +public struct PatchedMobileDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedNotificationRequest.swift b/authentikClient/Sources/Models/PatchedNotificationRequest.swift new file mode 100644 index 0000000..d163fd1 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedNotificationRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedNotificationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Notification Serializer +public struct PatchedNotificationRequest: Codable { + public var event: EventRequest? + public var seen: Bool? + + public init(event: EventRequest? = nil, seen: Bool? = nil) { + self.event = event + self.seen = seen + } +} diff --git a/authentikClient/Sources/Models/PatchedNotificationRuleRequest.swift b/authentikClient/Sources/Models/PatchedNotificationRuleRequest.swift new file mode 100644 index 0000000..1084491 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedNotificationRuleRequest.swift @@ -0,0 +1,25 @@ +// +// PatchedNotificationRuleRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationRule Serializer +public struct PatchedNotificationRuleRequest: Codable { + public var name: String? + /// Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. + public var transports: [UUID]? + public var severity: SeverityEnum? + /// Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + public var group: UUID? + + public init(name: String? = nil, transports: [UUID]? = nil, severity: SeverityEnum? = nil, group: UUID? = nil) { + self.name = name + self.transports = transports + self.severity = severity + self.group = group + } +} diff --git a/authentikClient/Sources/Models/PatchedNotificationTransportRequest.swift b/authentikClient/Sources/Models/PatchedNotificationTransportRequest.swift new file mode 100644 index 0000000..36ef2ce --- /dev/null +++ b/authentikClient/Sources/Models/PatchedNotificationTransportRequest.swift @@ -0,0 +1,52 @@ +// +// PatchedNotificationTransportRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationTransport Serializer +public struct PatchedNotificationTransportRequest: Codable { + public var name: String? + public var mode: NotificationTransportModeEnum? + public var webhookUrl: String? + public var webhookMapping: UUID? + /// Only send notification once, for example when sending a webhook into a chat channel. + public var sendOnce: Bool? + + public init(name: String? = nil, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMapping: UUID? = nil, sendOnce: Bool? = nil) { + self.name = name + self.mode = mode + self.webhookUrl = webhookUrl + self.webhookMapping = webhookMapping + self.sendOnce = sendOnce + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case mode + case webhookUrl = "webhook_url" + case webhookMapping = "webhook_mapping" + case sendOnce = "send_once" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + mode = try container.decodeIfPresent(NotificationTransportModeEnum.self, forKey: .mode) + webhookUrl = try container.decodeIfPresent(String.self, forKey: .webhookUrl) + webhookMapping = try container.decodeIfPresent(UUID.self, forKey: .webhookMapping) + sendOnce = try container.decodeIfPresent(Bool.self, forKey: .sendOnce) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) + try container.encodeIfPresent(webhookMapping, forKey: .webhookMapping) + try container.encodeIfPresent(sendOnce, forKey: .sendOnce) + } +} diff --git a/authentikClient/Sources/Models/PatchedNotificationWebhookMappingRequest.swift b/authentikClient/Sources/Models/PatchedNotificationWebhookMappingRequest.swift new file mode 100644 index 0000000..6d9c9ef --- /dev/null +++ b/authentikClient/Sources/Models/PatchedNotificationWebhookMappingRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedNotificationWebhookMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// NotificationWebhookMapping Serializer +public struct PatchedNotificationWebhookMappingRequest: Codable { + public var name: String? + public var expression: String? + + public init(name: String? = nil, expression: String? = nil) { + self.name = name + self.expression = expression + } +} diff --git a/authentikClient/Sources/Models/PatchedOAuth2ProviderRequest.swift b/authentikClient/Sources/Models/PatchedOAuth2ProviderRequest.swift new file mode 100644 index 0000000..efd80fa --- /dev/null +++ b/authentikClient/Sources/Models/PatchedOAuth2ProviderRequest.swift @@ -0,0 +1,114 @@ +// +// PatchedOAuth2ProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth2Provider Serializer +public struct PatchedOAuth2ProviderRequest: Codable { + public var name: String? + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID? + public var propertyMappings: [UUID]? + public var clientType: ClientTypeEnum? + public var clientId: String? + public var clientSecret: String? + /// Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessCodeValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + /// Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + public var includeClaimsInIdToken: Bool? + /// Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. + public var signingKey: UUID? + /// Enter each URI on a new line. + public var redirectUris: String? + public var subMode: SubModeEnum? + public var issuerMode: IssuerModeEnum? + public var jwksSources: [UUID]? + + public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, clientType: ClientTypeEnum? = nil, clientId: String? = nil, clientSecret: String? = nil, accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, includeClaimsInIdToken: Bool? = nil, signingKey: UUID? = nil, redirectUris: String? = nil, subMode: SubModeEnum? = nil, issuerMode: IssuerModeEnum? = nil, jwksSources: [UUID]? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.clientType = clientType + self.clientId = clientId + self.clientSecret = clientSecret + self.accessCodeValidity = accessCodeValidity + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + self.includeClaimsInIdToken = includeClaimsInIdToken + self.signingKey = signingKey + self.redirectUris = redirectUris + self.subMode = subMode + self.issuerMode = issuerMode + self.jwksSources = jwksSources + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case clientType = "client_type" + case clientId = "client_id" + case clientSecret = "client_secret" + case accessCodeValidity = "access_code_validity" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + case includeClaimsInIdToken = "include_claims_in_id_token" + case signingKey = "signing_key" + case redirectUris = "redirect_uris" + case subMode = "sub_mode" + case issuerMode = "issuer_mode" + case jwksSources = "jwks_sources" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decodeIfPresent(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + clientType = try container.decodeIfPresent(ClientTypeEnum.self, forKey: .clientType) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) + accessCodeValidity = try container.decodeIfPresent(String.self, forKey: .accessCodeValidity) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + includeClaimsInIdToken = try container.decodeIfPresent(Bool.self, forKey: .includeClaimsInIdToken) + signingKey = try container.decodeIfPresent(UUID.self, forKey: .signingKey) + redirectUris = try container.decodeIfPresent(String.self, forKey: .redirectUris) + subMode = try container.decodeIfPresent(SubModeEnum.self, forKey: .subMode) + issuerMode = try container.decodeIfPresent(IssuerModeEnum.self, forKey: .issuerMode) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(clientType, forKey: .clientType) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(clientSecret, forKey: .clientSecret) + try container.encodeIfPresent(accessCodeValidity, forKey: .accessCodeValidity) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + try container.encodeIfPresent(includeClaimsInIdToken, forKey: .includeClaimsInIdToken) + try container.encodeIfPresent(signingKey, forKey: .signingKey) + try container.encodeIfPresent(redirectUris, forKey: .redirectUris) + try container.encodeIfPresent(subMode, forKey: .subMode) + try container.encodeIfPresent(issuerMode, forKey: .issuerMode) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + } +} diff --git a/authentikClient/Sources/Models/PatchedOAuthSourceRequest.swift b/authentikClient/Sources/Models/PatchedOAuthSourceRequest.swift new file mode 100644 index 0000000..8d50e21 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedOAuthSourceRequest.swift @@ -0,0 +1,129 @@ +// +// PatchedOAuthSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct PatchedOAuthSourceRequest: Codable { + /// Source's display Name. + public var name: String? + /// Internal source name, used in URLs. + public var slug: String? + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + public var providerType: ProviderTypeEnum? + /// URL used to request the initial token. This URL is only required for OAuth 1. + public var requestTokenUrl: String? + /// URL the user is redirect to to conest the flow. + public var authorizationUrl: String? + /// URL used by authentik to retrieve tokens. + public var accessTokenUrl: String? + /// URL used by authentik to get user information. + public var profileUrl: String? + public var consumerKey: String? + public var consumerSecret: String? + public var additionalScopes: String? + public var oidcWellKnownUrl: String? + public var oidcJwksUrl: String? + public var oidcJwks: [String: AnyCodable]? + + public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, providerType: ProviderTypeEnum? = nil, requestTokenUrl: String? = nil, authorizationUrl: String? = nil, accessTokenUrl: String? = nil, profileUrl: String? = nil, consumerKey: String? = nil, consumerSecret: String? = nil, additionalScopes: String? = nil, oidcWellKnownUrl: String? = nil, oidcJwksUrl: String? = nil, oidcJwks: [String: AnyCodable]? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.providerType = providerType + self.requestTokenUrl = requestTokenUrl + self.authorizationUrl = authorizationUrl + self.accessTokenUrl = accessTokenUrl + self.profileUrl = profileUrl + self.consumerKey = consumerKey + self.consumerSecret = consumerSecret + self.additionalScopes = additionalScopes + self.oidcWellKnownUrl = oidcWellKnownUrl + self.oidcJwksUrl = oidcJwksUrl + self.oidcJwks = oidcJwks + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case providerType = "provider_type" + case requestTokenUrl = "request_token_url" + case authorizationUrl = "authorization_url" + case accessTokenUrl = "access_token_url" + case profileUrl = "profile_url" + case consumerKey = "consumer_key" + case consumerSecret = "consumer_secret" + case additionalScopes = "additional_scopes" + case oidcWellKnownUrl = "oidc_well_known_url" + case oidcJwksUrl = "oidc_jwks_url" + case oidcJwks = "oidc_jwks" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + providerType = try container.decodeIfPresent(ProviderTypeEnum.self, forKey: .providerType) + requestTokenUrl = try container.decodeIfPresent(String.self, forKey: .requestTokenUrl) + authorizationUrl = try container.decodeIfPresent(String.self, forKey: .authorizationUrl) + accessTokenUrl = try container.decodeIfPresent(String.self, forKey: .accessTokenUrl) + profileUrl = try container.decodeIfPresent(String.self, forKey: .profileUrl) + consumerKey = try container.decodeIfPresent(String.self, forKey: .consumerKey) + consumerSecret = try container.decodeIfPresent(String.self, forKey: .consumerSecret) + additionalScopes = try container.decodeIfPresent(String.self, forKey: .additionalScopes) + oidcWellKnownUrl = try container.decodeIfPresent(String.self, forKey: .oidcWellKnownUrl) + oidcJwksUrl = try container.decodeIfPresent(String.self, forKey: .oidcJwksUrl) + oidcJwks = try container.decodeIfPresent([String: AnyCodable].self, forKey: .oidcJwks) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encodeIfPresent(providerType, forKey: .providerType) + try container.encodeIfPresent(requestTokenUrl, forKey: .requestTokenUrl) + try container.encodeIfPresent(authorizationUrl, forKey: .authorizationUrl) + try container.encodeIfPresent(accessTokenUrl, forKey: .accessTokenUrl) + try container.encodeIfPresent(profileUrl, forKey: .profileUrl) + try container.encodeIfPresent(consumerKey, forKey: .consumerKey) + try container.encodeIfPresent(consumerSecret, forKey: .consumerSecret) + try container.encodeIfPresent(additionalScopes, forKey: .additionalScopes) + try container.encodeIfPresent(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) + try container.encodeIfPresent(oidcJwksUrl, forKey: .oidcJwksUrl) + try container.encodeIfPresent(oidcJwks, forKey: .oidcJwks) + } +} diff --git a/authentikClient/Sources/Models/PatchedOutpostRequest.swift b/authentikClient/Sources/Models/PatchedOutpostRequest.swift new file mode 100644 index 0000000..8f7c767 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedOutpostRequest.swift @@ -0,0 +1,58 @@ +// +// PatchedOutpostRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Outpost Serializer +public struct PatchedOutpostRequest: Codable { + public var name: String? + public var type: OutpostTypeEnum? + public var providers: [Int]? + /// Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + public var serviceConnection: UUID? + public var config: [String: AnyCodable]? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + + public init(name: String? = nil, type: OutpostTypeEnum? = nil, providers: [Int]? = nil, serviceConnection: UUID? = nil, config: [String: AnyCodable]? = nil, managed: String? = nil) { + self.name = name + self.type = type + self.providers = providers + self.serviceConnection = serviceConnection + self.config = config + self.managed = managed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case type + case providers + case serviceConnection = "service_connection" + case config + case managed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + type = try container.decodeIfPresent(OutpostTypeEnum.self, forKey: .type) + providers = try container.decodeIfPresent([Int].self, forKey: .providers) + serviceConnection = try container.decodeIfPresent(UUID.self, forKey: .serviceConnection) + config = try container.decodeIfPresent([String: AnyCodable].self, forKey: .config) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(providers, forKey: .providers) + try container.encodeIfPresent(serviceConnection, forKey: .serviceConnection) + try container.encodeIfPresent(config, forKey: .config) + try container.encodeIfPresent(managed, forKey: .managed) + } +} diff --git a/authentikClient/Sources/Models/PatchedPasswordExpiryPolicyRequest.swift b/authentikClient/Sources/Models/PatchedPasswordExpiryPolicyRequest.swift new file mode 100644 index 0000000..99ae56f --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPasswordExpiryPolicyRequest.swift @@ -0,0 +1,47 @@ +// +// PatchedPasswordExpiryPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Expiry Policy Serializer +public struct PatchedPasswordExpiryPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var days: Int? + public var denyOnly: Bool? + + public init(name: String? = nil, executionLogging: Bool? = nil, days: Int? = nil, denyOnly: Bool? = nil) { + self.name = name + self.executionLogging = executionLogging + self.days = days + self.denyOnly = denyOnly + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case days + case denyOnly = "deny_only" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + days = try container.decodeIfPresent(Int.self, forKey: .days) + denyOnly = try container.decodeIfPresent(Bool.self, forKey: .denyOnly) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(days, forKey: .days) + try container.encodeIfPresent(denyOnly, forKey: .denyOnly) + } +} diff --git a/authentikClient/Sources/Models/PatchedPasswordPolicyRequest.swift b/authentikClient/Sources/Models/PatchedPasswordPolicyRequest.swift new file mode 100644 index 0000000..0710207 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPasswordPolicyRequest.swift @@ -0,0 +1,105 @@ +// +// PatchedPasswordPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Password Policy Serializer +public struct PatchedPasswordPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Field key to check, field keys defined in Prompt stages are available. + public var passwordField: String? + public var amountDigits: Int? + public var amountUppercase: Int? + public var amountLowercase: Int? + public var amountSymbols: Int? + public var lengthMin: Int? + public var symbolCharset: String? + public var errorMessage: String? + public var checkStaticRules: Bool? + public var checkHaveIBeenPwned: Bool? + public var checkZxcvbn: Bool? + /// How many times the password hash is allowed to be on haveibeenpwned + public var hibpAllowedCount: Int? + /// If the zxcvbn score is equal or less than this value, the policy will fail. + public var zxcvbnScoreThreshold: Int? + + public init(name: String? = nil, executionLogging: Bool? = nil, passwordField: String? = nil, amountDigits: Int? = nil, amountUppercase: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, lengthMin: Int? = nil, symbolCharset: String? = nil, errorMessage: String? = nil, checkStaticRules: Bool? = nil, checkHaveIBeenPwned: Bool? = nil, checkZxcvbn: Bool? = nil, hibpAllowedCount: Int? = nil, zxcvbnScoreThreshold: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.passwordField = passwordField + self.amountDigits = amountDigits + self.amountUppercase = amountUppercase + self.amountLowercase = amountLowercase + self.amountSymbols = amountSymbols + self.lengthMin = lengthMin + self.symbolCharset = symbolCharset + self.errorMessage = errorMessage + self.checkStaticRules = checkStaticRules + self.checkHaveIBeenPwned = checkHaveIBeenPwned + self.checkZxcvbn = checkZxcvbn + self.hibpAllowedCount = hibpAllowedCount + self.zxcvbnScoreThreshold = zxcvbnScoreThreshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case passwordField = "password_field" + case amountDigits = "amount_digits" + case amountUppercase = "amount_uppercase" + case amountLowercase = "amount_lowercase" + case amountSymbols = "amount_symbols" + case lengthMin = "length_min" + case symbolCharset = "symbol_charset" + case errorMessage = "error_message" + case checkStaticRules = "check_static_rules" + case checkHaveIBeenPwned = "check_have_i_been_pwned" + case checkZxcvbn = "check_zxcvbn" + case hibpAllowedCount = "hibp_allowed_count" + case zxcvbnScoreThreshold = "zxcvbn_score_threshold" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + passwordField = try container.decodeIfPresent(String.self, forKey: .passwordField) + amountDigits = try container.decodeIfPresent(Int.self, forKey: .amountDigits) + amountUppercase = try container.decodeIfPresent(Int.self, forKey: .amountUppercase) + amountLowercase = try container.decodeIfPresent(Int.self, forKey: .amountLowercase) + amountSymbols = try container.decodeIfPresent(Int.self, forKey: .amountSymbols) + lengthMin = try container.decodeIfPresent(Int.self, forKey: .lengthMin) + symbolCharset = try container.decodeIfPresent(String.self, forKey: .symbolCharset) + errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) + checkStaticRules = try container.decodeIfPresent(Bool.self, forKey: .checkStaticRules) + checkHaveIBeenPwned = try container.decodeIfPresent(Bool.self, forKey: .checkHaveIBeenPwned) + checkZxcvbn = try container.decodeIfPresent(Bool.self, forKey: .checkZxcvbn) + hibpAllowedCount = try container.decodeIfPresent(Int.self, forKey: .hibpAllowedCount) + zxcvbnScoreThreshold = try container.decodeIfPresent(Int.self, forKey: .zxcvbnScoreThreshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(passwordField, forKey: .passwordField) + try container.encodeIfPresent(amountDigits, forKey: .amountDigits) + try container.encodeIfPresent(amountUppercase, forKey: .amountUppercase) + try container.encodeIfPresent(amountLowercase, forKey: .amountLowercase) + try container.encodeIfPresent(amountSymbols, forKey: .amountSymbols) + try container.encodeIfPresent(lengthMin, forKey: .lengthMin) + try container.encodeIfPresent(symbolCharset, forKey: .symbolCharset) + try container.encodeIfPresent(errorMessage, forKey: .errorMessage) + try container.encodeIfPresent(checkStaticRules, forKey: .checkStaticRules) + try container.encodeIfPresent(checkHaveIBeenPwned, forKey: .checkHaveIBeenPwned) + try container.encodeIfPresent(checkZxcvbn, forKey: .checkZxcvbn) + try container.encodeIfPresent(hibpAllowedCount, forKey: .hibpAllowedCount) + try container.encodeIfPresent(zxcvbnScoreThreshold, forKey: .zxcvbnScoreThreshold) + } +} diff --git a/authentikClient/Sources/Models/PatchedPasswordStageRequest.swift b/authentikClient/Sources/Models/PatchedPasswordStageRequest.swift new file mode 100644 index 0000000..d65a39d --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPasswordStageRequest.swift @@ -0,0 +1,54 @@ +// +// PatchedPasswordStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PasswordStage Serializer +public struct PatchedPasswordStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Selection of backends to test the password against. + public var backends: [BackendsEnum]? + /// Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + public var configureFlow: UUID? + /// How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. + public var failedAttemptsBeforeCancel: Int? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, backends: [BackendsEnum]? = nil, configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil) { + self.name = name + self.flowSet = flowSet + self.backends = backends + self.configureFlow = configureFlow + self.failedAttemptsBeforeCancel = failedAttemptsBeforeCancel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case backends + case configureFlow = "configure_flow" + case failedAttemptsBeforeCancel = "failed_attempts_before_cancel" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + backends = try container.decodeIfPresent([BackendsEnum].self, forKey: .backends) + configureFlow = try container.decodeIfPresent(UUID.self, forKey: .configureFlow) + failedAttemptsBeforeCancel = try container.decodeIfPresent(Int.self, forKey: .failedAttemptsBeforeCancel) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(backends, forKey: .backends) + try container.encodeIfPresent(configureFlow, forKey: .configureFlow) + try container.encodeIfPresent(failedAttemptsBeforeCancel, forKey: .failedAttemptsBeforeCancel) + } +} diff --git a/authentikClient/Sources/Models/PatchedPermissionAssignRequest.swift b/authentikClient/Sources/Models/PatchedPermissionAssignRequest.swift new file mode 100644 index 0000000..3d10a87 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPermissionAssignRequest.swift @@ -0,0 +1,41 @@ +// +// PatchedPermissionAssignRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Request to assign a new permission +public struct PatchedPermissionAssignRequest: Codable { + public var permissions: [String]? + public var model: ModelEnum? + public var objectPk: String? + + public init(permissions: [String]? = nil, model: ModelEnum? = nil, objectPk: String? = nil) { + self.permissions = permissions + self.model = model + self.objectPk = objectPk + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case permissions + case model + case objectPk = "object_pk" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + permissions = try container.decodeIfPresent([String].self, forKey: .permissions) + model = try container.decodeIfPresent(ModelEnum.self, forKey: .model) + objectPk = try container.decodeIfPresent(String.self, forKey: .objectPk) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(permissions, forKey: .permissions) + try container.encodeIfPresent(model, forKey: .model) + try container.encodeIfPresent(objectPk, forKey: .objectPk) + } +} diff --git a/authentikClient/Sources/Models/PatchedPlexSourceConnectionRequest.swift b/authentikClient/Sources/Models/PatchedPlexSourceConnectionRequest.swift new file mode 100644 index 0000000..4a6acc5 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPlexSourceConnectionRequest.swift @@ -0,0 +1,36 @@ +// +// PatchedPlexSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source connection Serializer +public struct PatchedPlexSourceConnectionRequest: Codable { + public var identifier: String? + public var plexToken: String? + + public init(identifier: String? = nil, plexToken: String? = nil) { + self.identifier = identifier + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case identifier + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + identifier = try container.decodeIfPresent(String.self, forKey: .identifier) + plexToken = try container.decodeIfPresent(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(identifier, forKey: .identifier) + try container.encodeIfPresent(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PatchedPlexSourceRequest.swift b/authentikClient/Sources/Models/PatchedPlexSourceRequest.swift new file mode 100644 index 0000000..b90f527 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPlexSourceRequest.swift @@ -0,0 +1,94 @@ +// +// PatchedPlexSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source Serializer +public struct PatchedPlexSourceRequest: Codable { + /// Source's display Name. + public var name: String? + /// Internal source name, used in URLs. + public var slug: String? + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + /// Client identifier used to talk to Plex. + public var clientId: String? + /// Which servers a user has to be a member of to be granted access. Empty list allows every server. + public var allowedServers: [String]? + /// Allow friends to authenticate, even if you don't share a server. + public var allowFriends: Bool? + /// Plex token used to check friends + public var plexToken: String? + + public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.clientId = clientId + self.allowedServers = allowedServers + self.allowFriends = allowFriends + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case clientId = "client_id" + case allowedServers = "allowed_servers" + case allowFriends = "allow_friends" + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + allowedServers = try container.decodeIfPresent([String].self, forKey: .allowedServers) + allowFriends = try container.decodeIfPresent(Bool.self, forKey: .allowFriends) + plexToken = try container.decodeIfPresent(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(allowedServers, forKey: .allowedServers) + try container.encodeIfPresent(allowFriends, forKey: .allowFriends) + try container.encodeIfPresent(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PatchedPolicyBindingRequest.swift b/authentikClient/Sources/Models/PatchedPolicyBindingRequest.swift new file mode 100644 index 0000000..890dfe5 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPolicyBindingRequest.swift @@ -0,0 +1,74 @@ +// +// PatchedPolicyBindingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PolicyBinding Serializer +public struct PatchedPolicyBindingRequest: Codable { + public var policy: UUID? + public var group: UUID? + public var user: Int? + public var target: UUID? + /// Negates the outcome of the policy. Messages are unaffected. + public var negate: Bool? + public var enabled: Bool? + public var order: Int? + /// Timeout after which Policy execution is terminated. + public var timeout: Int? + /// Result if the Policy execution fails. + public var failureResult: Bool? + + public init(policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, target: UUID? = nil, negate: Bool? = nil, enabled: Bool? = nil, order: Int? = nil, timeout: Int? = nil, failureResult: Bool? = nil) { + self.policy = policy + self.group = group + self.user = user + self.target = target + self.negate = negate + self.enabled = enabled + self.order = order + self.timeout = timeout + self.failureResult = failureResult + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case policy + case group + case user + case target + case negate + case enabled + case order + case timeout + case failureResult = "failure_result" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + policy = try container.decodeIfPresent(UUID.self, forKey: .policy) + group = try container.decodeIfPresent(UUID.self, forKey: .group) + user = try container.decodeIfPresent(Int.self, forKey: .user) + target = try container.decodeIfPresent(UUID.self, forKey: .target) + negate = try container.decodeIfPresent(Bool.self, forKey: .negate) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + order = try container.decodeIfPresent(Int.self, forKey: .order) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + failureResult = try container.decodeIfPresent(Bool.self, forKey: .failureResult) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(policy, forKey: .policy) + try container.encodeIfPresent(group, forKey: .group) + try container.encodeIfPresent(user, forKey: .user) + try container.encodeIfPresent(target, forKey: .target) + try container.encodeIfPresent(negate, forKey: .negate) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(failureResult, forKey: .failureResult) + } +} diff --git a/authentikClient/Sources/Models/PatchedPromptRequest.swift b/authentikClient/Sources/Models/PatchedPromptRequest.swift new file mode 100644 index 0000000..cf02293 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPromptRequest.swift @@ -0,0 +1,89 @@ +// +// PatchedPromptRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Prompt Serializer +public struct PatchedPromptRequest: Codable { + public var name: String? + /// Name of the form field, also used to store the value + public var fieldKey: String? + public var label: String? + public var type: PromptTypeEnum? + public var _required: Bool? + /// Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. + public var placeholder: String? + /// Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. + public var initialValue: String? + public var order: Int? + public var promptstageSet: [StageRequest]? + public var subText: String? + public var placeholderExpression: Bool? + public var initialValueExpression: Bool? + + public init(name: String? = nil, fieldKey: String? = nil, label: String? = nil, type: PromptTypeEnum? = nil, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [StageRequest]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { + self.name = name + self.fieldKey = fieldKey + self.label = label + self.type = type + self._required = _required + self.placeholder = placeholder + self.initialValue = initialValue + self.order = order + self.promptstageSet = promptstageSet + self.subText = subText + self.placeholderExpression = placeholderExpression + self.initialValueExpression = initialValueExpression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case fieldKey = "field_key" + case label + case type + case _required = "required" + case placeholder + case initialValue = "initial_value" + case order + case promptstageSet = "promptstage_set" + case subText = "sub_text" + case placeholderExpression = "placeholder_expression" + case initialValueExpression = "initial_value_expression" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + fieldKey = try container.decodeIfPresent(String.self, forKey: .fieldKey) + label = try container.decodeIfPresent(String.self, forKey: .label) + type = try container.decodeIfPresent(PromptTypeEnum.self, forKey: .type) + _required = try container.decodeIfPresent(Bool.self, forKey: ._required) + placeholder = try container.decodeIfPresent(String.self, forKey: .placeholder) + initialValue = try container.decodeIfPresent(String.self, forKey: .initialValue) + order = try container.decodeIfPresent(Int.self, forKey: .order) + promptstageSet = try container.decodeIfPresent([StageRequest].self, forKey: .promptstageSet) + subText = try container.decodeIfPresent(String.self, forKey: .subText) + placeholderExpression = try container.decodeIfPresent(Bool.self, forKey: .placeholderExpression) + initialValueExpression = try container.decodeIfPresent(Bool.self, forKey: .initialValueExpression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(fieldKey, forKey: .fieldKey) + try container.encodeIfPresent(label, forKey: .label) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(_required, forKey: ._required) + try container.encodeIfPresent(placeholder, forKey: .placeholder) + try container.encodeIfPresent(initialValue, forKey: .initialValue) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) + try container.encodeIfPresent(subText, forKey: .subText) + try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) + try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) + } +} diff --git a/authentikClient/Sources/Models/PatchedPromptStageRequest.swift b/authentikClient/Sources/Models/PatchedPromptStageRequest.swift new file mode 100644 index 0000000..f2c081f --- /dev/null +++ b/authentikClient/Sources/Models/PatchedPromptStageRequest.swift @@ -0,0 +1,46 @@ +// +// PatchedPromptStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PromptStage Serializer +public struct PatchedPromptStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var fields: [UUID]? + public var validationPolicies: [UUID]? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, fields: [UUID]? = nil, validationPolicies: [UUID]? = nil) { + self.name = name + self.flowSet = flowSet + self.fields = fields + self.validationPolicies = validationPolicies + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case fields + case validationPolicies = "validation_policies" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + fields = try container.decodeIfPresent([UUID].self, forKey: .fields) + validationPolicies = try container.decodeIfPresent([UUID].self, forKey: .validationPolicies) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(fields, forKey: .fields) + try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) + } +} diff --git a/authentikClient/Sources/Models/PatchedProxyProviderRequest.swift b/authentikClient/Sources/Models/PatchedProxyProviderRequest.swift new file mode 100644 index 0000000..957836b --- /dev/null +++ b/authentikClient/Sources/Models/PatchedProxyProviderRequest.swift @@ -0,0 +1,126 @@ +// +// PatchedProxyProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ProxyProvider Serializer +public struct PatchedProxyProviderRequest: Codable { + public var name: String? + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID? + public var propertyMappings: [UUID]? + public var internalHost: String? + public var externalHost: String? + /// Validate SSL Certificates of upstream servers + public var internalHostSslValidation: Bool? + public var certificate: UUID? + /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + public var skipPathRegex: String? + /// Set a custom HTTP-Basic Authentication header based on values from authentik. + public var basicAuthEnabled: Bool? + /// User/Group Attribute used for the password part of the HTTP-Basic Header. + public var basicAuthPasswordAttribute: String? + /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. + public var basicAuthUserAttribute: String? + public var mode: ProxyMode? + /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + public var interceptHeaderAuth: Bool? + public var cookieDomain: String? + public var jwksSources: [UUID]? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + + public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, internalHost: String? = nil, externalHost: String? = nil, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.internalHost = internalHost + self.externalHost = externalHost + self.internalHostSslValidation = internalHostSslValidation + self.certificate = certificate + self.skipPathRegex = skipPathRegex + self.basicAuthEnabled = basicAuthEnabled + self.basicAuthPasswordAttribute = basicAuthPasswordAttribute + self.basicAuthUserAttribute = basicAuthUserAttribute + self.mode = mode + self.interceptHeaderAuth = interceptHeaderAuth + self.cookieDomain = cookieDomain + self.jwksSources = jwksSources + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case internalHost = "internal_host" + case externalHost = "external_host" + case internalHostSslValidation = "internal_host_ssl_validation" + case certificate + case skipPathRegex = "skip_path_regex" + case basicAuthEnabled = "basic_auth_enabled" + case basicAuthPasswordAttribute = "basic_auth_password_attribute" + case basicAuthUserAttribute = "basic_auth_user_attribute" + case mode + case interceptHeaderAuth = "intercept_header_auth" + case cookieDomain = "cookie_domain" + case jwksSources = "jwks_sources" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decodeIfPresent(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + internalHost = try container.decodeIfPresent(String.self, forKey: .internalHost) + externalHost = try container.decodeIfPresent(String.self, forKey: .externalHost) + internalHostSslValidation = try container.decodeIfPresent(Bool.self, forKey: .internalHostSslValidation) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + skipPathRegex = try container.decodeIfPresent(String.self, forKey: .skipPathRegex) + basicAuthEnabled = try container.decodeIfPresent(Bool.self, forKey: .basicAuthEnabled) + basicAuthPasswordAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthPasswordAttribute) + basicAuthUserAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthUserAttribute) + mode = try container.decodeIfPresent(ProxyMode.self, forKey: .mode) + interceptHeaderAuth = try container.decodeIfPresent(Bool.self, forKey: .interceptHeaderAuth) + cookieDomain = try container.decodeIfPresent(String.self, forKey: .cookieDomain) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(internalHost, forKey: .internalHost) + try container.encodeIfPresent(externalHost, forKey: .externalHost) + try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) + try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) + try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) + try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) + try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + } +} diff --git a/authentikClient/Sources/Models/PatchedRadiusProviderRequest.swift b/authentikClient/Sources/Models/PatchedRadiusProviderRequest.swift new file mode 100644 index 0000000..dbd1840 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedRadiusProviderRequest.swift @@ -0,0 +1,66 @@ +// +// PatchedRadiusProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// RadiusProvider Serializer +public struct PatchedRadiusProviderRequest: Codable { + public var name: String? + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID? + public var propertyMappings: [UUID]? + /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. + public var clientNetworks: String? + /// Shared secret between clients and server to hash packets. + public var sharedSecret: String? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.clientNetworks = clientNetworks + self.sharedSecret = sharedSecret + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case clientNetworks = "client_networks" + case sharedSecret = "shared_secret" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decodeIfPresent(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + clientNetworks = try container.decodeIfPresent(String.self, forKey: .clientNetworks) + sharedSecret = try container.decodeIfPresent(String.self, forKey: .sharedSecret) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) + try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/PatchedReputationPolicyRequest.swift b/authentikClient/Sources/Models/PatchedReputationPolicyRequest.swift new file mode 100644 index 0000000..8baca36 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedReputationPolicyRequest.swift @@ -0,0 +1,52 @@ +// +// PatchedReputationPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Reputation Policy Serializer +public struct PatchedReputationPolicyRequest: Codable { + public var name: String? + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var checkIp: Bool? + public var checkUsername: Bool? + public var threshold: Int? + + public init(name: String? = nil, executionLogging: Bool? = nil, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.checkIp = checkIp + self.checkUsername = checkUsername + self.threshold = threshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case checkIp = "check_ip" + case checkUsername = "check_username" + case threshold + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + checkIp = try container.decodeIfPresent(Bool.self, forKey: .checkIp) + checkUsername = try container.decodeIfPresent(Bool.self, forKey: .checkUsername) + threshold = try container.decodeIfPresent(Int.self, forKey: .threshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(checkIp, forKey: .checkIp) + try container.encodeIfPresent(checkUsername, forKey: .checkUsername) + try container.encodeIfPresent(threshold, forKey: .threshold) + } +} diff --git a/authentikClient/Sources/Models/PatchedRoleRequest.swift b/authentikClient/Sources/Models/PatchedRoleRequest.swift new file mode 100644 index 0000000..16df33f --- /dev/null +++ b/authentikClient/Sources/Models/PatchedRoleRequest.swift @@ -0,0 +1,17 @@ +// +// PatchedRoleRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Role serializer +public struct PatchedRoleRequest: Codable { + public var name: String? + + public init(name: String? = nil) { + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedSAMLPropertyMappingRequest.swift b/authentikClient/Sources/Models/PatchedSAMLPropertyMappingRequest.swift new file mode 100644 index 0000000..f1dd6fd --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSAMLPropertyMappingRequest.swift @@ -0,0 +1,52 @@ +// +// PatchedSAMLPropertyMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLPropertyMapping Serializer +public struct PatchedSAMLPropertyMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String? + public var expression: String? + public var samlName: String? + public var friendlyName: String? + + public init(managed: String? = nil, name: String? = nil, expression: String? = nil, samlName: String? = nil, friendlyName: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + self.samlName = samlName + self.friendlyName = friendlyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case samlName = "saml_name" + case friendlyName = "friendly_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decodeIfPresent(String.self, forKey: .name) + expression = try container.decodeIfPresent(String.self, forKey: .expression) + samlName = try container.decodeIfPresent(String.self, forKey: .samlName) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(expression, forKey: .expression) + try container.encodeIfPresent(samlName, forKey: .samlName) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + } +} diff --git a/authentikClient/Sources/Models/PatchedSAMLProviderRequest.swift b/authentikClient/Sources/Models/PatchedSAMLProviderRequest.swift new file mode 100644 index 0000000..0adc507 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSAMLProviderRequest.swift @@ -0,0 +1,122 @@ +// +// PatchedSAMLProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLProvider Serializer +public struct PatchedSAMLProviderRequest: Codable { + public var name: String? + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID? + public var propertyMappings: [UUID]? + public var acsUrl: String? + /// Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + public var audience: String? + /// Also known as EntityID + public var issuer: String? + /// Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + public var assertionValidNotBefore: String? + /// Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var assertionValidNotOnOrAfter: String? + /// Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var sessionValidNotOnOrAfter: String? + /// Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + public var nameIdMapping: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Keypair used to sign outgoing Responses going to the Service Provider. + public var signingKp: UUID? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + public var spBinding: SpBindingEnum? + /// Default relay_state value for IDP-initiated logins + public var defaultRelayState: String? + + public init(name: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, propertyMappings: [UUID]? = nil, acsUrl: String? = nil, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.acsUrl = acsUrl + self.audience = audience + self.issuer = issuer + self.assertionValidNotBefore = assertionValidNotBefore + self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter + self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter + self.nameIdMapping = nameIdMapping + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.signingKp = signingKp + self.verificationKp = verificationKp + self.spBinding = spBinding + self.defaultRelayState = defaultRelayState + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case acsUrl = "acs_url" + case audience + case issuer + case assertionValidNotBefore = "assertion_valid_not_before" + case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" + case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" + case nameIdMapping = "name_id_mapping" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case signingKp = "signing_kp" + case verificationKp = "verification_kp" + case spBinding = "sp_binding" + case defaultRelayState = "default_relay_state" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decodeIfPresent(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + acsUrl = try container.decodeIfPresent(String.self, forKey: .acsUrl) + audience = try container.decodeIfPresent(String.self, forKey: .audience) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + assertionValidNotBefore = try container.decodeIfPresent(String.self, forKey: .assertionValidNotBefore) + assertionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .assertionValidNotOnOrAfter) + sessionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .sessionValidNotOnOrAfter) + nameIdMapping = try container.decodeIfPresent(UUID.self, forKey: .nameIdMapping) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + spBinding = try container.decodeIfPresent(SpBindingEnum.self, forKey: .spBinding) + defaultRelayState = try container.decodeIfPresent(String.self, forKey: .defaultRelayState) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(acsUrl, forKey: .acsUrl) + try container.encodeIfPresent(audience, forKey: .audience) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) + try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) + try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) + try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(spBinding, forKey: .spBinding) + try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) + } +} diff --git a/authentikClient/Sources/Models/PatchedSAMLSourceRequest.swift b/authentikClient/Sources/Models/PatchedSAMLSourceRequest.swift new file mode 100644 index 0000000..c6d5e97 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSAMLSourceRequest.swift @@ -0,0 +1,138 @@ +// +// PatchedSAMLSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLSource Serializer +public struct PatchedSAMLSourceRequest: Codable { + /// Source's display Name. + public var name: String? + /// Internal source name, used in URLs. + public var slug: String? + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + /// Flow used before authentication. + public var preAuthenticationFlow: UUID? + /// Also known as Entity ID. Defaults the Metadata URL. + public var issuer: String? + /// URL that the initial Login request is sent to. + public var ssoUrl: String? + /// Optional URL if your IDP supports Single-Logout. + public var sloUrl: String? + /// Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + public var allowIdpInitiated: Bool? + public var nameIdPolicy: NameIdPolicyEnum? + public var bindingType: BindingTypeEnum? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + /// Keypair used to sign outgoing Responses going to the Identity Provider. + public var signingKp: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). + public var temporaryUserDeleteAfter: String? + + public init(name: String? = nil, slug: String? = nil, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, preAuthenticationFlow: UUID? = nil, issuer: String? = nil, ssoUrl: String? = nil, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.preAuthenticationFlow = preAuthenticationFlow + self.issuer = issuer + self.ssoUrl = ssoUrl + self.sloUrl = sloUrl + self.allowIdpInitiated = allowIdpInitiated + self.nameIdPolicy = nameIdPolicy + self.bindingType = bindingType + self.verificationKp = verificationKp + self.signingKp = signingKp + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.temporaryUserDeleteAfter = temporaryUserDeleteAfter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case preAuthenticationFlow = "pre_authentication_flow" + case issuer + case ssoUrl = "sso_url" + case sloUrl = "slo_url" + case allowIdpInitiated = "allow_idp_initiated" + case nameIdPolicy = "name_id_policy" + case bindingType = "binding_type" + case verificationKp = "verification_kp" + case signingKp = "signing_kp" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case temporaryUserDeleteAfter = "temporary_user_delete_after" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + slug = try container.decodeIfPresent(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + preAuthenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .preAuthenticationFlow) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + ssoUrl = try container.decodeIfPresent(String.self, forKey: .ssoUrl) + sloUrl = try container.decodeIfPresent(String.self, forKey: .sloUrl) + allowIdpInitiated = try container.decodeIfPresent(Bool.self, forKey: .allowIdpInitiated) + nameIdPolicy = try container.decodeIfPresent(NameIdPolicyEnum.self, forKey: .nameIdPolicy) + bindingType = try container.decodeIfPresent(BindingTypeEnum.self, forKey: .bindingType) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + temporaryUserDeleteAfter = try container.decodeIfPresent(String.self, forKey: .temporaryUserDeleteAfter) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encodeIfPresent(preAuthenticationFlow, forKey: .preAuthenticationFlow) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encodeIfPresent(ssoUrl, forKey: .ssoUrl) + try container.encodeIfPresent(sloUrl, forKey: .sloUrl) + try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) + try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) + try container.encodeIfPresent(bindingType, forKey: .bindingType) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) + } +} diff --git a/authentikClient/Sources/Models/PatchedSCIMMappingRequest.swift b/authentikClient/Sources/Models/PatchedSCIMMappingRequest.swift new file mode 100644 index 0000000..5b159da --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSCIMMappingRequest.swift @@ -0,0 +1,22 @@ +// +// PatchedSCIMMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMMapping Serializer +public struct PatchedSCIMMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String? + public var expression: String? + + public init(managed: String? = nil, name: String? = nil, expression: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + } +} diff --git a/authentikClient/Sources/Models/PatchedSCIMProviderRequest.swift b/authentikClient/Sources/Models/PatchedSCIMProviderRequest.swift new file mode 100644 index 0000000..59dd929 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSCIMProviderRequest.swift @@ -0,0 +1,64 @@ +// +// PatchedSCIMProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMProvider Serializer +public struct PatchedSCIMProviderRequest: Codable { + public var name: String? + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + /// Base URL to SCIM requests, usually ends in /v2 + public var url: String? + /// Authentication token + public var token: String? + public var excludeUsersServiceAccount: Bool? + public var filterGroup: UUID? + + public init(name: String? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, url: String? = nil, token: String? = nil, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { + self.name = name + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + self.url = url + self.token = token + self.excludeUsersServiceAccount = excludeUsersServiceAccount + self.filterGroup = filterGroup + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + case url + case token + case excludeUsersServiceAccount = "exclude_users_service_account" + case filterGroup = "filter_group" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + url = try container.decodeIfPresent(String.self, forKey: .url) + token = try container.decodeIfPresent(String.self, forKey: .token) + excludeUsersServiceAccount = try container.decodeIfPresent(Bool.self, forKey: .excludeUsersServiceAccount) + filterGroup = try container.decodeIfPresent(UUID.self, forKey: .filterGroup) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + try container.encodeIfPresent(url, forKey: .url) + try container.encodeIfPresent(token, forKey: .token) + try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) + try container.encodeIfPresent(filterGroup, forKey: .filterGroup) + } +} diff --git a/authentikClient/Sources/Models/PatchedSMSDeviceRequest.swift b/authentikClient/Sources/Models/PatchedSMSDeviceRequest.swift new file mode 100644 index 0000000..093a857 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedSMSDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedSMSDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for sms authenticator devices +public struct PatchedSMSDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedScopeMappingRequest.swift b/authentikClient/Sources/Models/PatchedScopeMappingRequest.swift new file mode 100644 index 0000000..9fce7c9 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedScopeMappingRequest.swift @@ -0,0 +1,54 @@ +// +// PatchedScopeMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ScopeMapping Serializer +public struct PatchedScopeMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String? + public var expression: String? + /// Scope name requested by the client + public var scopeName: String? + /// Description shown to the user when consenting. If left empty, the user won't be informed. + public var description: String? + + public init(managed: String? = nil, name: String? = nil, expression: String? = nil, scopeName: String? = nil, description: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + self.scopeName = scopeName + self.description = description + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case scopeName = "scope_name" + case description + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decodeIfPresent(String.self, forKey: .name) + expression = try container.decodeIfPresent(String.self, forKey: .expression) + scopeName = try container.decodeIfPresent(String.self, forKey: .scopeName) + description = try container.decodeIfPresent(String.self, forKey: .description) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(expression, forKey: .expression) + try container.encodeIfPresent(scopeName, forKey: .scopeName) + try container.encodeIfPresent(description, forKey: .description) + } +} diff --git a/authentikClient/Sources/Models/PatchedStaticDeviceRequest.swift b/authentikClient/Sources/Models/PatchedStaticDeviceRequest.swift new file mode 100644 index 0000000..dd3f898 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedStaticDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedStaticDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for static authenticator devices +public struct PatchedStaticDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedTOTPDeviceRequest.swift b/authentikClient/Sources/Models/PatchedTOTPDeviceRequest.swift new file mode 100644 index 0000000..705ef63 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedTOTPDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedTOTPDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for totp authenticator devices +public struct PatchedTOTPDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/PatchedTenantRequest.swift b/authentikClient/Sources/Models/PatchedTenantRequest.swift new file mode 100644 index 0000000..2399b86 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedTenantRequest.swift @@ -0,0 +1,99 @@ +// +// PatchedTenantRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Tenant Serializer +public struct PatchedTenantRequest: Codable { + /// Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + public var domain: String? + public var _default: Bool? + public var brandingTitle: String? + public var brandingLogo: String? + public var brandingFavicon: String? + public var flowAuthentication: UUID? + public var flowInvalidation: UUID? + public var flowRecovery: UUID? + public var flowUnenrollment: UUID? + public var flowUserSettings: UUID? + public var flowDeviceCode: UUID? + /// Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + public var eventRetention: String? + /// Web Certificate used by the authentik Core webserver. + public var webCertificate: UUID? + public var attributes: [String: AnyCodable]? + + public init(domain: String? = nil, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { + self.domain = domain + self._default = _default + self.brandingTitle = brandingTitle + self.brandingLogo = brandingLogo + self.brandingFavicon = brandingFavicon + self.flowAuthentication = flowAuthentication + self.flowInvalidation = flowInvalidation + self.flowRecovery = flowRecovery + self.flowUnenrollment = flowUnenrollment + self.flowUserSettings = flowUserSettings + self.flowDeviceCode = flowDeviceCode + self.eventRetention = eventRetention + self.webCertificate = webCertificate + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case domain + case _default = "default" + case brandingTitle = "branding_title" + case brandingLogo = "branding_logo" + case brandingFavicon = "branding_favicon" + case flowAuthentication = "flow_authentication" + case flowInvalidation = "flow_invalidation" + case flowRecovery = "flow_recovery" + case flowUnenrollment = "flow_unenrollment" + case flowUserSettings = "flow_user_settings" + case flowDeviceCode = "flow_device_code" + case eventRetention = "event_retention" + case webCertificate = "web_certificate" + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + domain = try container.decodeIfPresent(String.self, forKey: .domain) + _default = try container.decodeIfPresent(Bool.self, forKey: ._default) + brandingTitle = try container.decodeIfPresent(String.self, forKey: .brandingTitle) + brandingLogo = try container.decodeIfPresent(String.self, forKey: .brandingLogo) + brandingFavicon = try container.decodeIfPresent(String.self, forKey: .brandingFavicon) + flowAuthentication = try container.decodeIfPresent(UUID.self, forKey: .flowAuthentication) + flowInvalidation = try container.decodeIfPresent(UUID.self, forKey: .flowInvalidation) + flowRecovery = try container.decodeIfPresent(UUID.self, forKey: .flowRecovery) + flowUnenrollment = try container.decodeIfPresent(UUID.self, forKey: .flowUnenrollment) + flowUserSettings = try container.decodeIfPresent(UUID.self, forKey: .flowUserSettings) + flowDeviceCode = try container.decodeIfPresent(UUID.self, forKey: .flowDeviceCode) + eventRetention = try container.decodeIfPresent(String.self, forKey: .eventRetention) + webCertificate = try container.decodeIfPresent(UUID.self, forKey: .webCertificate) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(domain, forKey: .domain) + try container.encodeIfPresent(_default, forKey: ._default) + try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) + try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) + try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) + try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) + try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) + try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) + try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) + try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) + try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) + try container.encodeIfPresent(eventRetention, forKey: .eventRetention) + try container.encodeIfPresent(webCertificate, forKey: .webCertificate) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/PatchedTokenRequest.swift b/authentikClient/Sources/Models/PatchedTokenRequest.swift new file mode 100644 index 0000000..805b513 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedTokenRequest.swift @@ -0,0 +1,30 @@ +// +// PatchedTokenRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Token Serializer +public struct PatchedTokenRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var identifier: String? + public var intent: IntentEnum? + public var user: Int? + public var description: String? + public var expires: Date? + public var expiring: Bool? + + public init(managed: String? = nil, identifier: String? = nil, intent: IntentEnum? = nil, user: Int? = nil, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { + self.managed = managed + self.identifier = identifier + self.intent = intent + self.user = user + self.description = description + self.expires = expires + self.expiring = expiring + } +} diff --git a/authentikClient/Sources/Models/PatchedUserDeleteStageRequest.swift b/authentikClient/Sources/Models/PatchedUserDeleteStageRequest.swift new file mode 100644 index 0000000..58c89f1 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserDeleteStageRequest.swift @@ -0,0 +1,36 @@ +// +// PatchedUserDeleteStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserDeleteStage Serializer +public struct PatchedUserDeleteStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil) { + self.name = name + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/PatchedUserLoginStageRequest.swift b/authentikClient/Sources/Models/PatchedUserLoginStageRequest.swift new file mode 100644 index 0000000..9751156 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserLoginStageRequest.swift @@ -0,0 +1,54 @@ +// +// PatchedUserLoginStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLoginStage Serializer +public struct PatchedUserLoginStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + /// Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) + public var sessionDuration: String? + /// Terminate all other sessions of the user logging in. + public var terminateOtherSessions: Bool? + /// Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + public var rememberMeOffset: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { + self.name = name + self.flowSet = flowSet + self.sessionDuration = sessionDuration + self.terminateOtherSessions = terminateOtherSessions + self.rememberMeOffset = rememberMeOffset + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case sessionDuration = "session_duration" + case terminateOtherSessions = "terminate_other_sessions" + case rememberMeOffset = "remember_me_offset" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + sessionDuration = try container.decodeIfPresent(String.self, forKey: .sessionDuration) + terminateOtherSessions = try container.decodeIfPresent(Bool.self, forKey: .terminateOtherSessions) + rememberMeOffset = try container.decodeIfPresent(String.self, forKey: .rememberMeOffset) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) + try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) + try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) + } +} diff --git a/authentikClient/Sources/Models/PatchedUserLogoutStageRequest.swift b/authentikClient/Sources/Models/PatchedUserLogoutStageRequest.swift new file mode 100644 index 0000000..6c8aee4 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserLogoutStageRequest.swift @@ -0,0 +1,36 @@ +// +// PatchedUserLogoutStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLogoutStage Serializer +public struct PatchedUserLogoutStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil) { + self.name = name + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/PatchedUserOAuthSourceConnectionRequest.swift b/authentikClient/Sources/Models/PatchedUserOAuthSourceConnectionRequest.swift new file mode 100644 index 0000000..93bb922 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserOAuthSourceConnectionRequest.swift @@ -0,0 +1,41 @@ +// +// PatchedUserOAuthSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct PatchedUserOAuthSourceConnectionRequest: Codable { + public var user: Int? + public var identifier: String? + public var accessToken: String? + + public init(user: Int? = nil, identifier: String? = nil, accessToken: String? = nil) { + self.user = user + self.identifier = identifier + self.accessToken = accessToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case user + case identifier + case accessToken = "access_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + user = try container.decodeIfPresent(Int.self, forKey: .user) + identifier = try container.decodeIfPresent(String.self, forKey: .identifier) + accessToken = try container.decodeIfPresent(String.self, forKey: .accessToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(user, forKey: .user) + try container.encodeIfPresent(identifier, forKey: .identifier) + try container.encodeIfPresent(accessToken, forKey: .accessToken) + } +} diff --git a/authentikClient/Sources/Models/PatchedUserRequest.swift b/authentikClient/Sources/Models/PatchedUserRequest.swift new file mode 100644 index 0000000..2ba18b7 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserRequest.swift @@ -0,0 +1,73 @@ +// +// PatchedUserRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User Serializer +public struct PatchedUserRequest: Codable { + public var username: String? + /// User's display name. + public var name: String? + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var groups: [UUID]? + public var email: String? + public var attributes: [String: AnyCodable]? + public var path: String? + public var type: UserTypeEnum? + + public init(username: String? = nil, name: String? = nil, isActive: Bool? = nil, lastLogin: Date? = nil, groups: [UUID]? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, path: String? = nil, type: UserTypeEnum? = nil) { + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.groups = groups + self.email = email + self.attributes = attributes + self.path = path + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case groups + case email + case attributes + case path + case type + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + username = try container.decodeIfPresent(String.self, forKey: .username) + name = try container.decodeIfPresent(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + groups = try container.decodeIfPresent([UUID].self, forKey: .groups) + email = try container.decodeIfPresent(String.self, forKey: .email) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + path = try container.decodeIfPresent(String.self, forKey: .path) + type = try container.decodeIfPresent(UserTypeEnum.self, forKey: .type) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(username, forKey: .username) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encodeIfPresent(groups, forKey: .groups) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encodeIfPresent(path, forKey: .path) + try container.encodeIfPresent(type, forKey: .type) + } +} diff --git a/authentikClient/Sources/Models/PatchedUserSAMLSourceConnectionRequest.swift b/authentikClient/Sources/Models/PatchedUserSAMLSourceConnectionRequest.swift new file mode 100644 index 0000000..033bb4a --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserSAMLSourceConnectionRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedUserSAMLSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAML Source Serializer +public struct PatchedUserSAMLSourceConnectionRequest: Codable { + public var user: Int? + public var identifier: String? + + public init(user: Int? = nil, identifier: String? = nil) { + self.user = user + self.identifier = identifier + } +} diff --git a/authentikClient/Sources/Models/PatchedUserWriteStageRequest.swift b/authentikClient/Sources/Models/PatchedUserWriteStageRequest.swift new file mode 100644 index 0000000..c141029 --- /dev/null +++ b/authentikClient/Sources/Models/PatchedUserWriteStageRequest.swift @@ -0,0 +1,63 @@ +// +// PatchedUserWriteStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserWriteStage Serializer +public struct PatchedUserWriteStageRequest: Codable { + public var name: String? + public var flowSet: [FlowSetRequest]? + public var userCreationMode: UserCreationModeEnum? + /// When set, newly created users are inactive and cannot login. + public var createUsersAsInactive: Bool? + /// Optionally add newly created users to this group. + public var createUsersGroup: UUID? + public var userType: UserTypeEnum? + public var userPathTemplate: String? + + public init(name: String? = nil, flowSet: [FlowSetRequest]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { + self.name = name + self.flowSet = flowSet + self.userCreationMode = userCreationMode + self.createUsersAsInactive = createUsersAsInactive + self.createUsersGroup = createUsersGroup + self.userType = userType + self.userPathTemplate = userPathTemplate + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case userCreationMode = "user_creation_mode" + case createUsersAsInactive = "create_users_as_inactive" + case createUsersGroup = "create_users_group" + case userType = "user_type" + case userPathTemplate = "user_path_template" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + userCreationMode = try container.decodeIfPresent(UserCreationModeEnum.self, forKey: .userCreationMode) + createUsersAsInactive = try container.decodeIfPresent(Bool.self, forKey: .createUsersAsInactive) + createUsersGroup = try container.decodeIfPresent(UUID.self, forKey: .createUsersGroup) + userType = try container.decodeIfPresent(UserTypeEnum.self, forKey: .userType) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) + try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) + try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) + try container.encodeIfPresent(userType, forKey: .userType) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + } +} diff --git a/authentikClient/Sources/Models/PatchedWebAuthnDeviceRequest.swift b/authentikClient/Sources/Models/PatchedWebAuthnDeviceRequest.swift new file mode 100644 index 0000000..45d639d --- /dev/null +++ b/authentikClient/Sources/Models/PatchedWebAuthnDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// PatchedWebAuthnDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for WebAuthn authenticator devices +public struct PatchedWebAuthnDeviceRequest: Codable { + public var pk: String? + public var name: String? + + public init(pk: String? = nil, name: String? = nil) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/Permission.swift b/authentikClient/Sources/Models/Permission.swift new file mode 100644 index 0000000..93dc230 --- /dev/null +++ b/authentikClient/Sources/Models/Permission.swift @@ -0,0 +1,63 @@ +// +// Permission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Global permission +public struct Permission: Codable { + public var id: Int + public var name: String + public var codename: String + public var model: String + public var appLabel: String + /// Human-readable app label + public var appLabelVerbose: String + /// Human-readable model name + public var modelVerbose: String + + public init(id: Int, name: String, codename: String, model: String, appLabel: String, appLabelVerbose: String, modelVerbose: String) { + self.id = id + self.name = name + self.codename = codename + self.model = model + self.appLabel = appLabel + self.appLabelVerbose = appLabelVerbose + self.modelVerbose = modelVerbose + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case codename + case model + case appLabel = "app_label" + case appLabelVerbose = "app_label_verbose" + case modelVerbose = "model_verbose" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + id = try container.decode(Int.self, forKey: .id) + name = try container.decode(String.self, forKey: .name) + codename = try container.decode(String.self, forKey: .codename) + model = try container.decode(String.self, forKey: .model) + appLabel = try container.decode(String.self, forKey: .appLabel) + appLabelVerbose = try container.decode(String.self, forKey: .appLabelVerbose) + modelVerbose = try container.decode(String.self, forKey: .modelVerbose) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(name, forKey: .name) + try container.encode(codename, forKey: .codename) + try container.encode(model, forKey: .model) + try container.encode(appLabel, forKey: .appLabel) + try container.encode(appLabelVerbose, forKey: .appLabelVerbose) + try container.encode(modelVerbose, forKey: .modelVerbose) + } +} diff --git a/authentikClient/Sources/Models/PermissionAssignRequest.swift b/authentikClient/Sources/Models/PermissionAssignRequest.swift new file mode 100644 index 0000000..9cf2979 --- /dev/null +++ b/authentikClient/Sources/Models/PermissionAssignRequest.swift @@ -0,0 +1,41 @@ +// +// PermissionAssignRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Request to assign a new permission +public struct PermissionAssignRequest: Codable { + public var permissions: [String] + public var model: ModelEnum? + public var objectPk: String? + + public init(permissions: [String], model: ModelEnum? = nil, objectPk: String? = nil) { + self.permissions = permissions + self.model = model + self.objectPk = objectPk + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case permissions + case model + case objectPk = "object_pk" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + permissions = try container.decode([String].self, forKey: .permissions) + model = try container.decodeIfPresent(ModelEnum.self, forKey: .model) + objectPk = try container.decodeIfPresent(String.self, forKey: .objectPk) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(permissions, forKey: .permissions) + try container.encodeIfPresent(model, forKey: .model) + try container.encodeIfPresent(objectPk, forKey: .objectPk) + } +} diff --git a/authentikClient/Sources/Models/PlatformEnum.swift b/authentikClient/Sources/Models/PlatformEnum.swift new file mode 100644 index 0000000..b1c5a2a --- /dev/null +++ b/authentikClient/Sources/Models/PlatformEnum.swift @@ -0,0 +1,16 @@ +// +// PlatformEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `ios` - iOS * `android` - Android * `other` - Other +public enum PlatformEnum: String, Codable, CaseIterable { + case ios = "ios" + case android = "android" + case other = "other" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/PlexAuthenticationChallenge.swift b/authentikClient/Sources/Models/PlexAuthenticationChallenge.swift new file mode 100644 index 0000000..03c7ecb --- /dev/null +++ b/authentikClient/Sources/Models/PlexAuthenticationChallenge.swift @@ -0,0 +1,56 @@ +// +// PlexAuthenticationChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge shown to the user in identification stage +public struct PlexAuthenticationChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-source-plex" + public var responseErrors: [String: [ErrorDetail]]? + public var clientId: String + public var slug: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-source-plex", responseErrors: [String: [ErrorDetail]]? = nil, clientId: String, slug: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.clientId = clientId + self.slug = slug + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case clientId = "client_id" + case slug + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + clientId = try container.decode(String.self, forKey: .clientId) + slug = try container.decode(String.self, forKey: .slug) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(clientId, forKey: .clientId) + try container.encode(slug, forKey: .slug) + } +} diff --git a/authentikClient/Sources/Models/PlexAuthenticationChallengeResponseRequest.swift b/authentikClient/Sources/Models/PlexAuthenticationChallengeResponseRequest.swift new file mode 100644 index 0000000..a7ed37f --- /dev/null +++ b/authentikClient/Sources/Models/PlexAuthenticationChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// PlexAuthenticationChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Pseudo class for plex response +public struct PlexAuthenticationChallengeResponseRequest: Codable { + public var component: String? = "ak-source-plex" + + public init(component: String? = "ak-source-plex") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/PlexSource.swift b/authentikClient/Sources/Models/PlexSource.swift new file mode 100644 index 0000000..5626f96 --- /dev/null +++ b/authentikClient/Sources/Models/PlexSource.swift @@ -0,0 +1,135 @@ +// +// PlexSource.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source Serializer +public struct PlexSource: Codable { + public var pk: UUID + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var userPathTemplate: String? + /// Get the URL to the Icon. If the name is /static or starts with http it is returned as-is + public var icon: String? + /// Client identifier used to talk to Plex. + public var clientId: String? + /// Which servers a user has to be a member of to be granted access. Empty list allows every server. + public var allowedServers: [String]? + /// Allow friends to authenticate, even if you don't share a server. + public var allowFriends: Bool? + /// Plex token used to check friends + public var plexToken: String + + public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String) { + self.pk = pk + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.managed = managed + self.userPathTemplate = userPathTemplate + self.icon = icon + self.clientId = clientId + self.allowedServers = allowedServers + self.allowFriends = allowFriends + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case managed + case userPathTemplate = "user_path_template" + case icon + case clientId = "client_id" + case allowedServers = "allowed_servers" + case allowFriends = "allow_friends" + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + managed = try container.decode(String.self, forKey: .managed) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + icon = try container.decode(String.self, forKey: .icon) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + allowedServers = try container.decodeIfPresent([String].self, forKey: .allowedServers) + allowFriends = try container.decodeIfPresent(Bool.self, forKey: .allowFriends) + plexToken = try container.decode(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encode(managed, forKey: .managed) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(icon, forKey: .icon) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(allowedServers, forKey: .allowedServers) + try container.encodeIfPresent(allowFriends, forKey: .allowFriends) + try container.encode(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PlexSourceConnection.swift b/authentikClient/Sources/Models/PlexSourceConnection.swift new file mode 100644 index 0000000..beb719c --- /dev/null +++ b/authentikClient/Sources/Models/PlexSourceConnection.swift @@ -0,0 +1,51 @@ +// +// PlexSourceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source connection Serializer +public struct PlexSourceConnection: Codable { + public var pk: Int + public var user: Int + public var source: Source + public var identifier: String + public var plexToken: String + + public init(pk: Int, user: Int, source: Source, identifier: String, plexToken: String) { + self.pk = pk + self.user = user + self.source = source + self.identifier = identifier + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case user + case source + case identifier + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + user = try container.decode(Int.self, forKey: .user) + source = try container.decode(Source.self, forKey: .source) + identifier = try container.decode(String.self, forKey: .identifier) + plexToken = try container.decode(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(user, forKey: .user) + try container.encode(source, forKey: .source) + try container.encode(identifier, forKey: .identifier) + try container.encode(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PlexSourceConnectionRequest.swift b/authentikClient/Sources/Models/PlexSourceConnectionRequest.swift new file mode 100644 index 0000000..1e05a55 --- /dev/null +++ b/authentikClient/Sources/Models/PlexSourceConnectionRequest.swift @@ -0,0 +1,36 @@ +// +// PlexSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source connection Serializer +public struct PlexSourceConnectionRequest: Codable { + public var identifier: String + public var plexToken: String + + public init(identifier: String, plexToken: String) { + self.identifier = identifier + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case identifier + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + identifier = try container.decode(String.self, forKey: .identifier) + plexToken = try container.decode(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(identifier, forKey: .identifier) + try container.encode(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PlexSourceRequest.swift b/authentikClient/Sources/Models/PlexSourceRequest.swift new file mode 100644 index 0000000..436b28d --- /dev/null +++ b/authentikClient/Sources/Models/PlexSourceRequest.swift @@ -0,0 +1,94 @@ +// +// PlexSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Plex Source Serializer +public struct PlexSourceRequest: Codable { + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + /// Client identifier used to talk to Plex. + public var clientId: String? + /// Which servers a user has to be a member of to be granted access. Empty list allows every server. + public var allowedServers: [String]? + /// Allow friends to authenticate, even if you don't share a server. + public var allowFriends: Bool? + /// Plex token used to check friends + public var plexToken: String + + public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, clientId: String? = nil, allowedServers: [String]? = nil, allowFriends: Bool? = nil, plexToken: String) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.clientId = clientId + self.allowedServers = allowedServers + self.allowFriends = allowFriends + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case clientId = "client_id" + case allowedServers = "allowed_servers" + case allowFriends = "allow_friends" + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + allowedServers = try container.decodeIfPresent([String].self, forKey: .allowedServers) + allowFriends = try container.decodeIfPresent(Bool.self, forKey: .allowFriends) + plexToken = try container.decode(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(allowedServers, forKey: .allowedServers) + try container.encodeIfPresent(allowFriends, forKey: .allowFriends) + try container.encode(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/PlexTokenRedeemRequest.swift b/authentikClient/Sources/Models/PlexTokenRedeemRequest.swift new file mode 100644 index 0000000..4e874c9 --- /dev/null +++ b/authentikClient/Sources/Models/PlexTokenRedeemRequest.swift @@ -0,0 +1,31 @@ +// +// PlexTokenRedeemRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer to redeem a plex token +public struct PlexTokenRedeemRequest: Codable { + public var plexToken: String + + public init(plexToken: String) { + self.plexToken = plexToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case plexToken = "plex_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + plexToken = try container.decode(String.self, forKey: .plexToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(plexToken, forKey: .plexToken) + } +} diff --git a/authentikClient/Sources/Models/Policy.swift b/authentikClient/Sources/Models/Policy.swift new file mode 100644 index 0000000..2b34dd0 --- /dev/null +++ b/authentikClient/Sources/Models/Policy.swift @@ -0,0 +1,72 @@ +// +// Policy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Policy Serializer +public struct Policy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + } +} diff --git a/authentikClient/Sources/Models/PolicyBinding.swift b/authentikClient/Sources/Models/PolicyBinding.swift new file mode 100644 index 0000000..917680d --- /dev/null +++ b/authentikClient/Sources/Models/PolicyBinding.swift @@ -0,0 +1,94 @@ +// +// PolicyBinding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PolicyBinding Serializer +public struct PolicyBinding: Codable { + public var pk: UUID + public var policy: UUID? + public var group: UUID? + public var user: Int? + public var policyObj: Policy + public var groupObj: Group + public var userObj: User + public var target: UUID + /// Negates the outcome of the policy. Messages are unaffected. + public var negate: Bool? + public var enabled: Bool? + public var order: Int + /// Timeout after which Policy execution is terminated. + public var timeout: Int? + /// Result if the Policy execution fails. + public var failureResult: Bool? + + public init(pk: UUID, policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, policyObj: Policy, groupObj: Group, userObj: User, target: UUID, negate: Bool? = nil, enabled: Bool? = nil, order: Int, timeout: Int? = nil, failureResult: Bool? = nil) { + self.pk = pk + self.policy = policy + self.group = group + self.user = user + self.policyObj = policyObj + self.groupObj = groupObj + self.userObj = userObj + self.target = target + self.negate = negate + self.enabled = enabled + self.order = order + self.timeout = timeout + self.failureResult = failureResult + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case policy + case group + case user + case policyObj = "policy_obj" + case groupObj = "group_obj" + case userObj = "user_obj" + case target + case negate + case enabled + case order + case timeout + case failureResult = "failure_result" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + policy = try container.decodeIfPresent(UUID.self, forKey: .policy) + group = try container.decodeIfPresent(UUID.self, forKey: .group) + user = try container.decodeIfPresent(Int.self, forKey: .user) + policyObj = try container.decode(Policy.self, forKey: .policyObj) + groupObj = try container.decode(Group.self, forKey: .groupObj) + userObj = try container.decode(User.self, forKey: .userObj) + target = try container.decode(UUID.self, forKey: .target) + negate = try container.decodeIfPresent(Bool.self, forKey: .negate) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + order = try container.decode(Int.self, forKey: .order) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + failureResult = try container.decodeIfPresent(Bool.self, forKey: .failureResult) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(policy, forKey: .policy) + try container.encodeIfPresent(group, forKey: .group) + try container.encodeIfPresent(user, forKey: .user) + try container.encode(policyObj, forKey: .policyObj) + try container.encode(groupObj, forKey: .groupObj) + try container.encode(userObj, forKey: .userObj) + try container.encode(target, forKey: .target) + try container.encodeIfPresent(negate, forKey: .negate) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(order, forKey: .order) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(failureResult, forKey: .failureResult) + } +} diff --git a/authentikClient/Sources/Models/PolicyBindingRequest.swift b/authentikClient/Sources/Models/PolicyBindingRequest.swift new file mode 100644 index 0000000..54de785 --- /dev/null +++ b/authentikClient/Sources/Models/PolicyBindingRequest.swift @@ -0,0 +1,74 @@ +// +// PolicyBindingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PolicyBinding Serializer +public struct PolicyBindingRequest: Codable { + public var policy: UUID? + public var group: UUID? + public var user: Int? + public var target: UUID + /// Negates the outcome of the policy. Messages are unaffected. + public var negate: Bool? + public var enabled: Bool? + public var order: Int + /// Timeout after which Policy execution is terminated. + public var timeout: Int? + /// Result if the Policy execution fails. + public var failureResult: Bool? + + public init(policy: UUID? = nil, group: UUID? = nil, user: Int? = nil, target: UUID, negate: Bool? = nil, enabled: Bool? = nil, order: Int, timeout: Int? = nil, failureResult: Bool? = nil) { + self.policy = policy + self.group = group + self.user = user + self.target = target + self.negate = negate + self.enabled = enabled + self.order = order + self.timeout = timeout + self.failureResult = failureResult + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case policy + case group + case user + case target + case negate + case enabled + case order + case timeout + case failureResult = "failure_result" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + policy = try container.decodeIfPresent(UUID.self, forKey: .policy) + group = try container.decodeIfPresent(UUID.self, forKey: .group) + user = try container.decodeIfPresent(Int.self, forKey: .user) + target = try container.decode(UUID.self, forKey: .target) + negate = try container.decodeIfPresent(Bool.self, forKey: .negate) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + order = try container.decode(Int.self, forKey: .order) + timeout = try container.decodeIfPresent(Int.self, forKey: .timeout) + failureResult = try container.decodeIfPresent(Bool.self, forKey: .failureResult) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(policy, forKey: .policy) + try container.encodeIfPresent(group, forKey: .group) + try container.encodeIfPresent(user, forKey: .user) + try container.encode(target, forKey: .target) + try container.encodeIfPresent(negate, forKey: .negate) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(order, forKey: .order) + try container.encodeIfPresent(timeout, forKey: .timeout) + try container.encodeIfPresent(failureResult, forKey: .failureResult) + } +} diff --git a/authentikClient/Sources/Models/PolicyEngineMode.swift b/authentikClient/Sources/Models/PolicyEngineMode.swift new file mode 100644 index 0000000..d22e464 --- /dev/null +++ b/authentikClient/Sources/Models/PolicyEngineMode.swift @@ -0,0 +1,15 @@ +// +// PolicyEngineMode.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `all` - all, all policies must pass * `any` - any, any policy must pass +public enum PolicyEngineMode: String, Codable, CaseIterable { + case all = "all" + case any = "any" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/PolicyRequest.swift b/authentikClient/Sources/Models/PolicyRequest.swift new file mode 100644 index 0000000..e50f82c --- /dev/null +++ b/authentikClient/Sources/Models/PolicyRequest.swift @@ -0,0 +1,37 @@ +// +// PolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Policy Serializer +public struct PolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + + public init(name: String, executionLogging: Bool? = nil) { + self.name = name + self.executionLogging = executionLogging + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + } +} diff --git a/authentikClient/Sources/Models/PolicyTestRequest.swift b/authentikClient/Sources/Models/PolicyTestRequest.swift new file mode 100644 index 0000000..82ec64e --- /dev/null +++ b/authentikClient/Sources/Models/PolicyTestRequest.swift @@ -0,0 +1,19 @@ +// +// PolicyTestRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Test policy execution for a user with context +public struct PolicyTestRequest: Codable { + public var user: Int + public var context: [String: AnyCodable]? + + public init(user: Int, context: [String: AnyCodable]? = nil) { + self.user = user + self.context = context + } +} diff --git a/authentikClient/Sources/Models/PolicyTestResult.swift b/authentikClient/Sources/Models/PolicyTestResult.swift new file mode 100644 index 0000000..b8f3fe9 --- /dev/null +++ b/authentikClient/Sources/Models/PolicyTestResult.swift @@ -0,0 +1,41 @@ +// +// PolicyTestResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// result of a policy test +public struct PolicyTestResult: Codable { + public var passing: Bool + public var messages: [String] + public var logMessages: [[String: AnyCodable]] + + public init(passing: Bool, messages: [String], logMessages: [[String: AnyCodable]]) { + self.passing = passing + self.messages = messages + self.logMessages = logMessages + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case passing + case messages + case logMessages = "log_messages" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + passing = try container.decode(Bool.self, forKey: .passing) + messages = try container.decode([String].self, forKey: .messages) + logMessages = try container.decode([[String: AnyCodable]].self, forKey: .logMessages) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(passing, forKey: .passing) + try container.encode(messages, forKey: .messages) + try container.encode(logMessages, forKey: .logMessages) + } +} diff --git a/authentikClient/Sources/Models/Prompt.swift b/authentikClient/Sources/Models/Prompt.swift new file mode 100644 index 0000000..8ecf099 --- /dev/null +++ b/authentikClient/Sources/Models/Prompt.swift @@ -0,0 +1,94 @@ +// +// Prompt.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Prompt Serializer +public struct Prompt: Codable { + public var pk: UUID + public var name: String + /// Name of the form field, also used to store the value + public var fieldKey: String + public var label: String + public var type: PromptTypeEnum + public var _required: Bool? + /// Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. + public var placeholder: String? + /// Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. + public var initialValue: String? + public var order: Int? + public var promptstageSet: [Stage]? + public var subText: String? + public var placeholderExpression: Bool? + public var initialValueExpression: Bool? + + public init(pk: UUID, name: String, fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [Stage]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { + self.pk = pk + self.name = name + self.fieldKey = fieldKey + self.label = label + self.type = type + self._required = _required + self.placeholder = placeholder + self.initialValue = initialValue + self.order = order + self.promptstageSet = promptstageSet + self.subText = subText + self.placeholderExpression = placeholderExpression + self.initialValueExpression = initialValueExpression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case fieldKey = "field_key" + case label + case type + case _required = "required" + case placeholder + case initialValue = "initial_value" + case order + case promptstageSet = "promptstage_set" + case subText = "sub_text" + case placeholderExpression = "placeholder_expression" + case initialValueExpression = "initial_value_expression" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + fieldKey = try container.decode(String.self, forKey: .fieldKey) + label = try container.decode(String.self, forKey: .label) + type = try container.decode(PromptTypeEnum.self, forKey: .type) + _required = try container.decodeIfPresent(Bool.self, forKey: ._required) + placeholder = try container.decodeIfPresent(String.self, forKey: .placeholder) + initialValue = try container.decodeIfPresent(String.self, forKey: .initialValue) + order = try container.decodeIfPresent(Int.self, forKey: .order) + promptstageSet = try container.decodeIfPresent([Stage].self, forKey: .promptstageSet) + subText = try container.decodeIfPresent(String.self, forKey: .subText) + placeholderExpression = try container.decodeIfPresent(Bool.self, forKey: .placeholderExpression) + initialValueExpression = try container.decodeIfPresent(Bool.self, forKey: .initialValueExpression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(fieldKey, forKey: .fieldKey) + try container.encode(label, forKey: .label) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(_required, forKey: ._required) + try container.encodeIfPresent(placeholder, forKey: .placeholder) + try container.encodeIfPresent(initialValue, forKey: .initialValue) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) + try container.encodeIfPresent(subText, forKey: .subText) + try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) + try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) + } +} diff --git a/authentikClient/Sources/Models/PromptChallenge.swift b/authentikClient/Sources/Models/PromptChallenge.swift new file mode 100644 index 0000000..9ec51c3 --- /dev/null +++ b/authentikClient/Sources/Models/PromptChallenge.swift @@ -0,0 +1,51 @@ +// +// PromptChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Initial challenge being sent, define fields +public struct PromptChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-prompt" + public var responseErrors: [String: [ErrorDetail]]? + public var fields: [StagePrompt] + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-prompt", responseErrors: [String: [ErrorDetail]]? = nil, fields: [StagePrompt]) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.fields = fields + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case fields + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + fields = try container.decode([StagePrompt].self, forKey: .fields) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(fields, forKey: .fields) + } +} diff --git a/authentikClient/Sources/Models/PromptChallengeResponseRequest.swift b/authentikClient/Sources/Models/PromptChallengeResponseRequest.swift new file mode 100644 index 0000000..eb6901c --- /dev/null +++ b/authentikClient/Sources/Models/PromptChallengeResponseRequest.swift @@ -0,0 +1,17 @@ +// +// PromptChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Validate response, fields are dynamically created based on the stage +public struct PromptChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-prompt" + + public init(component: String? = "ak-stage-prompt") { + self.component = component + } +} diff --git a/authentikClient/Sources/Models/PromptRequest.swift b/authentikClient/Sources/Models/PromptRequest.swift new file mode 100644 index 0000000..48b549e --- /dev/null +++ b/authentikClient/Sources/Models/PromptRequest.swift @@ -0,0 +1,89 @@ +// +// PromptRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Prompt Serializer +public struct PromptRequest: Codable { + public var name: String + /// Name of the form field, also used to store the value + public var fieldKey: String + public var label: String + public var type: PromptTypeEnum + public var _required: Bool? + /// Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. + public var placeholder: String? + /// Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. + public var initialValue: String? + public var order: Int? + public var promptstageSet: [StageRequest]? + public var subText: String? + public var placeholderExpression: Bool? + public var initialValueExpression: Bool? + + public init(name: String, fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool? = nil, placeholder: String? = nil, initialValue: String? = nil, order: Int? = nil, promptstageSet: [StageRequest]? = nil, subText: String? = nil, placeholderExpression: Bool? = nil, initialValueExpression: Bool? = nil) { + self.name = name + self.fieldKey = fieldKey + self.label = label + self.type = type + self._required = _required + self.placeholder = placeholder + self.initialValue = initialValue + self.order = order + self.promptstageSet = promptstageSet + self.subText = subText + self.placeholderExpression = placeholderExpression + self.initialValueExpression = initialValueExpression + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case fieldKey = "field_key" + case label + case type + case _required = "required" + case placeholder + case initialValue = "initial_value" + case order + case promptstageSet = "promptstage_set" + case subText = "sub_text" + case placeholderExpression = "placeholder_expression" + case initialValueExpression = "initial_value_expression" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + fieldKey = try container.decode(String.self, forKey: .fieldKey) + label = try container.decode(String.self, forKey: .label) + type = try container.decode(PromptTypeEnum.self, forKey: .type) + _required = try container.decodeIfPresent(Bool.self, forKey: ._required) + placeholder = try container.decodeIfPresent(String.self, forKey: .placeholder) + initialValue = try container.decodeIfPresent(String.self, forKey: .initialValue) + order = try container.decodeIfPresent(Int.self, forKey: .order) + promptstageSet = try container.decodeIfPresent([StageRequest].self, forKey: .promptstageSet) + subText = try container.decodeIfPresent(String.self, forKey: .subText) + placeholderExpression = try container.decodeIfPresent(Bool.self, forKey: .placeholderExpression) + initialValueExpression = try container.decodeIfPresent(Bool.self, forKey: .initialValueExpression) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(fieldKey, forKey: .fieldKey) + try container.encode(label, forKey: .label) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(_required, forKey: ._required) + try container.encodeIfPresent(placeholder, forKey: .placeholder) + try container.encodeIfPresent(initialValue, forKey: .initialValue) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(promptstageSet, forKey: .promptstageSet) + try container.encodeIfPresent(subText, forKey: .subText) + try container.encodeIfPresent(placeholderExpression, forKey: .placeholderExpression) + try container.encodeIfPresent(initialValueExpression, forKey: .initialValueExpression) + } +} diff --git a/authentikClient/Sources/Models/PromptStage.swift b/authentikClient/Sources/Models/PromptStage.swift new file mode 100644 index 0000000..0646f1b --- /dev/null +++ b/authentikClient/Sources/Models/PromptStage.swift @@ -0,0 +1,75 @@ +// +// PromptStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PromptStage Serializer +public struct PromptStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var fields: [UUID] + public var validationPolicies: [UUID]? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, fields: [UUID], validationPolicies: [UUID]? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.fields = fields + self.validationPolicies = validationPolicies + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case fields + case validationPolicies = "validation_policies" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + fields = try container.decode([UUID].self, forKey: .fields) + validationPolicies = try container.decodeIfPresent([UUID].self, forKey: .validationPolicies) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(fields, forKey: .fields) + try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) + } +} diff --git a/authentikClient/Sources/Models/PromptStageRequest.swift b/authentikClient/Sources/Models/PromptStageRequest.swift new file mode 100644 index 0000000..d165b5a --- /dev/null +++ b/authentikClient/Sources/Models/PromptStageRequest.swift @@ -0,0 +1,46 @@ +// +// PromptStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PromptStage Serializer +public struct PromptStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var fields: [UUID] + public var validationPolicies: [UUID]? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, fields: [UUID], validationPolicies: [UUID]? = nil) { + self.name = name + self.flowSet = flowSet + self.fields = fields + self.validationPolicies = validationPolicies + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case fields + case validationPolicies = "validation_policies" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + fields = try container.decode([UUID].self, forKey: .fields) + validationPolicies = try container.decodeIfPresent([UUID].self, forKey: .validationPolicies) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encode(fields, forKey: .fields) + try container.encodeIfPresent(validationPolicies, forKey: .validationPolicies) + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/PromptTypeEnum.swift b/authentikClient/Sources/Models/PromptTypeEnum.swift similarity index 88% rename from authentikClient/Classes/OpenAPIs/Models/PromptTypeEnum.swift rename to authentikClient/Sources/Models/PromptTypeEnum.swift index 3e0fd00..a51e1dd 100644 --- a/authentikClient/Classes/OpenAPIs/Models/PromptTypeEnum.swift +++ b/authentikClient/Sources/Models/PromptTypeEnum.swift @@ -6,12 +6,9 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -/** * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports */ -public enum PromptTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { +/// * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports +public enum PromptTypeEnum: String, Codable, CaseIterable { case text = "text" case textArea = "text_area" case textReadOnly = "text_read_only" diff --git a/authentikClient/Sources/Models/PropertyMapping.swift b/authentikClient/Sources/Models/PropertyMapping.swift new file mode 100644 index 0000000..3495ab2 --- /dev/null +++ b/authentikClient/Sources/Models/PropertyMapping.swift @@ -0,0 +1,71 @@ +// +// PropertyMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// PropertyMapping Serializer +public struct PropertyMapping: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Get object's component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + + public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { + self.pk = pk + self.managed = managed + self.name = name + self.expression = expression + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case name + case expression + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + } +} diff --git a/authentikClient/Sources/Models/PropertyMappingPreview.swift b/authentikClient/Sources/Models/PropertyMappingPreview.swift new file mode 100644 index 0000000..928ebcc --- /dev/null +++ b/authentikClient/Sources/Models/PropertyMappingPreview.swift @@ -0,0 +1,17 @@ +// +// PropertyMappingPreview.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Preview how the current user is mapped via the property mappings selected in a provider +public struct PropertyMappingPreview: Codable { + public var preview: [String: AnyCodable] + + public init(preview: [String: AnyCodable]) { + self.preview = preview + } +} diff --git a/authentikClient/Sources/Models/PropertyMappingTestResult.swift b/authentikClient/Sources/Models/PropertyMappingTestResult.swift new file mode 100644 index 0000000..443c14a --- /dev/null +++ b/authentikClient/Sources/Models/PropertyMappingTestResult.swift @@ -0,0 +1,19 @@ +// +// PropertyMappingTestResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Result of a Property-mapping test +public struct PropertyMappingTestResult: Codable { + public var result: String + public var successful: Bool + + public init(result: String, successful: Bool) { + self.result = result + self.successful = successful + } +} diff --git a/authentikClient/Sources/Models/Provider.swift b/authentikClient/Sources/Models/Provider.swift new file mode 100644 index 0000000..72da05b --- /dev/null +++ b/authentikClient/Sources/Models/Provider.swift @@ -0,0 +1,101 @@ +// +// Provider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Provider Serializer +public struct Provider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + } +} diff --git a/authentikClient/Sources/Models/ProviderEnum.swift b/authentikClient/Sources/Models/ProviderEnum.swift new file mode 100644 index 0000000..f6f18ae --- /dev/null +++ b/authentikClient/Sources/Models/ProviderEnum.swift @@ -0,0 +1,15 @@ +// +// ProviderEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `twilio` - Twilio * `generic` - Generic +public enum ProviderEnum: String, Codable, CaseIterable { + case twilio = "twilio" + case generic = "generic" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ProviderModelEnum.swift b/authentikClient/Sources/Models/ProviderModelEnum.swift new file mode 100644 index 0000000..ebfd69f --- /dev/null +++ b/authentikClient/Sources/Models/ProviderModelEnum.swift @@ -0,0 +1,19 @@ +// +// ProviderModelEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `authentik_providers_ldap.ldapprovider` - authentik_providers_ldap.ldapprovider * `authentik_providers_oauth2.oauth2provider` - authentik_providers_oauth2.oauth2provider * `authentik_providers_proxy.proxyprovider` - authentik_providers_proxy.proxyprovider * `authentik_providers_radius.radiusprovider` - authentik_providers_radius.radiusprovider * `authentik_providers_saml.samlprovider` - authentik_providers_saml.samlprovider * `authentik_providers_scim.scimprovider` - authentik_providers_scim.scimprovider +public enum ProviderModelEnum: String, Codable, CaseIterable { + case ldapLdapprovider = "authentik_providers_ldap.ldapprovider" + case oauth2Oauth2provider = "authentik_providers_oauth2.oauth2provider" + case proxyProxyprovider = "authentik_providers_proxy.proxyprovider" + case radiusRadiusprovider = "authentik_providers_radius.radiusprovider" + case samlSamlprovider = "authentik_providers_saml.samlprovider" + case scimScimprovider = "authentik_providers_scim.scimprovider" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ProviderRequest.swift b/authentikClient/Sources/Models/ProviderRequest.swift new file mode 100644 index 0000000..cd07998 --- /dev/null +++ b/authentikClient/Sources/Models/ProviderRequest.swift @@ -0,0 +1,48 @@ +// +// ProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Provider Serializer +public struct ProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/ProviderTypeEnum.swift b/authentikClient/Sources/Models/ProviderTypeEnum.swift similarity index 78% rename from authentikClient/Classes/OpenAPIs/Models/ProviderTypeEnum.swift rename to authentikClient/Sources/Models/ProviderTypeEnum.swift index 537794f..14f978b 100644 --- a/authentikClient/Classes/OpenAPIs/Models/ProviderTypeEnum.swift +++ b/authentikClient/Sources/Models/ProviderTypeEnum.swift @@ -6,12 +6,9 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -/** * `apple` - Apple * `azuread` - Azure AD * `discord` - Discord * `facebook` - Facebook * `github` - GitHub * `google` - Google * `mailcow` - Mailcow * `openidconnect` - OpenID Connect * `okta` - Okta * `patreon` - Patreon * `reddit` - Reddit * `twitch` - Twitch * `twitter` - Twitter */ -public enum ProviderTypeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { +/// * `apple` - Apple * `azuread` - Azure AD * `discord` - Discord * `facebook` - Facebook * `github` - GitHub * `google` - Google * `mailcow` - Mailcow * `openidconnect` - OpenID Connect * `okta` - Okta * `patreon` - Patreon * `reddit` - Reddit * `twitch` - Twitch * `twitter` - Twitter +public enum ProviderTypeEnum: String, Codable, CaseIterable { case apple = "apple" case azuread = "azuread" case discord = "discord" diff --git a/authentikClient/Sources/Models/ProxyMode.swift b/authentikClient/Sources/Models/ProxyMode.swift new file mode 100644 index 0000000..9498fac --- /dev/null +++ b/authentikClient/Sources/Models/ProxyMode.swift @@ -0,0 +1,16 @@ +// +// ProxyMode.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain +public enum ProxyMode: String, Codable, CaseIterable { + case proxy = "proxy" + case forwardSingle = "forward_single" + case forwardDomain = "forward_domain" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ProxyOutpostConfig.swift b/authentikClient/Sources/Models/ProxyOutpostConfig.swift new file mode 100644 index 0000000..1ca54a2 --- /dev/null +++ b/authentikClient/Sources/Models/ProxyOutpostConfig.swift @@ -0,0 +1,141 @@ +// +// ProxyOutpostConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Proxy provider serializer for outposts +public struct ProxyOutpostConfig: Codable { + public var pk: Int + public var name: String + public var internalHost: String? + public var externalHost: String + /// Validate SSL Certificates of upstream servers + public var internalHostSslValidation: Bool? + public var clientId: String? + public var clientSecret: String? + public var oidcConfiguration: OpenIDConnectConfiguration + public var cookieSecret: String? + public var certificate: UUID? + /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + public var skipPathRegex: String? + /// Set a custom HTTP-Basic Authentication header based on values from authentik. + public var basicAuthEnabled: Bool? + /// User/Group Attribute used for the password part of the HTTP-Basic Header. + public var basicAuthPasswordAttribute: String? + /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. + public var basicAuthUserAttribute: String? + public var mode: ProxyMode? + public var cookieDomain: String? + /// Get token validity as second count + public var accessTokenValidity: Double? + /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + public var interceptHeaderAuth: Bool? + /// Get all the scope names the outpost should request, including custom-defined ones + public var scopesToRequest: [String] + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + + public init(pk: Int, name: String, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, clientId: String? = nil, clientSecret: String? = nil, oidcConfiguration: OpenIDConnectConfiguration, cookieSecret: String? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, cookieDomain: String? = nil, accessTokenValidity: Double?, interceptHeaderAuth: Bool? = nil, scopesToRequest: [String], assignedApplicationSlug: String, assignedApplicationName: String) { + self.pk = pk + self.name = name + self.internalHost = internalHost + self.externalHost = externalHost + self.internalHostSslValidation = internalHostSslValidation + self.clientId = clientId + self.clientSecret = clientSecret + self.oidcConfiguration = oidcConfiguration + self.cookieSecret = cookieSecret + self.certificate = certificate + self.skipPathRegex = skipPathRegex + self.basicAuthEnabled = basicAuthEnabled + self.basicAuthPasswordAttribute = basicAuthPasswordAttribute + self.basicAuthUserAttribute = basicAuthUserAttribute + self.mode = mode + self.cookieDomain = cookieDomain + self.accessTokenValidity = accessTokenValidity + self.interceptHeaderAuth = interceptHeaderAuth + self.scopesToRequest = scopesToRequest + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case internalHost = "internal_host" + case externalHost = "external_host" + case internalHostSslValidation = "internal_host_ssl_validation" + case clientId = "client_id" + case clientSecret = "client_secret" + case oidcConfiguration = "oidc_configuration" + case cookieSecret = "cookie_secret" + case certificate + case skipPathRegex = "skip_path_regex" + case basicAuthEnabled = "basic_auth_enabled" + case basicAuthPasswordAttribute = "basic_auth_password_attribute" + case basicAuthUserAttribute = "basic_auth_user_attribute" + case mode + case cookieDomain = "cookie_domain" + case accessTokenValidity = "access_token_validity" + case interceptHeaderAuth = "intercept_header_auth" + case scopesToRequest = "scopes_to_request" + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + internalHost = try container.decodeIfPresent(String.self, forKey: .internalHost) + externalHost = try container.decode(String.self, forKey: .externalHost) + internalHostSslValidation = try container.decodeIfPresent(Bool.self, forKey: .internalHostSslValidation) + clientId = try container.decodeIfPresent(String.self, forKey: .clientId) + clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) + oidcConfiguration = try container.decode(OpenIDConnectConfiguration.self, forKey: .oidcConfiguration) + cookieSecret = try container.decodeIfPresent(String.self, forKey: .cookieSecret) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + skipPathRegex = try container.decodeIfPresent(String.self, forKey: .skipPathRegex) + basicAuthEnabled = try container.decodeIfPresent(Bool.self, forKey: .basicAuthEnabled) + basicAuthPasswordAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthPasswordAttribute) + basicAuthUserAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthUserAttribute) + mode = try container.decodeIfPresent(ProxyMode.self, forKey: .mode) + cookieDomain = try container.decodeIfPresent(String.self, forKey: .cookieDomain) + accessTokenValidity = try container.decode(Double.self, forKey: .accessTokenValidity) + interceptHeaderAuth = try container.decodeIfPresent(Bool.self, forKey: .interceptHeaderAuth) + scopesToRequest = try container.decode([String].self, forKey: .scopesToRequest) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(internalHost, forKey: .internalHost) + try container.encode(externalHost, forKey: .externalHost) + try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) + try container.encodeIfPresent(clientId, forKey: .clientId) + try container.encodeIfPresent(clientSecret, forKey: .clientSecret) + try container.encode(oidcConfiguration, forKey: .oidcConfiguration) + try container.encodeIfPresent(cookieSecret, forKey: .cookieSecret) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) + try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) + try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) + try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) + try container.encode(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) + try container.encode(scopesToRequest, forKey: .scopesToRequest) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + } +} diff --git a/authentikClient/Sources/Models/ProxyProvider.swift b/authentikClient/Sources/Models/ProxyProvider.swift new file mode 100644 index 0000000..3f74417 --- /dev/null +++ b/authentikClient/Sources/Models/ProxyProvider.swift @@ -0,0 +1,194 @@ +// +// ProxyProvider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ProxyProvider Serializer +public struct ProxyProvider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var clientId: String + public var internalHost: String? + public var externalHost: String + /// Validate SSL Certificates of upstream servers + public var internalHostSslValidation: Bool? + public var certificate: UUID? + /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + public var skipPathRegex: String? + /// Set a custom HTTP-Basic Authentication header based on values from authentik. + public var basicAuthEnabled: Bool? + /// User/Group Attribute used for the password part of the HTTP-Basic Header. + public var basicAuthPasswordAttribute: String? + /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. + public var basicAuthUserAttribute: String? + public var mode: ProxyMode? + /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + public var interceptHeaderAuth: Bool? + public var redirectUris: String + public var cookieDomain: String? + public var jwksSources: [UUID]? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + public var outpostSet: [String] + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientId: String, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, redirectUris: String, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil, outpostSet: [String]) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.clientId = clientId + self.internalHost = internalHost + self.externalHost = externalHost + self.internalHostSslValidation = internalHostSslValidation + self.certificate = certificate + self.skipPathRegex = skipPathRegex + self.basicAuthEnabled = basicAuthEnabled + self.basicAuthPasswordAttribute = basicAuthPasswordAttribute + self.basicAuthUserAttribute = basicAuthUserAttribute + self.mode = mode + self.interceptHeaderAuth = interceptHeaderAuth + self.redirectUris = redirectUris + self.cookieDomain = cookieDomain + self.jwksSources = jwksSources + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + self.outpostSet = outpostSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case clientId = "client_id" + case internalHost = "internal_host" + case externalHost = "external_host" + case internalHostSslValidation = "internal_host_ssl_validation" + case certificate + case skipPathRegex = "skip_path_regex" + case basicAuthEnabled = "basic_auth_enabled" + case basicAuthPasswordAttribute = "basic_auth_password_attribute" + case basicAuthUserAttribute = "basic_auth_user_attribute" + case mode + case interceptHeaderAuth = "intercept_header_auth" + case redirectUris = "redirect_uris" + case cookieDomain = "cookie_domain" + case jwksSources = "jwks_sources" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + case outpostSet = "outpost_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + clientId = try container.decode(String.self, forKey: .clientId) + internalHost = try container.decodeIfPresent(String.self, forKey: .internalHost) + externalHost = try container.decode(String.self, forKey: .externalHost) + internalHostSslValidation = try container.decodeIfPresent(Bool.self, forKey: .internalHostSslValidation) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + skipPathRegex = try container.decodeIfPresent(String.self, forKey: .skipPathRegex) + basicAuthEnabled = try container.decodeIfPresent(Bool.self, forKey: .basicAuthEnabled) + basicAuthPasswordAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthPasswordAttribute) + basicAuthUserAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthUserAttribute) + mode = try container.decodeIfPresent(ProxyMode.self, forKey: .mode) + interceptHeaderAuth = try container.decodeIfPresent(Bool.self, forKey: .interceptHeaderAuth) + redirectUris = try container.decode(String.self, forKey: .redirectUris) + cookieDomain = try container.decodeIfPresent(String.self, forKey: .cookieDomain) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + outpostSet = try container.decode([String].self, forKey: .outpostSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(clientId, forKey: .clientId) + try container.encodeIfPresent(internalHost, forKey: .internalHost) + try container.encode(externalHost, forKey: .externalHost) + try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) + try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) + try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) + try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) + try container.encode(redirectUris, forKey: .redirectUris) + try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + try container.encode(outpostSet, forKey: .outpostSet) + } +} diff --git a/authentikClient/Sources/Models/ProxyProviderRequest.swift b/authentikClient/Sources/Models/ProxyProviderRequest.swift new file mode 100644 index 0000000..59172f2 --- /dev/null +++ b/authentikClient/Sources/Models/ProxyProviderRequest.swift @@ -0,0 +1,126 @@ +// +// ProxyProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ProxyProvider Serializer +public struct ProxyProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + public var internalHost: String? + public var externalHost: String + /// Validate SSL Certificates of upstream servers + public var internalHostSslValidation: Bool? + public var certificate: UUID? + /// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + public var skipPathRegex: String? + /// Set a custom HTTP-Basic Authentication header based on values from authentik. + public var basicAuthEnabled: Bool? + /// User/Group Attribute used for the password part of the HTTP-Basic Header. + public var basicAuthPasswordAttribute: String? + /// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. + public var basicAuthUserAttribute: String? + public var mode: ProxyMode? + /// When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + public var interceptHeaderAuth: Bool? + public var cookieDomain: String? + public var jwksSources: [UUID]? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var accessTokenValidity: String? + /// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var refreshTokenValidity: String? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, internalHost: String? = nil, externalHost: String, internalHostSslValidation: Bool? = nil, certificate: UUID? = nil, skipPathRegex: String? = nil, basicAuthEnabled: Bool? = nil, basicAuthPasswordAttribute: String? = nil, basicAuthUserAttribute: String? = nil, mode: ProxyMode? = nil, interceptHeaderAuth: Bool? = nil, cookieDomain: String? = nil, jwksSources: [UUID]? = nil, accessTokenValidity: String? = nil, refreshTokenValidity: String? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.internalHost = internalHost + self.externalHost = externalHost + self.internalHostSslValidation = internalHostSslValidation + self.certificate = certificate + self.skipPathRegex = skipPathRegex + self.basicAuthEnabled = basicAuthEnabled + self.basicAuthPasswordAttribute = basicAuthPasswordAttribute + self.basicAuthUserAttribute = basicAuthUserAttribute + self.mode = mode + self.interceptHeaderAuth = interceptHeaderAuth + self.cookieDomain = cookieDomain + self.jwksSources = jwksSources + self.accessTokenValidity = accessTokenValidity + self.refreshTokenValidity = refreshTokenValidity + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case internalHost = "internal_host" + case externalHost = "external_host" + case internalHostSslValidation = "internal_host_ssl_validation" + case certificate + case skipPathRegex = "skip_path_regex" + case basicAuthEnabled = "basic_auth_enabled" + case basicAuthPasswordAttribute = "basic_auth_password_attribute" + case basicAuthUserAttribute = "basic_auth_user_attribute" + case mode + case interceptHeaderAuth = "intercept_header_auth" + case cookieDomain = "cookie_domain" + case jwksSources = "jwks_sources" + case accessTokenValidity = "access_token_validity" + case refreshTokenValidity = "refresh_token_validity" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + internalHost = try container.decodeIfPresent(String.self, forKey: .internalHost) + externalHost = try container.decode(String.self, forKey: .externalHost) + internalHostSslValidation = try container.decodeIfPresent(Bool.self, forKey: .internalHostSslValidation) + certificate = try container.decodeIfPresent(UUID.self, forKey: .certificate) + skipPathRegex = try container.decodeIfPresent(String.self, forKey: .skipPathRegex) + basicAuthEnabled = try container.decodeIfPresent(Bool.self, forKey: .basicAuthEnabled) + basicAuthPasswordAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthPasswordAttribute) + basicAuthUserAttribute = try container.decodeIfPresent(String.self, forKey: .basicAuthUserAttribute) + mode = try container.decodeIfPresent(ProxyMode.self, forKey: .mode) + interceptHeaderAuth = try container.decodeIfPresent(Bool.self, forKey: .interceptHeaderAuth) + cookieDomain = try container.decodeIfPresent(String.self, forKey: .cookieDomain) + jwksSources = try container.decodeIfPresent([UUID].self, forKey: .jwksSources) + accessTokenValidity = try container.decodeIfPresent(String.self, forKey: .accessTokenValidity) + refreshTokenValidity = try container.decodeIfPresent(String.self, forKey: .refreshTokenValidity) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(internalHost, forKey: .internalHost) + try container.encode(externalHost, forKey: .externalHost) + try container.encodeIfPresent(internalHostSslValidation, forKey: .internalHostSslValidation) + try container.encodeIfPresent(certificate, forKey: .certificate) + try container.encodeIfPresent(skipPathRegex, forKey: .skipPathRegex) + try container.encodeIfPresent(basicAuthEnabled, forKey: .basicAuthEnabled) + try container.encodeIfPresent(basicAuthPasswordAttribute, forKey: .basicAuthPasswordAttribute) + try container.encodeIfPresent(basicAuthUserAttribute, forKey: .basicAuthUserAttribute) + try container.encodeIfPresent(mode, forKey: .mode) + try container.encodeIfPresent(interceptHeaderAuth, forKey: .interceptHeaderAuth) + try container.encodeIfPresent(cookieDomain, forKey: .cookieDomain) + try container.encodeIfPresent(jwksSources, forKey: .jwksSources) + try container.encodeIfPresent(accessTokenValidity, forKey: .accessTokenValidity) + try container.encodeIfPresent(refreshTokenValidity, forKey: .refreshTokenValidity) + } +} diff --git a/authentikClient/Sources/Models/RadiusOutpostConfig.swift b/authentikClient/Sources/Models/RadiusOutpostConfig.swift new file mode 100644 index 0000000..049214f --- /dev/null +++ b/authentikClient/Sources/Models/RadiusOutpostConfig.swift @@ -0,0 +1,64 @@ +// +// RadiusOutpostConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// RadiusProvider Serializer +public struct RadiusOutpostConfig: Codable { + public var pk: Int + public var name: String + public var applicationSlug: String + public var authFlowSlug: String + /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. + public var clientNetworks: String? + /// Shared secret between clients and server to hash packets. + public var sharedSecret: String? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(pk: Int, name: String, applicationSlug: String, authFlowSlug: String, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { + self.pk = pk + self.name = name + self.applicationSlug = applicationSlug + self.authFlowSlug = authFlowSlug + self.clientNetworks = clientNetworks + self.sharedSecret = sharedSecret + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case applicationSlug = "application_slug" + case authFlowSlug = "auth_flow_slug" + case clientNetworks = "client_networks" + case sharedSecret = "shared_secret" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + applicationSlug = try container.decode(String.self, forKey: .applicationSlug) + authFlowSlug = try container.decode(String.self, forKey: .authFlowSlug) + clientNetworks = try container.decodeIfPresent(String.self, forKey: .clientNetworks) + sharedSecret = try container.decodeIfPresent(String.self, forKey: .sharedSecret) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(applicationSlug, forKey: .applicationSlug) + try container.encode(authFlowSlug, forKey: .authFlowSlug) + try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) + try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/RadiusProvider.swift b/authentikClient/Sources/Models/RadiusProvider.swift new file mode 100644 index 0000000..e4766aa --- /dev/null +++ b/authentikClient/Sources/Models/RadiusProvider.swift @@ -0,0 +1,124 @@ +// +// RadiusProvider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// RadiusProvider Serializer +public struct RadiusProvider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. + public var clientNetworks: String? + /// Shared secret between clients and server to hash packets. + public var sharedSecret: String? + public var outpostSet: [String] + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, clientNetworks: String? = nil, sharedSecret: String? = nil, outpostSet: [String], mfaSupport: Bool? = nil) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.clientNetworks = clientNetworks + self.sharedSecret = sharedSecret + self.outpostSet = outpostSet + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case clientNetworks = "client_networks" + case sharedSecret = "shared_secret" + case outpostSet = "outpost_set" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + clientNetworks = try container.decodeIfPresent(String.self, forKey: .clientNetworks) + sharedSecret = try container.decodeIfPresent(String.self, forKey: .sharedSecret) + outpostSet = try container.decode([String].self, forKey: .outpostSet) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) + try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) + try container.encode(outpostSet, forKey: .outpostSet) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/RadiusProviderRequest.swift b/authentikClient/Sources/Models/RadiusProviderRequest.swift new file mode 100644 index 0000000..99ce5f2 --- /dev/null +++ b/authentikClient/Sources/Models/RadiusProviderRequest.swift @@ -0,0 +1,66 @@ +// +// RadiusProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// RadiusProvider Serializer +public struct RadiusProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. + public var clientNetworks: String? + /// Shared secret between clients and server to hash packets. + public var sharedSecret: String? + /// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. + public var mfaSupport: Bool? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, clientNetworks: String? = nil, sharedSecret: String? = nil, mfaSupport: Bool? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.clientNetworks = clientNetworks + self.sharedSecret = sharedSecret + self.mfaSupport = mfaSupport + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case clientNetworks = "client_networks" + case sharedSecret = "shared_secret" + case mfaSupport = "mfa_support" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + clientNetworks = try container.decodeIfPresent(String.self, forKey: .clientNetworks) + sharedSecret = try container.decodeIfPresent(String.self, forKey: .sharedSecret) + mfaSupport = try container.decodeIfPresent(Bool.self, forKey: .mfaSupport) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(clientNetworks, forKey: .clientNetworks) + try container.encodeIfPresent(sharedSecret, forKey: .sharedSecret) + try container.encodeIfPresent(mfaSupport, forKey: .mfaSupport) + } +} diff --git a/authentikClient/Sources/Models/RedirectChallenge.swift b/authentikClient/Sources/Models/RedirectChallenge.swift new file mode 100644 index 0000000..8d5b873 --- /dev/null +++ b/authentikClient/Sources/Models/RedirectChallenge.swift @@ -0,0 +1,51 @@ +// +// RedirectChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Challenge type to redirect the client +public struct RedirectChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "xak-flow-redirect" + public var responseErrors: [String: [ErrorDetail]]? + public var to: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "xak-flow-redirect", responseErrors: [String: [ErrorDetail]]? = nil, to: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.to = to + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case to + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + to = try container.decode(String.self, forKey: .to) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(to, forKey: .to) + } +} diff --git a/authentikClient/Sources/Models/Reputation.swift b/authentikClient/Sources/Models/Reputation.swift new file mode 100644 index 0000000..23c7068 --- /dev/null +++ b/authentikClient/Sources/Models/Reputation.swift @@ -0,0 +1,56 @@ +// +// Reputation.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Reputation Serializer +public struct Reputation: Codable { + public var pk: UUID? + public var identifier: String + public var ip: String + public var ipGeoData: [String: AnyCodable]? + public var score: Int64? + public var updated: Date + + public init(pk: UUID? = nil, identifier: String, ip: String, ipGeoData: [String: AnyCodable]? = nil, score: Int64? = nil, updated: Date) { + self.pk = pk + self.identifier = identifier + self.ip = ip + self.ipGeoData = ipGeoData + self.score = score + self.updated = updated + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case identifier + case ip + case ipGeoData = "ip_geo_data" + case score + case updated + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decodeIfPresent(UUID.self, forKey: .pk) + identifier = try container.decode(String.self, forKey: .identifier) + ip = try container.decode(String.self, forKey: .ip) + ipGeoData = try container.decodeIfPresent([String: AnyCodable].self, forKey: .ipGeoData) + score = try container.decodeIfPresent(Int64.self, forKey: .score) + updated = try container.decode(Date.self, forKey: .updated) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(pk, forKey: .pk) + try container.encode(identifier, forKey: .identifier) + try container.encode(ip, forKey: .ip) + try container.encodeIfPresent(ipGeoData, forKey: .ipGeoData) + try container.encodeIfPresent(score, forKey: .score) + try container.encode(updated, forKey: .updated) + } +} diff --git a/authentikClient/Sources/Models/ReputationPolicy.swift b/authentikClient/Sources/Models/ReputationPolicy.swift new file mode 100644 index 0000000..b873c7c --- /dev/null +++ b/authentikClient/Sources/Models/ReputationPolicy.swift @@ -0,0 +1,87 @@ +// +// ReputationPolicy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Reputation Policy Serializer +public struct ReputationPolicy: Codable { + public var pk: UUID + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Return objects policy is bound to + public var boundTo: Int + public var checkIp: Bool? + public var checkUsername: Bool? + public var threshold: Int? + + public init(pk: UUID, name: String, executionLogging: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, boundTo: Int, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { + self.pk = pk + self.name = name + self.executionLogging = executionLogging + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.boundTo = boundTo + self.checkIp = checkIp + self.checkUsername = checkUsername + self.threshold = threshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case executionLogging = "execution_logging" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case boundTo = "bound_to" + case checkIp = "check_ip" + case checkUsername = "check_username" + case threshold + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + boundTo = try container.decode(Int.self, forKey: .boundTo) + checkIp = try container.decodeIfPresent(Bool.self, forKey: .checkIp) + checkUsername = try container.decodeIfPresent(Bool.self, forKey: .checkUsername) + threshold = try container.decodeIfPresent(Int.self, forKey: .threshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(boundTo, forKey: .boundTo) + try container.encodeIfPresent(checkIp, forKey: .checkIp) + try container.encodeIfPresent(checkUsername, forKey: .checkUsername) + try container.encodeIfPresent(threshold, forKey: .threshold) + } +} diff --git a/authentikClient/Sources/Models/ReputationPolicyRequest.swift b/authentikClient/Sources/Models/ReputationPolicyRequest.swift new file mode 100644 index 0000000..b263032 --- /dev/null +++ b/authentikClient/Sources/Models/ReputationPolicyRequest.swift @@ -0,0 +1,52 @@ +// +// ReputationPolicyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Reputation Policy Serializer +public struct ReputationPolicyRequest: Codable { + public var name: String + /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + public var executionLogging: Bool? + public var checkIp: Bool? + public var checkUsername: Bool? + public var threshold: Int? + + public init(name: String, executionLogging: Bool? = nil, checkIp: Bool? = nil, checkUsername: Bool? = nil, threshold: Int? = nil) { + self.name = name + self.executionLogging = executionLogging + self.checkIp = checkIp + self.checkUsername = checkUsername + self.threshold = threshold + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case executionLogging = "execution_logging" + case checkIp = "check_ip" + case checkUsername = "check_username" + case threshold + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + executionLogging = try container.decodeIfPresent(Bool.self, forKey: .executionLogging) + checkIp = try container.decodeIfPresent(Bool.self, forKey: .checkIp) + checkUsername = try container.decodeIfPresent(Bool.self, forKey: .checkUsername) + threshold = try container.decodeIfPresent(Int.self, forKey: .threshold) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(executionLogging, forKey: .executionLogging) + try container.encodeIfPresent(checkIp, forKey: .checkIp) + try container.encodeIfPresent(checkUsername, forKey: .checkUsername) + try container.encodeIfPresent(threshold, forKey: .threshold) + } +} diff --git a/authentikClient/Sources/Models/ResidentKeyRequirementEnum.swift b/authentikClient/Sources/Models/ResidentKeyRequirementEnum.swift new file mode 100644 index 0000000..c65cfe4 --- /dev/null +++ b/authentikClient/Sources/Models/ResidentKeyRequirementEnum.swift @@ -0,0 +1,16 @@ +// +// ResidentKeyRequirementEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required +public enum ResidentKeyRequirementEnum: String, Codable, CaseIterable { + case discouraged = "discouraged" + case preferred = "preferred" + case _required = "required" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Role.swift b/authentikClient/Sources/Models/Role.swift new file mode 100644 index 0000000..709a154 --- /dev/null +++ b/authentikClient/Sources/Models/Role.swift @@ -0,0 +1,19 @@ +// +// Role.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Role serializer +public struct Role: Codable { + public var pk: UUID + public var name: String + + public init(pk: UUID, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/RoleAssignedObjectPermission.swift b/authentikClient/Sources/Models/RoleAssignedObjectPermission.swift new file mode 100644 index 0000000..93839d5 --- /dev/null +++ b/authentikClient/Sources/Models/RoleAssignedObjectPermission.swift @@ -0,0 +1,41 @@ +// +// RoleAssignedObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Roles assigned object permission serializer +public struct RoleAssignedObjectPermission: Codable { + public var rolePk: String + public var name: String + public var permissions: [RoleObjectPermission] + + public init(rolePk: String, name: String, permissions: [RoleObjectPermission]) { + self.rolePk = rolePk + self.name = name + self.permissions = permissions + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case rolePk = "role_pk" + case name + case permissions + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + rolePk = try container.decode(String.self, forKey: .rolePk) + name = try container.decode(String.self, forKey: .name) + permissions = try container.decode([RoleObjectPermission].self, forKey: .permissions) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(rolePk, forKey: .rolePk) + try container.encode(name, forKey: .name) + try container.encode(permissions, forKey: .permissions) + } +} diff --git a/authentikClient/Sources/Models/RoleObjectPermission.swift b/authentikClient/Sources/Models/RoleObjectPermission.swift new file mode 100644 index 0000000..9ab38d7 --- /dev/null +++ b/authentikClient/Sources/Models/RoleObjectPermission.swift @@ -0,0 +1,56 @@ +// +// RoleObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Role-bound object level permission +public struct RoleObjectPermission: Codable { + public var id: Int + public var codename: String + public var model: String + public var appLabel: String + public var objectPk: String + public var name: String + + public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String) { + self.id = id + self.codename = codename + self.model = model + self.appLabel = appLabel + self.objectPk = objectPk + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case codename + case model + case appLabel = "app_label" + case objectPk = "object_pk" + case name + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + id = try container.decode(Int.self, forKey: .id) + codename = try container.decode(String.self, forKey: .codename) + model = try container.decode(String.self, forKey: .model) + appLabel = try container.decode(String.self, forKey: .appLabel) + objectPk = try container.decode(String.self, forKey: .objectPk) + name = try container.decode(String.self, forKey: .name) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(codename, forKey: .codename) + try container.encode(model, forKey: .model) + try container.encode(appLabel, forKey: .appLabel) + try container.encode(objectPk, forKey: .objectPk) + try container.encode(name, forKey: .name) + } +} diff --git a/authentikClient/Sources/Models/RoleRequest.swift b/authentikClient/Sources/Models/RoleRequest.swift new file mode 100644 index 0000000..4b45110 --- /dev/null +++ b/authentikClient/Sources/Models/RoleRequest.swift @@ -0,0 +1,17 @@ +// +// RoleRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Role serializer +public struct RoleRequest: Codable { + public var name: String + + public init(name: String) { + self.name = name + } +} diff --git a/authentikClient/Sources/Models/SAMLMetadata.swift b/authentikClient/Sources/Models/SAMLMetadata.swift new file mode 100644 index 0000000..260ab47 --- /dev/null +++ b/authentikClient/Sources/Models/SAMLMetadata.swift @@ -0,0 +1,36 @@ +// +// SAMLMetadata.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAML Provider Metadata serializer +public struct SAMLMetadata: Codable { + public var metadata: String + public var downloadUrl: String + + public init(metadata: String, downloadUrl: String) { + self.metadata = metadata + self.downloadUrl = downloadUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case metadata + case downloadUrl = "download_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + metadata = try container.decode(String.self, forKey: .metadata) + downloadUrl = try container.decode(String.self, forKey: .downloadUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(metadata, forKey: .metadata) + try container.encode(downloadUrl, forKey: .downloadUrl) + } +} diff --git a/authentikClient/Sources/Models/SAMLPropertyMapping.swift b/authentikClient/Sources/Models/SAMLPropertyMapping.swift new file mode 100644 index 0000000..94fbf5b --- /dev/null +++ b/authentikClient/Sources/Models/SAMLPropertyMapping.swift @@ -0,0 +1,81 @@ +// +// SAMLPropertyMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLPropertyMapping Serializer +public struct SAMLPropertyMapping: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Get object's component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var samlName: String + public var friendlyName: String? + + public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, samlName: String, friendlyName: String? = nil) { + self.pk = pk + self.managed = managed + self.name = name + self.expression = expression + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.samlName = samlName + self.friendlyName = friendlyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case name + case expression + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case samlName = "saml_name" + case friendlyName = "friendly_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + samlName = try container.decode(String.self, forKey: .samlName) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(samlName, forKey: .samlName) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + } +} diff --git a/authentikClient/Sources/Models/SAMLPropertyMappingRequest.swift b/authentikClient/Sources/Models/SAMLPropertyMappingRequest.swift new file mode 100644 index 0000000..c2f1fac --- /dev/null +++ b/authentikClient/Sources/Models/SAMLPropertyMappingRequest.swift @@ -0,0 +1,52 @@ +// +// SAMLPropertyMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLPropertyMapping Serializer +public struct SAMLPropertyMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + public var samlName: String + public var friendlyName: String? + + public init(managed: String? = nil, name: String, expression: String, samlName: String, friendlyName: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + self.samlName = samlName + self.friendlyName = friendlyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case samlName = "saml_name" + case friendlyName = "friendly_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + samlName = try container.decode(String.self, forKey: .samlName) + friendlyName = try container.decodeIfPresent(String.self, forKey: .friendlyName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(samlName, forKey: .samlName) + try container.encodeIfPresent(friendlyName, forKey: .friendlyName) + } +} diff --git a/authentikClient/Sources/Models/SAMLProvider.swift b/authentikClient/Sources/Models/SAMLProvider.swift new file mode 100644 index 0000000..1ec424c --- /dev/null +++ b/authentikClient/Sources/Models/SAMLProvider.swift @@ -0,0 +1,211 @@ +// +// SAMLProvider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLProvider Serializer +public struct SAMLProvider: Codable { + public var pk: Int + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedApplicationSlug: String + /// Application's display Name. + public var assignedApplicationName: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var acsUrl: String + /// Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + public var audience: String? + /// Also known as EntityID + public var issuer: String? + /// Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + public var assertionValidNotBefore: String? + /// Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var assertionValidNotOnOrAfter: String? + /// Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var sessionValidNotOnOrAfter: String? + /// Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + public var nameIdMapping: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Keypair used to sign outgoing Responses going to the Service Provider. + public var signingKp: UUID? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + public var spBinding: SpBindingEnum? + /// Default relay_state value for IDP-initiated logins + public var defaultRelayState: String? + /// Get metadata download URL + public var urlDownloadMetadata: String + /// Get SSO Post URL + public var urlSsoPost: String + /// Get SSO Redirect URL + public var urlSsoRedirect: String + /// Get SSO IDP-Initiated URL + public var urlSsoInit: String + /// Get SLO POST URL + public var urlSloPost: String + /// Get SLO redirect URL + public var urlSloRedirect: String + + public init(pk: Int, name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, component: String, assignedApplicationSlug: String, assignedApplicationName: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, acsUrl: String, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil, urlDownloadMetadata: String, urlSsoPost: String, urlSsoRedirect: String, urlSsoInit: String, urlSloPost: String, urlSloRedirect: String) { + self.pk = pk + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.component = component + self.assignedApplicationSlug = assignedApplicationSlug + self.assignedApplicationName = assignedApplicationName + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.acsUrl = acsUrl + self.audience = audience + self.issuer = issuer + self.assertionValidNotBefore = assertionValidNotBefore + self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter + self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter + self.nameIdMapping = nameIdMapping + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.signingKp = signingKp + self.verificationKp = verificationKp + self.spBinding = spBinding + self.defaultRelayState = defaultRelayState + self.urlDownloadMetadata = urlDownloadMetadata + self.urlSsoPost = urlSsoPost + self.urlSsoRedirect = urlSsoRedirect + self.urlSsoInit = urlSsoInit + self.urlSloPost = urlSloPost + self.urlSloRedirect = urlSloRedirect + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case component + case assignedApplicationSlug = "assigned_application_slug" + case assignedApplicationName = "assigned_application_name" + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case acsUrl = "acs_url" + case audience + case issuer + case assertionValidNotBefore = "assertion_valid_not_before" + case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" + case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" + case nameIdMapping = "name_id_mapping" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case signingKp = "signing_kp" + case verificationKp = "verification_kp" + case spBinding = "sp_binding" + case defaultRelayState = "default_relay_state" + case urlDownloadMetadata = "url_download_metadata" + case urlSsoPost = "url_sso_post" + case urlSsoRedirect = "url_sso_redirect" + case urlSsoInit = "url_sso_init" + case urlSloPost = "url_slo_post" + case urlSloRedirect = "url_slo_redirect" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + component = try container.decode(String.self, forKey: .component) + assignedApplicationSlug = try container.decode(String.self, forKey: .assignedApplicationSlug) + assignedApplicationName = try container.decode(String.self, forKey: .assignedApplicationName) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + acsUrl = try container.decode(String.self, forKey: .acsUrl) + audience = try container.decodeIfPresent(String.self, forKey: .audience) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + assertionValidNotBefore = try container.decodeIfPresent(String.self, forKey: .assertionValidNotBefore) + assertionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .assertionValidNotOnOrAfter) + sessionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .sessionValidNotOnOrAfter) + nameIdMapping = try container.decodeIfPresent(UUID.self, forKey: .nameIdMapping) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + spBinding = try container.decodeIfPresent(SpBindingEnum.self, forKey: .spBinding) + defaultRelayState = try container.decodeIfPresent(String.self, forKey: .defaultRelayState) + urlDownloadMetadata = try container.decode(String.self, forKey: .urlDownloadMetadata) + urlSsoPost = try container.decode(String.self, forKey: .urlSsoPost) + urlSsoRedirect = try container.decode(String.self, forKey: .urlSsoRedirect) + urlSsoInit = try container.decode(String.self, forKey: .urlSsoInit) + urlSloPost = try container.decode(String.self, forKey: .urlSloPost) + urlSloRedirect = try container.decode(String.self, forKey: .urlSloRedirect) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(component, forKey: .component) + try container.encode(assignedApplicationSlug, forKey: .assignedApplicationSlug) + try container.encode(assignedApplicationName, forKey: .assignedApplicationName) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(acsUrl, forKey: .acsUrl) + try container.encodeIfPresent(audience, forKey: .audience) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) + try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) + try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) + try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(spBinding, forKey: .spBinding) + try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) + try container.encode(urlDownloadMetadata, forKey: .urlDownloadMetadata) + try container.encode(urlSsoPost, forKey: .urlSsoPost) + try container.encode(urlSsoRedirect, forKey: .urlSsoRedirect) + try container.encode(urlSsoInit, forKey: .urlSsoInit) + try container.encode(urlSloPost, forKey: .urlSloPost) + try container.encode(urlSloRedirect, forKey: .urlSloRedirect) + } +} diff --git a/authentikClient/Sources/Models/SAMLProviderRequest.swift b/authentikClient/Sources/Models/SAMLProviderRequest.swift new file mode 100644 index 0000000..a18d8a3 --- /dev/null +++ b/authentikClient/Sources/Models/SAMLProviderRequest.swift @@ -0,0 +1,122 @@ +// +// SAMLProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLProvider Serializer +public struct SAMLProviderRequest: Codable { + public var name: String + /// Flow used for authentication when the associated application is accessed by an un-authenticated user. + public var authenticationFlow: UUID? + /// Flow used when authorizing this provider. + public var authorizationFlow: UUID + public var propertyMappings: [UUID]? + public var acsUrl: String + /// Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + public var audience: String? + /// Also known as EntityID + public var issuer: String? + /// Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + public var assertionValidNotBefore: String? + /// Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var assertionValidNotOnOrAfter: String? + /// Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + public var sessionValidNotOnOrAfter: String? + /// Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + public var nameIdMapping: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Keypair used to sign outgoing Responses going to the Service Provider. + public var signingKp: UUID? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + public var spBinding: SpBindingEnum? + /// Default relay_state value for IDP-initiated logins + public var defaultRelayState: String? + + public init(name: String, authenticationFlow: UUID? = nil, authorizationFlow: UUID, propertyMappings: [UUID]? = nil, acsUrl: String, audience: String? = nil, issuer: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, sessionValidNotOnOrAfter: String? = nil, nameIdMapping: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, signingKp: UUID? = nil, verificationKp: UUID? = nil, spBinding: SpBindingEnum? = nil, defaultRelayState: String? = nil) { + self.name = name + self.authenticationFlow = authenticationFlow + self.authorizationFlow = authorizationFlow + self.propertyMappings = propertyMappings + self.acsUrl = acsUrl + self.audience = audience + self.issuer = issuer + self.assertionValidNotBefore = assertionValidNotBefore + self.assertionValidNotOnOrAfter = assertionValidNotOnOrAfter + self.sessionValidNotOnOrAfter = sessionValidNotOnOrAfter + self.nameIdMapping = nameIdMapping + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.signingKp = signingKp + self.verificationKp = verificationKp + self.spBinding = spBinding + self.defaultRelayState = defaultRelayState + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case authenticationFlow = "authentication_flow" + case authorizationFlow = "authorization_flow" + case propertyMappings = "property_mappings" + case acsUrl = "acs_url" + case audience + case issuer + case assertionValidNotBefore = "assertion_valid_not_before" + case assertionValidNotOnOrAfter = "assertion_valid_not_on_or_after" + case sessionValidNotOnOrAfter = "session_valid_not_on_or_after" + case nameIdMapping = "name_id_mapping" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case signingKp = "signing_kp" + case verificationKp = "verification_kp" + case spBinding = "sp_binding" + case defaultRelayState = "default_relay_state" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + authorizationFlow = try container.decode(UUID.self, forKey: .authorizationFlow) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + acsUrl = try container.decode(String.self, forKey: .acsUrl) + audience = try container.decodeIfPresent(String.self, forKey: .audience) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + assertionValidNotBefore = try container.decodeIfPresent(String.self, forKey: .assertionValidNotBefore) + assertionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .assertionValidNotOnOrAfter) + sessionValidNotOnOrAfter = try container.decodeIfPresent(String.self, forKey: .sessionValidNotOnOrAfter) + nameIdMapping = try container.decodeIfPresent(UUID.self, forKey: .nameIdMapping) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + spBinding = try container.decodeIfPresent(SpBindingEnum.self, forKey: .spBinding) + defaultRelayState = try container.decodeIfPresent(String.self, forKey: .defaultRelayState) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encode(authorizationFlow, forKey: .authorizationFlow) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encode(acsUrl, forKey: .acsUrl) + try container.encodeIfPresent(audience, forKey: .audience) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encodeIfPresent(assertionValidNotBefore, forKey: .assertionValidNotBefore) + try container.encodeIfPresent(assertionValidNotOnOrAfter, forKey: .assertionValidNotOnOrAfter) + try container.encodeIfPresent(sessionValidNotOnOrAfter, forKey: .sessionValidNotOnOrAfter) + try container.encodeIfPresent(nameIdMapping, forKey: .nameIdMapping) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(spBinding, forKey: .spBinding) + try container.encodeIfPresent(defaultRelayState, forKey: .defaultRelayState) + } +} diff --git a/authentikClient/Sources/Models/SAMLSource.swift b/authentikClient/Sources/Models/SAMLSource.swift new file mode 100644 index 0000000..1eb8bd6 --- /dev/null +++ b/authentikClient/Sources/Models/SAMLSource.swift @@ -0,0 +1,179 @@ +// +// SAMLSource.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLSource Serializer +public struct SAMLSource: Codable { + public var pk: UUID + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var userPathTemplate: String? + /// Get the URL to the Icon. If the name is /static or starts with http it is returned as-is + public var icon: String? + /// Flow used before authentication. + public var preAuthenticationFlow: UUID + /// Also known as Entity ID. Defaults the Metadata URL. + public var issuer: String? + /// URL that the initial Login request is sent to. + public var ssoUrl: String + /// Optional URL if your IDP supports Single-Logout. + public var sloUrl: String? + /// Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + public var allowIdpInitiated: Bool? + public var nameIdPolicy: NameIdPolicyEnum? + public var bindingType: BindingTypeEnum? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + /// Keypair used to sign outgoing Responses going to the Identity Provider. + public var signingKp: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). + public var temporaryUserDeleteAfter: String? + + public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?, preAuthenticationFlow: UUID, issuer: String? = nil, ssoUrl: String, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { + self.pk = pk + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.managed = managed + self.userPathTemplate = userPathTemplate + self.icon = icon + self.preAuthenticationFlow = preAuthenticationFlow + self.issuer = issuer + self.ssoUrl = ssoUrl + self.sloUrl = sloUrl + self.allowIdpInitiated = allowIdpInitiated + self.nameIdPolicy = nameIdPolicy + self.bindingType = bindingType + self.verificationKp = verificationKp + self.signingKp = signingKp + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.temporaryUserDeleteAfter = temporaryUserDeleteAfter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case managed + case userPathTemplate = "user_path_template" + case icon + case preAuthenticationFlow = "pre_authentication_flow" + case issuer + case ssoUrl = "sso_url" + case sloUrl = "slo_url" + case allowIdpInitiated = "allow_idp_initiated" + case nameIdPolicy = "name_id_policy" + case bindingType = "binding_type" + case verificationKp = "verification_kp" + case signingKp = "signing_kp" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case temporaryUserDeleteAfter = "temporary_user_delete_after" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + managed = try container.decode(String.self, forKey: .managed) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + icon = try container.decode(String.self, forKey: .icon) + preAuthenticationFlow = try container.decode(UUID.self, forKey: .preAuthenticationFlow) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + ssoUrl = try container.decode(String.self, forKey: .ssoUrl) + sloUrl = try container.decodeIfPresent(String.self, forKey: .sloUrl) + allowIdpInitiated = try container.decodeIfPresent(Bool.self, forKey: .allowIdpInitiated) + nameIdPolicy = try container.decodeIfPresent(NameIdPolicyEnum.self, forKey: .nameIdPolicy) + bindingType = try container.decodeIfPresent(BindingTypeEnum.self, forKey: .bindingType) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + temporaryUserDeleteAfter = try container.decodeIfPresent(String.self, forKey: .temporaryUserDeleteAfter) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encode(managed, forKey: .managed) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(icon, forKey: .icon) + try container.encode(preAuthenticationFlow, forKey: .preAuthenticationFlow) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encode(ssoUrl, forKey: .ssoUrl) + try container.encodeIfPresent(sloUrl, forKey: .sloUrl) + try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) + try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) + try container.encodeIfPresent(bindingType, forKey: .bindingType) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) + } +} diff --git a/authentikClient/Sources/Models/SAMLSourceRequest.swift b/authentikClient/Sources/Models/SAMLSourceRequest.swift new file mode 100644 index 0000000..bd0e3dd --- /dev/null +++ b/authentikClient/Sources/Models/SAMLSourceRequest.swift @@ -0,0 +1,138 @@ +// +// SAMLSourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAMLSource Serializer +public struct SAMLSourceRequest: Codable { + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + /// Flow used before authentication. + public var preAuthenticationFlow: UUID + /// Also known as Entity ID. Defaults the Metadata URL. + public var issuer: String? + /// URL that the initial Login request is sent to. + public var ssoUrl: String + /// Optional URL if your IDP supports Single-Logout. + public var sloUrl: String? + /// Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + public var allowIdpInitiated: Bool? + public var nameIdPolicy: NameIdPolicyEnum? + public var bindingType: BindingTypeEnum? + /// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + public var verificationKp: UUID? + /// Keypair used to sign outgoing Responses going to the Identity Provider. + public var signingKp: UUID? + public var digestAlgorithm: DigestAlgorithmEnum? + public var signatureAlgorithm: SignatureAlgorithmEnum? + /// Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). + public var temporaryUserDeleteAfter: String? + + public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil, preAuthenticationFlow: UUID, issuer: String? = nil, ssoUrl: String, sloUrl: String? = nil, allowIdpInitiated: Bool? = nil, nameIdPolicy: NameIdPolicyEnum? = nil, bindingType: BindingTypeEnum? = nil, verificationKp: UUID? = nil, signingKp: UUID? = nil, digestAlgorithm: DigestAlgorithmEnum? = nil, signatureAlgorithm: SignatureAlgorithmEnum? = nil, temporaryUserDeleteAfter: String? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + self.preAuthenticationFlow = preAuthenticationFlow + self.issuer = issuer + self.ssoUrl = ssoUrl + self.sloUrl = sloUrl + self.allowIdpInitiated = allowIdpInitiated + self.nameIdPolicy = nameIdPolicy + self.bindingType = bindingType + self.verificationKp = verificationKp + self.signingKp = signingKp + self.digestAlgorithm = digestAlgorithm + self.signatureAlgorithm = signatureAlgorithm + self.temporaryUserDeleteAfter = temporaryUserDeleteAfter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + case preAuthenticationFlow = "pre_authentication_flow" + case issuer + case ssoUrl = "sso_url" + case sloUrl = "slo_url" + case allowIdpInitiated = "allow_idp_initiated" + case nameIdPolicy = "name_id_policy" + case bindingType = "binding_type" + case verificationKp = "verification_kp" + case signingKp = "signing_kp" + case digestAlgorithm = "digest_algorithm" + case signatureAlgorithm = "signature_algorithm" + case temporaryUserDeleteAfter = "temporary_user_delete_after" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + preAuthenticationFlow = try container.decode(UUID.self, forKey: .preAuthenticationFlow) + issuer = try container.decodeIfPresent(String.self, forKey: .issuer) + ssoUrl = try container.decode(String.self, forKey: .ssoUrl) + sloUrl = try container.decodeIfPresent(String.self, forKey: .sloUrl) + allowIdpInitiated = try container.decodeIfPresent(Bool.self, forKey: .allowIdpInitiated) + nameIdPolicy = try container.decodeIfPresent(NameIdPolicyEnum.self, forKey: .nameIdPolicy) + bindingType = try container.decodeIfPresent(BindingTypeEnum.self, forKey: .bindingType) + verificationKp = try container.decodeIfPresent(UUID.self, forKey: .verificationKp) + signingKp = try container.decodeIfPresent(UUID.self, forKey: .signingKp) + digestAlgorithm = try container.decodeIfPresent(DigestAlgorithmEnum.self, forKey: .digestAlgorithm) + signatureAlgorithm = try container.decodeIfPresent(SignatureAlgorithmEnum.self, forKey: .signatureAlgorithm) + temporaryUserDeleteAfter = try container.decodeIfPresent(String.self, forKey: .temporaryUserDeleteAfter) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(preAuthenticationFlow, forKey: .preAuthenticationFlow) + try container.encodeIfPresent(issuer, forKey: .issuer) + try container.encode(ssoUrl, forKey: .ssoUrl) + try container.encodeIfPresent(sloUrl, forKey: .sloUrl) + try container.encodeIfPresent(allowIdpInitiated, forKey: .allowIdpInitiated) + try container.encodeIfPresent(nameIdPolicy, forKey: .nameIdPolicy) + try container.encodeIfPresent(bindingType, forKey: .bindingType) + try container.encodeIfPresent(verificationKp, forKey: .verificationKp) + try container.encodeIfPresent(signingKp, forKey: .signingKp) + try container.encodeIfPresent(digestAlgorithm, forKey: .digestAlgorithm) + try container.encodeIfPresent(signatureAlgorithm, forKey: .signatureAlgorithm) + try container.encodeIfPresent(temporaryUserDeleteAfter, forKey: .temporaryUserDeleteAfter) + } +} diff --git a/authentikClient/Sources/Models/SCIMMapping.swift b/authentikClient/Sources/Models/SCIMMapping.swift new file mode 100644 index 0000000..e41331e --- /dev/null +++ b/authentikClient/Sources/Models/SCIMMapping.swift @@ -0,0 +1,71 @@ +// +// SCIMMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMMapping Serializer +public struct SCIMMapping: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Get object's component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + + public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { + self.pk = pk + self.managed = managed + self.name = name + self.expression = expression + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case name + case expression + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + } +} diff --git a/authentikClient/Sources/Models/SCIMMappingRequest.swift b/authentikClient/Sources/Models/SCIMMappingRequest.swift new file mode 100644 index 0000000..49c6e75 --- /dev/null +++ b/authentikClient/Sources/Models/SCIMMappingRequest.swift @@ -0,0 +1,22 @@ +// +// SCIMMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMMapping Serializer +public struct SCIMMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + + public init(managed: String? = nil, name: String, expression: String) { + self.managed = managed + self.name = name + self.expression = expression + } +} diff --git a/authentikClient/Sources/Models/SCIMProvider.swift b/authentikClient/Sources/Models/SCIMProvider.swift new file mode 100644 index 0000000..8653d87 --- /dev/null +++ b/authentikClient/Sources/Models/SCIMProvider.swift @@ -0,0 +1,105 @@ +// +// SCIMProvider.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMProvider Serializer +public struct SCIMProvider: Codable { + public var pk: Int + public var name: String + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + /// Get object component so that we know how to edit the object + public var component: String + /// Internal application name, used in URLs. + public var assignedBackchannelApplicationSlug: String + /// Application's display Name. + public var assignedBackchannelApplicationName: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Base URL to SCIM requests, usually ends in /v2 + public var url: String + /// Authentication token + public var token: String + public var excludeUsersServiceAccount: Bool? + public var filterGroup: UUID? + + public init(pk: Int, name: String, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, component: String, assignedBackchannelApplicationSlug: String, assignedBackchannelApplicationName: String, verboseName: String, verboseNamePlural: String, metaModelName: String, url: String, token: String, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { + self.pk = pk + self.name = name + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + self.component = component + self.assignedBackchannelApplicationSlug = assignedBackchannelApplicationSlug + self.assignedBackchannelApplicationName = assignedBackchannelApplicationName + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.url = url + self.token = token + self.excludeUsersServiceAccount = excludeUsersServiceAccount + self.filterGroup = filterGroup + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + case component + case assignedBackchannelApplicationSlug = "assigned_backchannel_application_slug" + case assignedBackchannelApplicationName = "assigned_backchannel_application_name" + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case url + case token + case excludeUsersServiceAccount = "exclude_users_service_account" + case filterGroup = "filter_group" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + component = try container.decode(String.self, forKey: .component) + assignedBackchannelApplicationSlug = try container.decode(String.self, forKey: .assignedBackchannelApplicationSlug) + assignedBackchannelApplicationName = try container.decode(String.self, forKey: .assignedBackchannelApplicationName) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + url = try container.decode(String.self, forKey: .url) + token = try container.decode(String.self, forKey: .token) + excludeUsersServiceAccount = try container.decodeIfPresent(Bool.self, forKey: .excludeUsersServiceAccount) + filterGroup = try container.decodeIfPresent(UUID.self, forKey: .filterGroup) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + try container.encode(component, forKey: .component) + try container.encode(assignedBackchannelApplicationSlug, forKey: .assignedBackchannelApplicationSlug) + try container.encode(assignedBackchannelApplicationName, forKey: .assignedBackchannelApplicationName) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(url, forKey: .url) + try container.encode(token, forKey: .token) + try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) + try container.encodeIfPresent(filterGroup, forKey: .filterGroup) + } +} diff --git a/authentikClient/Sources/Models/SCIMProviderRequest.swift b/authentikClient/Sources/Models/SCIMProviderRequest.swift new file mode 100644 index 0000000..0ea66a3 --- /dev/null +++ b/authentikClient/Sources/Models/SCIMProviderRequest.swift @@ -0,0 +1,64 @@ +// +// SCIMProviderRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SCIMProvider Serializer +public struct SCIMProviderRequest: Codable { + public var name: String + public var propertyMappings: [UUID]? + /// Property mappings used for group creation/updating. + public var propertyMappingsGroup: [UUID]? + /// Base URL to SCIM requests, usually ends in /v2 + public var url: String + /// Authentication token + public var token: String + public var excludeUsersServiceAccount: Bool? + public var filterGroup: UUID? + + public init(name: String, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, url: String, token: String, excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil) { + self.name = name + self.propertyMappings = propertyMappings + self.propertyMappingsGroup = propertyMappingsGroup + self.url = url + self.token = token + self.excludeUsersServiceAccount = excludeUsersServiceAccount + self.filterGroup = filterGroup + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case propertyMappings = "property_mappings" + case propertyMappingsGroup = "property_mappings_group" + case url + case token + case excludeUsersServiceAccount = "exclude_users_service_account" + case filterGroup = "filter_group" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + propertyMappings = try container.decodeIfPresent([UUID].self, forKey: .propertyMappings) + propertyMappingsGroup = try container.decodeIfPresent([UUID].self, forKey: .propertyMappingsGroup) + url = try container.decode(String.self, forKey: .url) + token = try container.decode(String.self, forKey: .token) + excludeUsersServiceAccount = try container.decodeIfPresent(Bool.self, forKey: .excludeUsersServiceAccount) + filterGroup = try container.decodeIfPresent(UUID.self, forKey: .filterGroup) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(propertyMappings, forKey: .propertyMappings) + try container.encodeIfPresent(propertyMappingsGroup, forKey: .propertyMappingsGroup) + try container.encode(url, forKey: .url) + try container.encode(token, forKey: .token) + try container.encodeIfPresent(excludeUsersServiceAccount, forKey: .excludeUsersServiceAccount) + try container.encodeIfPresent(filterGroup, forKey: .filterGroup) + } +} diff --git a/authentikClient/Sources/Models/SMSDevice.swift b/authentikClient/Sources/Models/SMSDevice.swift new file mode 100644 index 0000000..87e0eee --- /dev/null +++ b/authentikClient/Sources/Models/SMSDevice.swift @@ -0,0 +1,65 @@ +// +// SMSDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for sms authenticator devices +public struct SMSDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + } +} diff --git a/authentikClient/Sources/Models/SMSDeviceRequest.swift b/authentikClient/Sources/Models/SMSDeviceRequest.swift new file mode 100644 index 0000000..23524e1 --- /dev/null +++ b/authentikClient/Sources/Models/SMSDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// SMSDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for sms authenticator devices +public struct SMSDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/ScopeMapping.swift b/authentikClient/Sources/Models/ScopeMapping.swift new file mode 100644 index 0000000..89046f1 --- /dev/null +++ b/authentikClient/Sources/Models/ScopeMapping.swift @@ -0,0 +1,83 @@ +// +// ScopeMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ScopeMapping Serializer +public struct ScopeMapping: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Get object's component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + /// Scope name requested by the client + public var scopeName: String + /// Description shown to the user when consenting. If left empty, the user won't be informed. + public var description: String? + + public init(pk: UUID, managed: String? = nil, name: String, expression: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, scopeName: String, description: String? = nil) { + self.pk = pk + self.managed = managed + self.name = name + self.expression = expression + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.scopeName = scopeName + self.description = description + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case name + case expression + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case scopeName = "scope_name" + case description + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + scopeName = try container.decode(String.self, forKey: .scopeName) + description = try container.decodeIfPresent(String.self, forKey: .description) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(scopeName, forKey: .scopeName) + try container.encodeIfPresent(description, forKey: .description) + } +} diff --git a/authentikClient/Sources/Models/ScopeMappingRequest.swift b/authentikClient/Sources/Models/ScopeMappingRequest.swift new file mode 100644 index 0000000..2785e18 --- /dev/null +++ b/authentikClient/Sources/Models/ScopeMappingRequest.swift @@ -0,0 +1,54 @@ +// +// ScopeMappingRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ScopeMapping Serializer +public struct ScopeMappingRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var name: String + public var expression: String + /// Scope name requested by the client + public var scopeName: String + /// Description shown to the user when consenting. If left empty, the user won't be informed. + public var description: String? + + public init(managed: String? = nil, name: String, expression: String, scopeName: String, description: String? = nil) { + self.managed = managed + self.name = name + self.expression = expression + self.scopeName = scopeName + self.description = description + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case managed + case name + case expression + case scopeName = "scope_name" + case description + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + name = try container.decode(String.self, forKey: .name) + expression = try container.decode(String.self, forKey: .expression) + scopeName = try container.decode(String.self, forKey: .scopeName) + description = try container.decodeIfPresent(String.self, forKey: .description) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(name, forKey: .name) + try container.encode(expression, forKey: .expression) + try container.encode(scopeName, forKey: .scopeName) + try container.encodeIfPresent(description, forKey: .description) + } +} diff --git a/authentikClient/Sources/Models/SelectableStage.swift b/authentikClient/Sources/Models/SelectableStage.swift new file mode 100644 index 0000000..fb18b6e --- /dev/null +++ b/authentikClient/Sources/Models/SelectableStage.swift @@ -0,0 +1,46 @@ +// +// SelectableStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for stages which can be selected by users +public struct SelectableStage: Codable { + public var pk: UUID + public var name: String + public var verboseName: String + public var metaModelName: String + + public init(pk: UUID, name: String, verboseName: String, metaModelName: String) { + self.pk = pk + self.name = name + self.verboseName = verboseName + self.metaModelName = metaModelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case verboseName = "verbose_name" + case metaModelName = "meta_model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + verboseName = try container.decode(String.self, forKey: .verboseName) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(metaModelName, forKey: .metaModelName) + } +} diff --git a/authentikClient/Sources/Models/ServiceConnection.swift b/authentikClient/Sources/Models/ServiceConnection.swift new file mode 100644 index 0000000..680466b --- /dev/null +++ b/authentikClient/Sources/Models/ServiceConnection.swift @@ -0,0 +1,66 @@ +// +// ServiceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ServiceConnection Serializer +public struct ServiceConnection: Codable { + public var pk: UUID + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + /// Return component used to edit this object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + + public init(pk: UUID, name: String, local: Bool? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String) { + self.pk = pk + self.name = name + self.local = local + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case local + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + local = try container.decodeIfPresent(Bool.self, forKey: .local) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(local, forKey: .local) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + } +} diff --git a/authentikClient/Sources/Models/ServiceConnectionRequest.swift b/authentikClient/Sources/Models/ServiceConnectionRequest.swift new file mode 100644 index 0000000..12e9c2f --- /dev/null +++ b/authentikClient/Sources/Models/ServiceConnectionRequest.swift @@ -0,0 +1,20 @@ +// +// ServiceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// ServiceConnection Serializer +public struct ServiceConnectionRequest: Codable { + public var name: String + /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration + public var local: Bool? + + public init(name: String, local: Bool? = nil) { + self.name = name + self.local = local + } +} diff --git a/authentikClient/Sources/Models/ServiceConnectionState.swift b/authentikClient/Sources/Models/ServiceConnectionState.swift new file mode 100644 index 0000000..3a3a904 --- /dev/null +++ b/authentikClient/Sources/Models/ServiceConnectionState.swift @@ -0,0 +1,19 @@ +// +// ServiceConnectionState.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for Service connection state +public struct ServiceConnectionState: Codable { + public var healthy: Bool + public var version: String + + public init(healthy: Bool, version: String) { + self.healthy = healthy + self.version = version + } +} diff --git a/authentikClient/Sources/Models/SessionUser.swift b/authentikClient/Sources/Models/SessionUser.swift new file mode 100644 index 0000000..3f71169 --- /dev/null +++ b/authentikClient/Sources/Models/SessionUser.swift @@ -0,0 +1,19 @@ +// +// SessionUser.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Response for the /user/me endpoint, returns the currently active user (as `user` property) and, if this user is being impersonated, the original user in the `original` property. +public struct SessionUser: Codable { + public var user: UserSelf + public var original: UserSelf? + + public init(user: UserSelf, original: UserSelf? = nil) { + self.user = user + self.original = original + } +} diff --git a/authentikClient/Sources/Models/SeverityEnum.swift b/authentikClient/Sources/Models/SeverityEnum.swift new file mode 100644 index 0000000..f9f3413 --- /dev/null +++ b/authentikClient/Sources/Models/SeverityEnum.swift @@ -0,0 +1,16 @@ +// +// SeverityEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `notice` - Notice * `warning` - Warning * `alert` - Alert +public enum SeverityEnum: String, Codable, CaseIterable { + case notice = "notice" + case warning = "warning" + case alert = "alert" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/ShellChallenge.swift b/authentikClient/Sources/Models/ShellChallenge.swift new file mode 100644 index 0000000..2e9c484 --- /dev/null +++ b/authentikClient/Sources/Models/ShellChallenge.swift @@ -0,0 +1,51 @@ +// +// ShellChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// challenge type to render HTML as-is +public struct ShellChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "xak-flow-shell" + public var responseErrors: [String: [ErrorDetail]]? + public var body: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "xak-flow-shell", responseErrors: [String: [ErrorDetail]]? = nil, body: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.body = body + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case body + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + body = try container.decode(String.self, forKey: .body) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(body, forKey: .body) + } +} diff --git a/authentikClient/Sources/Models/SignatureAlgorithmEnum.swift b/authentikClient/Sources/Models/SignatureAlgorithmEnum.swift new file mode 100644 index 0000000..478c7d2 --- /dev/null +++ b/authentikClient/Sources/Models/SignatureAlgorithmEnum.swift @@ -0,0 +1,18 @@ +// +// SignatureAlgorithmEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 +public enum SignatureAlgorithmEnum: String, Codable, CaseIterable { + case _2000_09_xmldsig_rsa_sha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" + case _2001_04_xmldsig_more_rsa_sha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" + case _2001_04_xmldsig_more_rsa_sha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384" + case _2001_04_xmldsig_more_rsa_sha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" + case _2000_09_xmldsig_dsa_sha1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Source.swift b/authentikClient/Sources/Models/Source.swift new file mode 100644 index 0000000..94c1157 --- /dev/null +++ b/authentikClient/Sources/Models/Source.swift @@ -0,0 +1,111 @@ +// +// Source.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Source Serializer +public struct Source: Codable { + public var pk: UUID + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + /// Get object component so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var userPathTemplate: String? + /// Get the URL to the Icon. If the name is /static or starts with http it is returned as-is + public var icon: String? + + public init(pk: UUID, name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, managed: String?, userPathTemplate: String? = nil, icon: String?) { + self.pk = pk + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.managed = managed + self.userPathTemplate = userPathTemplate + self.icon = icon + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case managed + case userPathTemplate = "user_path_template" + case icon + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + managed = try container.decode(String.self, forKey: .managed) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + icon = try container.decode(String.self, forKey: .icon) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encode(managed, forKey: .managed) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + try container.encode(icon, forKey: .icon) + } +} diff --git a/authentikClient/Sources/Models/SourceRequest.swift b/authentikClient/Sources/Models/SourceRequest.swift new file mode 100644 index 0000000..b88cabb --- /dev/null +++ b/authentikClient/Sources/Models/SourceRequest.swift @@ -0,0 +1,70 @@ +// +// SourceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Source Serializer +public struct SourceRequest: Codable { + /// Source's display Name. + public var name: String + /// Internal source name, used in URLs. + public var slug: String + public var enabled: Bool? + /// Flow to use when authenticating existing users. + public var authenticationFlow: UUID? + /// Flow to use when enrolling new users. + public var enrollmentFlow: UUID? + public var policyEngineMode: PolicyEngineMode? + public var userMatchingMode: UserMatchingModeEnum? + public var userPathTemplate: String? + + public init(name: String, slug: String, enabled: Bool? = nil, authenticationFlow: UUID? = nil, enrollmentFlow: UUID? = nil, policyEngineMode: PolicyEngineMode? = nil, userMatchingMode: UserMatchingModeEnum? = nil, userPathTemplate: String? = nil) { + self.name = name + self.slug = slug + self.enabled = enabled + self.authenticationFlow = authenticationFlow + self.enrollmentFlow = enrollmentFlow + self.policyEngineMode = policyEngineMode + self.userMatchingMode = userMatchingMode + self.userPathTemplate = userPathTemplate + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case enabled + case authenticationFlow = "authentication_flow" + case enrollmentFlow = "enrollment_flow" + case policyEngineMode = "policy_engine_mode" + case userMatchingMode = "user_matching_mode" + case userPathTemplate = "user_path_template" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) + authenticationFlow = try container.decodeIfPresent(UUID.self, forKey: .authenticationFlow) + enrollmentFlow = try container.decodeIfPresent(UUID.self, forKey: .enrollmentFlow) + policyEngineMode = try container.decodeIfPresent(PolicyEngineMode.self, forKey: .policyEngineMode) + userMatchingMode = try container.decodeIfPresent(UserMatchingModeEnum.self, forKey: .userMatchingMode) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(authenticationFlow, forKey: .authenticationFlow) + try container.encodeIfPresent(enrollmentFlow, forKey: .enrollmentFlow) + try container.encodeIfPresent(policyEngineMode, forKey: .policyEngineMode) + try container.encodeIfPresent(userMatchingMode, forKey: .userMatchingMode) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + } +} diff --git a/authentikClient/Sources/Models/SourceType.swift b/authentikClient/Sources/Models/SourceType.swift new file mode 100644 index 0000000..a699737 --- /dev/null +++ b/authentikClient/Sources/Models/SourceType.swift @@ -0,0 +1,71 @@ +// +// SourceType.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for SourceType +public struct SourceType: Codable { + public var name: String + public var slug: String + public var urlsCustomizable: Bool + public var requestTokenUrl: String? + public var authorizationUrl: String? + public var accessTokenUrl: String? + public var profileUrl: String? + public var oidcWellKnownUrl: String? + public var oidcJwksUrl: String? + + public init(name: String, slug: String, urlsCustomizable: Bool, requestTokenUrl: String?, authorizationUrl: String?, accessTokenUrl: String?, profileUrl: String?, oidcWellKnownUrl: String?, oidcJwksUrl: String?) { + self.name = name + self.slug = slug + self.urlsCustomizable = urlsCustomizable + self.requestTokenUrl = requestTokenUrl + self.authorizationUrl = authorizationUrl + self.accessTokenUrl = accessTokenUrl + self.profileUrl = profileUrl + self.oidcWellKnownUrl = oidcWellKnownUrl + self.oidcJwksUrl = oidcJwksUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case slug + case urlsCustomizable = "urls_customizable" + case requestTokenUrl = "request_token_url" + case authorizationUrl = "authorization_url" + case accessTokenUrl = "access_token_url" + case profileUrl = "profile_url" + case oidcWellKnownUrl = "oidc_well_known_url" + case oidcJwksUrl = "oidc_jwks_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) + urlsCustomizable = try container.decode(Bool.self, forKey: .urlsCustomizable) + requestTokenUrl = try container.decode(String.self, forKey: .requestTokenUrl) + authorizationUrl = try container.decode(String.self, forKey: .authorizationUrl) + accessTokenUrl = try container.decode(String.self, forKey: .accessTokenUrl) + profileUrl = try container.decode(String.self, forKey: .profileUrl) + oidcWellKnownUrl = try container.decode(String.self, forKey: .oidcWellKnownUrl) + oidcJwksUrl = try container.decode(String.self, forKey: .oidcJwksUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(urlsCustomizable, forKey: .urlsCustomizable) + try container.encode(requestTokenUrl, forKey: .requestTokenUrl) + try container.encode(authorizationUrl, forKey: .authorizationUrl) + try container.encode(accessTokenUrl, forKey: .accessTokenUrl) + try container.encode(profileUrl, forKey: .profileUrl) + try container.encode(oidcWellKnownUrl, forKey: .oidcWellKnownUrl) + try container.encode(oidcJwksUrl, forKey: .oidcJwksUrl) + } +} diff --git a/authentikClient/Sources/Models/SpBindingEnum.swift b/authentikClient/Sources/Models/SpBindingEnum.swift new file mode 100644 index 0000000..c808338 --- /dev/null +++ b/authentikClient/Sources/Models/SpBindingEnum.swift @@ -0,0 +1,15 @@ +// +// SpBindingEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `redirect` - Redirect * `post` - Post +public enum SpBindingEnum: String, Codable, CaseIterable { + case redirect = "redirect" + case post = "post" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Stage.swift b/authentikClient/Sources/Models/Stage.swift new file mode 100644 index 0000000..09ba041 --- /dev/null +++ b/authentikClient/Sources/Models/Stage.swift @@ -0,0 +1,65 @@ +// +// Stage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stage Serializer +public struct Stage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/StagePrompt.swift b/authentikClient/Sources/Models/StagePrompt.swift new file mode 100644 index 0000000..7b6aff5 --- /dev/null +++ b/authentikClient/Sources/Models/StagePrompt.swift @@ -0,0 +1,71 @@ +// +// StagePrompt.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for a single Prompt field +public struct StagePrompt: Codable { + public var fieldKey: String + public var label: String + public var type: PromptTypeEnum + public var _required: Bool + public var placeholder: String + public var initialValue: String + public var order: Int + public var subText: String + public var choices: [String]? + + public init(fieldKey: String, label: String, type: PromptTypeEnum, _required: Bool, placeholder: String, initialValue: String, order: Int, subText: String, choices: [String]?) { + self.fieldKey = fieldKey + self.label = label + self.type = type + self._required = _required + self.placeholder = placeholder + self.initialValue = initialValue + self.order = order + self.subText = subText + self.choices = choices + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case fieldKey = "field_key" + case label + case type + case _required = "required" + case placeholder + case initialValue = "initial_value" + case order + case subText = "sub_text" + case choices + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + fieldKey = try container.decode(String.self, forKey: .fieldKey) + label = try container.decode(String.self, forKey: .label) + type = try container.decode(PromptTypeEnum.self, forKey: .type) + _required = try container.decode(Bool.self, forKey: ._required) + placeholder = try container.decode(String.self, forKey: .placeholder) + initialValue = try container.decode(String.self, forKey: .initialValue) + order = try container.decode(Int.self, forKey: .order) + subText = try container.decode(String.self, forKey: .subText) + choices = try container.decode([String].self, forKey: .choices) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(fieldKey, forKey: .fieldKey) + try container.encode(label, forKey: .label) + try container.encode(type, forKey: .type) + try container.encode(_required, forKey: ._required) + try container.encode(placeholder, forKey: .placeholder) + try container.encode(initialValue, forKey: .initialValue) + try container.encode(order, forKey: .order) + try container.encode(subText, forKey: .subText) + try container.encode(choices, forKey: .choices) + } +} diff --git a/authentikClient/Sources/Models/StageRequest.swift b/authentikClient/Sources/Models/StageRequest.swift new file mode 100644 index 0000000..88c18e0 --- /dev/null +++ b/authentikClient/Sources/Models/StageRequest.swift @@ -0,0 +1,36 @@ +// +// StageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Stage Serializer +public struct StageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + + public init(name: String, flowSet: [FlowSetRequest]? = nil) { + self.name = name + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/StaticDevice.swift b/authentikClient/Sources/Models/StaticDevice.swift new file mode 100644 index 0000000..1b4f3ba --- /dev/null +++ b/authentikClient/Sources/Models/StaticDevice.swift @@ -0,0 +1,70 @@ +// +// StaticDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for static authenticator devices +public struct StaticDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + public var tokenSet: [StaticDeviceToken] + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool, tokenSet: [StaticDeviceToken]) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + self.tokenSet = tokenSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + case tokenSet = "token_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + tokenSet = try container.decode([StaticDeviceToken].self, forKey: .tokenSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + try container.encode(tokenSet, forKey: .tokenSet) + } +} diff --git a/authentikClient/Sources/Models/StaticDeviceRequest.swift b/authentikClient/Sources/Models/StaticDeviceRequest.swift new file mode 100644 index 0000000..c4303ba --- /dev/null +++ b/authentikClient/Sources/Models/StaticDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// StaticDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for static authenticator devices +public struct StaticDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/StaticDeviceToken.swift b/authentikClient/Sources/Models/StaticDeviceToken.swift new file mode 100644 index 0000000..9e74b4e --- /dev/null +++ b/authentikClient/Sources/Models/StaticDeviceToken.swift @@ -0,0 +1,17 @@ +// +// StaticDeviceToken.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for static device's tokens +public struct StaticDeviceToken: Codable { + public var token: String + + public init(token: String) { + self.token = token + } +} diff --git a/authentikClient/Sources/Models/StaticDeviceTokenRequest.swift b/authentikClient/Sources/Models/StaticDeviceTokenRequest.swift new file mode 100644 index 0000000..fed88e4 --- /dev/null +++ b/authentikClient/Sources/Models/StaticDeviceTokenRequest.swift @@ -0,0 +1,17 @@ +// +// StaticDeviceTokenRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for static device's tokens +public struct StaticDeviceTokenRequest: Codable { + public var token: String + + public init(token: String) { + self.token = token + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/SubModeEnum.swift b/authentikClient/Sources/Models/SubModeEnum.swift similarity index 77% rename from authentikClient/Classes/OpenAPIs/Models/SubModeEnum.swift rename to authentikClient/Sources/Models/SubModeEnum.swift index c89bd83..496c3f4 100644 --- a/authentikClient/Classes/OpenAPIs/Models/SubModeEnum.swift +++ b/authentikClient/Sources/Models/SubModeEnum.swift @@ -6,12 +6,9 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -/** * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. */ -public enum SubModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { +/// * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. +public enum SubModeEnum: String, Codable, CaseIterable { case hashedUserId = "hashed_user_id" case userId = "user_id" case userUuid = "user_uuid" diff --git a/authentikClient/Sources/Models/SystemInfo.swift b/authentikClient/Sources/Models/SystemInfo.swift new file mode 100644 index 0000000..c8cdc2c --- /dev/null +++ b/authentikClient/Sources/Models/SystemInfo.swift @@ -0,0 +1,67 @@ +// +// SystemInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get system information. +public struct SystemInfo: Codable { + /// Get HTTP Request headers + public var httpHeaders: [String: String] + /// Get HTTP host + public var httpHost: String + /// Get HTTP Secure flag + public var httpIsSecure: Bool + public var runtime: SystemInfoRuntime + /// Currently active tenant + public var tenant: String + /// Current server time + public var serverTime: Date + /// Get the FQDN configured on the embedded outpost + public var embeddedOutpostHost: String + + public init(httpHeaders: [String: String], httpHost: String, httpIsSecure: Bool, runtime: SystemInfoRuntime, tenant: String, serverTime: Date, embeddedOutpostHost: String) { + self.httpHeaders = httpHeaders + self.httpHost = httpHost + self.httpIsSecure = httpIsSecure + self.runtime = runtime + self.tenant = tenant + self.serverTime = serverTime + self.embeddedOutpostHost = embeddedOutpostHost + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case httpHeaders = "http_headers" + case httpHost = "http_host" + case httpIsSecure = "http_is_secure" + case runtime + case tenant + case serverTime = "server_time" + case embeddedOutpostHost = "embedded_outpost_host" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + httpHeaders = try container.decode([String: String].self, forKey: .httpHeaders) + httpHost = try container.decode(String.self, forKey: .httpHost) + httpIsSecure = try container.decode(Bool.self, forKey: .httpIsSecure) + runtime = try container.decode(SystemInfoRuntime.self, forKey: .runtime) + tenant = try container.decode(String.self, forKey: .tenant) + serverTime = try container.decode(Date.self, forKey: .serverTime) + embeddedOutpostHost = try container.decode(String.self, forKey: .embeddedOutpostHost) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(httpHeaders, forKey: .httpHeaders) + try container.encode(httpHost, forKey: .httpHost) + try container.encode(httpIsSecure, forKey: .httpIsSecure) + try container.encode(runtime, forKey: .runtime) + try container.encode(tenant, forKey: .tenant) + try container.encode(serverTime, forKey: .serverTime) + try container.encode(embeddedOutpostHost, forKey: .embeddedOutpostHost) + } +} diff --git a/authentikClient/Sources/Models/SystemInfoRuntime.swift b/authentikClient/Sources/Models/SystemInfoRuntime.swift new file mode 100644 index 0000000..76551c5 --- /dev/null +++ b/authentikClient/Sources/Models/SystemInfoRuntime.swift @@ -0,0 +1,56 @@ +// +// SystemInfoRuntime.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get versions +public struct SystemInfoRuntime: Codable { + public var pythonVersion: String + public var gunicornVersion: String + public var environment: String + public var architecture: String + public var platform: String + public var uname: String + + public init(pythonVersion: String, gunicornVersion: String, environment: String, architecture: String, platform: String, uname: String) { + self.pythonVersion = pythonVersion + self.gunicornVersion = gunicornVersion + self.environment = environment + self.architecture = architecture + self.platform = platform + self.uname = uname + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pythonVersion = "python_version" + case gunicornVersion = "gunicorn_version" + case environment + case architecture + case platform + case uname + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pythonVersion = try container.decode(String.self, forKey: .pythonVersion) + gunicornVersion = try container.decode(String.self, forKey: .gunicornVersion) + environment = try container.decode(String.self, forKey: .environment) + architecture = try container.decode(String.self, forKey: .architecture) + platform = try container.decode(String.self, forKey: .platform) + uname = try container.decode(String.self, forKey: .uname) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pythonVersion, forKey: .pythonVersion) + try container.encode(gunicornVersion, forKey: .gunicornVersion) + try container.encode(environment, forKey: .environment) + try container.encode(architecture, forKey: .architecture) + try container.encode(platform, forKey: .platform) + try container.encode(uname, forKey: .uname) + } +} diff --git a/authentikClient/Sources/Models/TOTPDevice.swift b/authentikClient/Sources/Models/TOTPDevice.swift new file mode 100644 index 0000000..62deac4 --- /dev/null +++ b/authentikClient/Sources/Models/TOTPDevice.swift @@ -0,0 +1,65 @@ +// +// TOTPDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for totp authenticator devices +public struct TOTPDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + } +} diff --git a/authentikClient/Sources/Models/TOTPDeviceRequest.swift b/authentikClient/Sources/Models/TOTPDeviceRequest.swift new file mode 100644 index 0000000..b36efb8 --- /dev/null +++ b/authentikClient/Sources/Models/TOTPDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// TOTPDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for totp authenticator devices +public struct TOTPDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/Task.swift b/authentikClient/Sources/Models/Task.swift new file mode 100644 index 0000000..7b63c35 --- /dev/null +++ b/authentikClient/Sources/Models/Task.swift @@ -0,0 +1,57 @@ +// +// Task.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serialize TaskInfo and TaskResult +public struct Task: Codable { + public var taskName: String + public var taskDescription: String + public var taskFinishTimestamp: Date + /// Get the duration a task took to run + public var taskDuration: Int + public var status: TaskStatusEnum + public var messages: [AnyCodable] + + public init(taskName: String, taskDescription: String, taskFinishTimestamp: Date, taskDuration: Int, status: TaskStatusEnum, messages: [AnyCodable]) { + self.taskName = taskName + self.taskDescription = taskDescription + self.taskFinishTimestamp = taskFinishTimestamp + self.taskDuration = taskDuration + self.status = status + self.messages = messages + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case taskName = "task_name" + case taskDescription = "task_description" + case taskFinishTimestamp = "task_finish_timestamp" + case taskDuration = "task_duration" + case status + case messages + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + taskName = try container.decode(String.self, forKey: .taskName) + taskDescription = try container.decode(String.self, forKey: .taskDescription) + taskFinishTimestamp = try container.decode(Date.self, forKey: .taskFinishTimestamp) + taskDuration = try container.decode(Int.self, forKey: .taskDuration) + status = try container.decode(TaskStatusEnum.self, forKey: .status) + messages = try container.decode([AnyCodable].self, forKey: .messages) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(taskName, forKey: .taskName) + try container.encode(taskDescription, forKey: .taskDescription) + try container.encode(taskFinishTimestamp, forKey: .taskFinishTimestamp) + try container.encode(taskDuration, forKey: .taskDuration) + try container.encode(status, forKey: .status) + try container.encode(messages, forKey: .messages) + } +} diff --git a/authentikClient/Sources/Models/TaskStatusEnum.swift b/authentikClient/Sources/Models/TaskStatusEnum.swift new file mode 100644 index 0000000..85c3a0d --- /dev/null +++ b/authentikClient/Sources/Models/TaskStatusEnum.swift @@ -0,0 +1,17 @@ +// +// TaskStatusEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `SUCCESSFUL` - SUCCESSFUL * `WARNING` - WARNING * `ERROR` - ERROR * `UNKNOWN` - UNKNOWN +public enum TaskStatusEnum: String, Codable, CaseIterable { + case successful = "SUCCESSFUL" + case warning = "WARNING" + case error = "ERROR" + case unknown = "UNKNOWN" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/Tenant.swift b/authentikClient/Sources/Models/Tenant.swift new file mode 100644 index 0000000..e04555a --- /dev/null +++ b/authentikClient/Sources/Models/Tenant.swift @@ -0,0 +1,104 @@ +// +// Tenant.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Tenant Serializer +public struct Tenant: Codable { + public var tenantUuid: UUID + /// Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + public var domain: String + public var _default: Bool? + public var brandingTitle: String? + public var brandingLogo: String? + public var brandingFavicon: String? + public var flowAuthentication: UUID? + public var flowInvalidation: UUID? + public var flowRecovery: UUID? + public var flowUnenrollment: UUID? + public var flowUserSettings: UUID? + public var flowDeviceCode: UUID? + /// Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + public var eventRetention: String? + /// Web Certificate used by the authentik Core webserver. + public var webCertificate: UUID? + public var attributes: [String: AnyCodable]? + + public init(tenantUuid: UUID, domain: String, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { + self.tenantUuid = tenantUuid + self.domain = domain + self._default = _default + self.brandingTitle = brandingTitle + self.brandingLogo = brandingLogo + self.brandingFavicon = brandingFavicon + self.flowAuthentication = flowAuthentication + self.flowInvalidation = flowInvalidation + self.flowRecovery = flowRecovery + self.flowUnenrollment = flowUnenrollment + self.flowUserSettings = flowUserSettings + self.flowDeviceCode = flowDeviceCode + self.eventRetention = eventRetention + self.webCertificate = webCertificate + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case tenantUuid = "tenant_uuid" + case domain + case _default = "default" + case brandingTitle = "branding_title" + case brandingLogo = "branding_logo" + case brandingFavicon = "branding_favicon" + case flowAuthentication = "flow_authentication" + case flowInvalidation = "flow_invalidation" + case flowRecovery = "flow_recovery" + case flowUnenrollment = "flow_unenrollment" + case flowUserSettings = "flow_user_settings" + case flowDeviceCode = "flow_device_code" + case eventRetention = "event_retention" + case webCertificate = "web_certificate" + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + tenantUuid = try container.decode(UUID.self, forKey: .tenantUuid) + domain = try container.decode(String.self, forKey: .domain) + _default = try container.decodeIfPresent(Bool.self, forKey: ._default) + brandingTitle = try container.decodeIfPresent(String.self, forKey: .brandingTitle) + brandingLogo = try container.decodeIfPresent(String.self, forKey: .brandingLogo) + brandingFavicon = try container.decodeIfPresent(String.self, forKey: .brandingFavicon) + flowAuthentication = try container.decodeIfPresent(UUID.self, forKey: .flowAuthentication) + flowInvalidation = try container.decodeIfPresent(UUID.self, forKey: .flowInvalidation) + flowRecovery = try container.decodeIfPresent(UUID.self, forKey: .flowRecovery) + flowUnenrollment = try container.decodeIfPresent(UUID.self, forKey: .flowUnenrollment) + flowUserSettings = try container.decodeIfPresent(UUID.self, forKey: .flowUserSettings) + flowDeviceCode = try container.decodeIfPresent(UUID.self, forKey: .flowDeviceCode) + eventRetention = try container.decodeIfPresent(String.self, forKey: .eventRetention) + webCertificate = try container.decodeIfPresent(UUID.self, forKey: .webCertificate) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(tenantUuid, forKey: .tenantUuid) + try container.encode(domain, forKey: .domain) + try container.encodeIfPresent(_default, forKey: ._default) + try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) + try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) + try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) + try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) + try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) + try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) + try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) + try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) + try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) + try container.encodeIfPresent(eventRetention, forKey: .eventRetention) + try container.encodeIfPresent(webCertificate, forKey: .webCertificate) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/TenantRequest.swift b/authentikClient/Sources/Models/TenantRequest.swift new file mode 100644 index 0000000..afa899e --- /dev/null +++ b/authentikClient/Sources/Models/TenantRequest.swift @@ -0,0 +1,99 @@ +// +// TenantRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Tenant Serializer +public struct TenantRequest: Codable { + /// Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + public var domain: String + public var _default: Bool? + public var brandingTitle: String? + public var brandingLogo: String? + public var brandingFavicon: String? + public var flowAuthentication: UUID? + public var flowInvalidation: UUID? + public var flowRecovery: UUID? + public var flowUnenrollment: UUID? + public var flowUserSettings: UUID? + public var flowDeviceCode: UUID? + /// Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + public var eventRetention: String? + /// Web Certificate used by the authentik Core webserver. + public var webCertificate: UUID? + public var attributes: [String: AnyCodable]? + + public init(domain: String, _default: Bool? = nil, brandingTitle: String? = nil, brandingLogo: String? = nil, brandingFavicon: String? = nil, flowAuthentication: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, flowDeviceCode: UUID? = nil, eventRetention: String? = nil, webCertificate: UUID? = nil, attributes: [String: AnyCodable]? = nil) { + self.domain = domain + self._default = _default + self.brandingTitle = brandingTitle + self.brandingLogo = brandingLogo + self.brandingFavicon = brandingFavicon + self.flowAuthentication = flowAuthentication + self.flowInvalidation = flowInvalidation + self.flowRecovery = flowRecovery + self.flowUnenrollment = flowUnenrollment + self.flowUserSettings = flowUserSettings + self.flowDeviceCode = flowDeviceCode + self.eventRetention = eventRetention + self.webCertificate = webCertificate + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case domain + case _default = "default" + case brandingTitle = "branding_title" + case brandingLogo = "branding_logo" + case brandingFavicon = "branding_favicon" + case flowAuthentication = "flow_authentication" + case flowInvalidation = "flow_invalidation" + case flowRecovery = "flow_recovery" + case flowUnenrollment = "flow_unenrollment" + case flowUserSettings = "flow_user_settings" + case flowDeviceCode = "flow_device_code" + case eventRetention = "event_retention" + case webCertificate = "web_certificate" + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + domain = try container.decode(String.self, forKey: .domain) + _default = try container.decodeIfPresent(Bool.self, forKey: ._default) + brandingTitle = try container.decodeIfPresent(String.self, forKey: .brandingTitle) + brandingLogo = try container.decodeIfPresent(String.self, forKey: .brandingLogo) + brandingFavicon = try container.decodeIfPresent(String.self, forKey: .brandingFavicon) + flowAuthentication = try container.decodeIfPresent(UUID.self, forKey: .flowAuthentication) + flowInvalidation = try container.decodeIfPresent(UUID.self, forKey: .flowInvalidation) + flowRecovery = try container.decodeIfPresent(UUID.self, forKey: .flowRecovery) + flowUnenrollment = try container.decodeIfPresent(UUID.self, forKey: .flowUnenrollment) + flowUserSettings = try container.decodeIfPresent(UUID.self, forKey: .flowUserSettings) + flowDeviceCode = try container.decodeIfPresent(UUID.self, forKey: .flowDeviceCode) + eventRetention = try container.decodeIfPresent(String.self, forKey: .eventRetention) + webCertificate = try container.decodeIfPresent(UUID.self, forKey: .webCertificate) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(domain, forKey: .domain) + try container.encodeIfPresent(_default, forKey: ._default) + try container.encodeIfPresent(brandingTitle, forKey: .brandingTitle) + try container.encodeIfPresent(brandingLogo, forKey: .brandingLogo) + try container.encodeIfPresent(brandingFavicon, forKey: .brandingFavicon) + try container.encodeIfPresent(flowAuthentication, forKey: .flowAuthentication) + try container.encodeIfPresent(flowInvalidation, forKey: .flowInvalidation) + try container.encodeIfPresent(flowRecovery, forKey: .flowRecovery) + try container.encodeIfPresent(flowUnenrollment, forKey: .flowUnenrollment) + try container.encodeIfPresent(flowUserSettings, forKey: .flowUserSettings) + try container.encodeIfPresent(flowDeviceCode, forKey: .flowDeviceCode) + try container.encodeIfPresent(eventRetention, forKey: .eventRetention) + try container.encodeIfPresent(webCertificate, forKey: .webCertificate) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/Token.swift b/authentikClient/Sources/Models/Token.swift new file mode 100644 index 0000000..5fc3f40 --- /dev/null +++ b/authentikClient/Sources/Models/Token.swift @@ -0,0 +1,72 @@ +// +// Token.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Token Serializer +public struct Token: Codable { + public var pk: UUID + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var identifier: String + public var intent: IntentEnum? + public var user: Int? + public var userObj: User + public var description: String? + public var expires: Date? + public var expiring: Bool? + + public init(pk: UUID, managed: String? = nil, identifier: String, intent: IntentEnum? = nil, user: Int? = nil, userObj: User, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { + self.pk = pk + self.managed = managed + self.identifier = identifier + self.intent = intent + self.user = user + self.userObj = userObj + self.description = description + self.expires = expires + self.expiring = expiring + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case managed + case identifier + case intent + case user + case userObj = "user_obj" + case description + case expires + case expiring + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + managed = try container.decodeIfPresent(String.self, forKey: .managed) + identifier = try container.decode(String.self, forKey: .identifier) + intent = try container.decodeIfPresent(IntentEnum.self, forKey: .intent) + user = try container.decodeIfPresent(Int.self, forKey: .user) + userObj = try container.decode(User.self, forKey: .userObj) + description = try container.decodeIfPresent(String.self, forKey: .description) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + expiring = try container.decodeIfPresent(Bool.self, forKey: .expiring) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encodeIfPresent(managed, forKey: .managed) + try container.encode(identifier, forKey: .identifier) + try container.encodeIfPresent(intent, forKey: .intent) + try container.encodeIfPresent(user, forKey: .user) + try container.encode(userObj, forKey: .userObj) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encodeIfPresent(expiring, forKey: .expiring) + } +} diff --git a/authentikClient/Sources/Models/TokenModel.swift b/authentikClient/Sources/Models/TokenModel.swift new file mode 100644 index 0000000..d60c559 --- /dev/null +++ b/authentikClient/Sources/Models/TokenModel.swift @@ -0,0 +1,68 @@ +// +// TokenModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for BaseGrantModel and RefreshToken +public struct TokenModel: Codable { + public var pk: Int + public var provider: OAuth2Provider + public var user: User + /// Check if token is expired yet. + public var isExpired: Bool + public var expires: Date? + public var scope: [String] + /// Get the token's id_token as JSON String + public var idToken: String + public var revoked: Bool? + + public init(pk: Int, provider: OAuth2Provider, user: User, isExpired: Bool, expires: Date? = nil, scope: [String], idToken: String, revoked: Bool? = nil) { + self.pk = pk + self.provider = provider + self.user = user + self.isExpired = isExpired + self.expires = expires + self.scope = scope + self.idToken = idToken + self.revoked = revoked + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case provider + case user + case isExpired = "is_expired" + case expires + case scope + case idToken = "id_token" + case revoked + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + provider = try container.decode(OAuth2Provider.self, forKey: .provider) + user = try container.decode(User.self, forKey: .user) + isExpired = try container.decode(Bool.self, forKey: .isExpired) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + scope = try container.decode([String].self, forKey: .scope) + idToken = try container.decode(String.self, forKey: .idToken) + revoked = try container.decodeIfPresent(Bool.self, forKey: .revoked) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(provider, forKey: .provider) + try container.encode(user, forKey: .user) + try container.encode(isExpired, forKey: .isExpired) + try container.encodeIfPresent(expires, forKey: .expires) + try container.encode(scope, forKey: .scope) + try container.encode(idToken, forKey: .idToken) + try container.encodeIfPresent(revoked, forKey: .revoked) + } +} diff --git a/authentikClient/Sources/Models/TokenRequest.swift b/authentikClient/Sources/Models/TokenRequest.swift new file mode 100644 index 0000000..b3fa7d4 --- /dev/null +++ b/authentikClient/Sources/Models/TokenRequest.swift @@ -0,0 +1,30 @@ +// +// TokenRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Token Serializer +public struct TokenRequest: Codable { + /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. + public var managed: String? + public var identifier: String + public var intent: IntentEnum? + public var user: Int? + public var description: String? + public var expires: Date? + public var expiring: Bool? + + public init(managed: String? = nil, identifier: String, intent: IntentEnum? = nil, user: Int? = nil, description: String? = nil, expires: Date? = nil, expiring: Bool? = nil) { + self.managed = managed + self.identifier = identifier + self.intent = intent + self.user = user + self.description = description + self.expires = expires + self.expiring = expiring + } +} diff --git a/authentikClient/Sources/Models/TokenSetKeyRequest.swift b/authentikClient/Sources/Models/TokenSetKeyRequest.swift new file mode 100644 index 0000000..d0c344b --- /dev/null +++ b/authentikClient/Sources/Models/TokenSetKeyRequest.swift @@ -0,0 +1,16 @@ +// +// TokenSetKeyRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TokenSetKeyRequest: Codable { + public var key: String + + public init(key: String) { + self.key = key + } +} diff --git a/authentikClient/Sources/Models/TokenView.swift b/authentikClient/Sources/Models/TokenView.swift new file mode 100644 index 0000000..ed5f006 --- /dev/null +++ b/authentikClient/Sources/Models/TokenView.swift @@ -0,0 +1,17 @@ +// +// TokenView.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Show token's current key +public struct TokenView: Codable { + public var key: String + + public init(key: String) { + self.key = key + } +} diff --git a/authentikClient/Sources/Models/TransactionApplicationRequest.swift b/authentikClient/Sources/Models/TransactionApplicationRequest.swift new file mode 100644 index 0000000..2a11ace --- /dev/null +++ b/authentikClient/Sources/Models/TransactionApplicationRequest.swift @@ -0,0 +1,41 @@ +// +// TransactionApplicationRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for creating a provider and an application in one transaction +public struct TransactionApplicationRequest: Codable { + public var app: ApplicationRequest + public var providerModel: ProviderModelEnum + public var provider: ModelRequest + + public init(app: ApplicationRequest, providerModel: ProviderModelEnum, provider: ModelRequest) { + self.app = app + self.providerModel = providerModel + self.provider = provider + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case app + case providerModel = "provider_model" + case provider + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + app = try container.decode(ApplicationRequest.self, forKey: .app) + providerModel = try container.decode(ProviderModelEnum.self, forKey: .providerModel) + provider = try container.decode(ModelRequest.self, forKey: .provider) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(app, forKey: .app) + try container.encode(providerModel, forKey: .providerModel) + try container.encode(provider, forKey: .provider) + } +} diff --git a/authentikClient/Sources/Models/TransactionApplicationResponse.swift b/authentikClient/Sources/Models/TransactionApplicationResponse.swift new file mode 100644 index 0000000..cce9d1a --- /dev/null +++ b/authentikClient/Sources/Models/TransactionApplicationResponse.swift @@ -0,0 +1,19 @@ +// +// TransactionApplicationResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Transactional creation response +public struct TransactionApplicationResponse: Codable { + public var applied: Bool + public var logs: [String] + + public init(applied: Bool, logs: [String]) { + self.applied = applied + self.logs = logs + } +} diff --git a/authentikClient/Sources/Models/TypeCreate.swift b/authentikClient/Sources/Models/TypeCreate.swift new file mode 100644 index 0000000..32ff1bf --- /dev/null +++ b/authentikClient/Sources/Models/TypeCreate.swift @@ -0,0 +1,46 @@ +// +// TypeCreate.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Types of an object that can be created +public struct TypeCreate: Codable { + public var name: String + public var description: String + public var component: String + public var modelName: String + + public init(name: String, description: String, component: String, modelName: String) { + self.name = name + self.description = description + self.component = component + self.modelName = modelName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case description + case component + case modelName = "model_name" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + description = try container.decode(String.self, forKey: .description) + component = try container.decode(String.self, forKey: .component) + modelName = try container.decode(String.self, forKey: .modelName) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(description, forKey: .description) + try container.encode(component, forKey: .component) + try container.encode(modelName, forKey: .modelName) + } +} diff --git a/authentikClient/Sources/Models/UiThemeEnum.swift b/authentikClient/Sources/Models/UiThemeEnum.swift new file mode 100644 index 0000000..fddbe18 --- /dev/null +++ b/authentikClient/Sources/Models/UiThemeEnum.swift @@ -0,0 +1,16 @@ +// +// UiThemeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `automatic` - Automatic * `light` - Light * `dark` - Dark +public enum UiThemeEnum: String, Codable, CaseIterable { + case automatic = "automatic" + case light = "light" + case dark = "dark" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/UsedBy.swift b/authentikClient/Sources/Models/UsedBy.swift new file mode 100644 index 0000000..d4a72de --- /dev/null +++ b/authentikClient/Sources/Models/UsedBy.swift @@ -0,0 +1,51 @@ +// +// UsedBy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// A list of all objects referencing the queried object +public struct UsedBy: Codable { + public var app: String + public var modelName: String + public var pk: String + public var name: String + public var action: UsedByActionEnum + + public init(app: String, modelName: String, pk: String, name: String, action: UsedByActionEnum) { + self.app = app + self.modelName = modelName + self.pk = pk + self.name = name + self.action = action + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case app + case modelName = "model_name" + case pk + case name + case action + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + app = try container.decode(String.self, forKey: .app) + modelName = try container.decode(String.self, forKey: .modelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + action = try container.decode(UsedByActionEnum.self, forKey: .action) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(app, forKey: .app) + try container.encode(modelName, forKey: .modelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(action, forKey: .action) + } +} diff --git a/authentikClient/Sources/Models/UsedByActionEnum.swift b/authentikClient/Sources/Models/UsedByActionEnum.swift new file mode 100644 index 0000000..9ce0243 --- /dev/null +++ b/authentikClient/Sources/Models/UsedByActionEnum.swift @@ -0,0 +1,17 @@ +// +// UsedByActionEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `CASCADE` - CASCADE * `CASCADE_MANY` - CASCADE_MANY * `SET_NULL` - SET_NULL * `SET_DEFAULT` - SET_DEFAULT +public enum UsedByActionEnum: String, Codable, CaseIterable { + case cascade = "CASCADE" + case cascadeMany = "CASCADE_MANY" + case setNull = "SET_NULL" + case setDefault = "SET_DEFAULT" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/User.swift b/authentikClient/Sources/Models/User.swift new file mode 100644 index 0000000..fdf547a --- /dev/null +++ b/authentikClient/Sources/Models/User.swift @@ -0,0 +1,103 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User Serializer +public struct User: Codable { + public var pk: Int + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var isSuperuser: Bool + public var groups: [UUID]? + public var groupsObj: [UserGroup] + public var email: String? + public var avatar: String + public var attributes: [String: AnyCodable]? + public var uid: String + public var path: String? + public var type: UserTypeEnum? + public var uuid: UUID + + public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, isSuperuser: Bool, groups: [UUID]? = nil, groupsObj: [UserGroup], email: String? = nil, avatar: String, attributes: [String: AnyCodable]? = nil, uid: String, path: String? = nil, type: UserTypeEnum? = nil, uuid: UUID) { + self.pk = pk + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.isSuperuser = isSuperuser + self.groups = groups + self.groupsObj = groupsObj + self.email = email + self.avatar = avatar + self.attributes = attributes + self.uid = uid + self.path = path + self.type = type + self.uuid = uuid + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case isSuperuser = "is_superuser" + case groups + case groupsObj = "groups_obj" + case email + case avatar + case attributes + case uid + case path + case type + case uuid + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + isSuperuser = try container.decode(Bool.self, forKey: .isSuperuser) + groups = try container.decodeIfPresent([UUID].self, forKey: .groups) + groupsObj = try container.decode([UserGroup].self, forKey: .groupsObj) + email = try container.decodeIfPresent(String.self, forKey: .email) + avatar = try container.decode(String.self, forKey: .avatar) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + uid = try container.decode(String.self, forKey: .uid) + path = try container.decodeIfPresent(String.self, forKey: .path) + type = try container.decodeIfPresent(UserTypeEnum.self, forKey: .type) + uuid = try container.decode(UUID.self, forKey: .uuid) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encode(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(groups, forKey: .groups) + try container.encode(groupsObj, forKey: .groupsObj) + try container.encodeIfPresent(email, forKey: .email) + try container.encode(avatar, forKey: .avatar) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encode(uid, forKey: .uid) + try container.encodeIfPresent(path, forKey: .path) + try container.encodeIfPresent(type, forKey: .type) + try container.encode(uuid, forKey: .uuid) + } +} diff --git a/authentikClient/Sources/Models/UserAccountRequest.swift b/authentikClient/Sources/Models/UserAccountRequest.swift new file mode 100644 index 0000000..daea3e2 --- /dev/null +++ b/authentikClient/Sources/Models/UserAccountRequest.swift @@ -0,0 +1,17 @@ +// +// UserAccountRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Account adding/removing operations +public struct UserAccountRequest: Codable { + public var pk: Int + + public init(pk: Int) { + self.pk = pk + } +} diff --git a/authentikClient/Sources/Models/UserAssignedObjectPermission.swift b/authentikClient/Sources/Models/UserAssignedObjectPermission.swift new file mode 100644 index 0000000..66a5d46 --- /dev/null +++ b/authentikClient/Sources/Models/UserAssignedObjectPermission.swift @@ -0,0 +1,79 @@ +// +// UserAssignedObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Users assigned object permission serializer +public struct UserAssignedObjectPermission: Codable { + public var pk: Int + /// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var email: String? + public var attributes: [String: AnyCodable]? + public var uid: String + public var permissions: [UserObjectPermission] + public var isSuperuser: Bool + + public init(pk: Int, username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, uid: String, permissions: [UserObjectPermission], isSuperuser: Bool) { + self.pk = pk + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.email = email + self.attributes = attributes + self.uid = uid + self.permissions = permissions + self.isSuperuser = isSuperuser + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case email + case attributes + case uid + case permissions + case isSuperuser = "is_superuser" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + email = try container.decodeIfPresent(String.self, forKey: .email) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + uid = try container.decode(String.self, forKey: .uid) + permissions = try container.decode([UserObjectPermission].self, forKey: .permissions) + isSuperuser = try container.decode(Bool.self, forKey: .isSuperuser) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encode(uid, forKey: .uid) + try container.encode(permissions, forKey: .permissions) + try container.encode(isSuperuser, forKey: .isSuperuser) + } +} diff --git a/authentikClient/Sources/Models/UserConsent.swift b/authentikClient/Sources/Models/UserConsent.swift new file mode 100644 index 0000000..902eb7a --- /dev/null +++ b/authentikClient/Sources/Models/UserConsent.swift @@ -0,0 +1,25 @@ +// +// UserConsent.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserConsent Serializer +public struct UserConsent: Codable { + public var pk: Int + public var expires: Date? + public var user: User + public var application: Application + public var permissions: String? = "" + + public init(pk: Int, expires: Date? = nil, user: User, application: Application, permissions: String? = "") { + self.pk = pk + self.expires = expires + self.user = user + self.application = application + self.permissions = permissions + } +} diff --git a/authentikClient/Sources/Models/UserCreationModeEnum.swift b/authentikClient/Sources/Models/UserCreationModeEnum.swift new file mode 100644 index 0000000..28d5db0 --- /dev/null +++ b/authentikClient/Sources/Models/UserCreationModeEnum.swift @@ -0,0 +1,16 @@ +// +// UserCreationModeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create +public enum UserCreationModeEnum: String, Codable, CaseIterable { + case neverCreate = "never_create" + case createWhenRequired = "create_when_required" + case alwaysCreate = "always_create" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/UserDeleteStage.swift b/authentikClient/Sources/Models/UserDeleteStage.swift new file mode 100644 index 0000000..0ff939a --- /dev/null +++ b/authentikClient/Sources/Models/UserDeleteStage.swift @@ -0,0 +1,65 @@ +// +// UserDeleteStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserDeleteStage Serializer +public struct UserDeleteStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/UserDeleteStageRequest.swift b/authentikClient/Sources/Models/UserDeleteStageRequest.swift new file mode 100644 index 0000000..07e33e2 --- /dev/null +++ b/authentikClient/Sources/Models/UserDeleteStageRequest.swift @@ -0,0 +1,36 @@ +// +// UserDeleteStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserDeleteStage Serializer +public struct UserDeleteStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + + public init(name: String, flowSet: [FlowSetRequest]? = nil) { + self.name = name + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/UserFieldsEnum.swift b/authentikClient/Sources/Models/UserFieldsEnum.swift new file mode 100644 index 0000000..f5e6f8f --- /dev/null +++ b/authentikClient/Sources/Models/UserFieldsEnum.swift @@ -0,0 +1,16 @@ +// +// UserFieldsEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `email` - E Mail * `username` - Username * `upn` - Upn +public enum UserFieldsEnum: String, Codable, CaseIterable { + case email = "email" + case username = "username" + case upn = "upn" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/UserGroup.swift b/authentikClient/Sources/Models/UserGroup.swift new file mode 100644 index 0000000..b877956 --- /dev/null +++ b/authentikClient/Sources/Models/UserGroup.swift @@ -0,0 +1,63 @@ +// +// UserGroup.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Simplified Group Serializer for user's groups +public struct UserGroup: Codable { + public var pk: UUID + /// Get a numerical, int32 ID for the group + public var numPk: Int + public var name: String + /// Users added to this group will be superusers. + public var isSuperuser: Bool? + public var parent: UUID? + public var parentName: String + public var attributes: [String: AnyCodable]? + + public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String, attributes: [String: AnyCodable]? = nil) { + self.pk = pk + self.numPk = numPk + self.name = name + self.isSuperuser = isSuperuser + self.parent = parent + self.parentName = parentName + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case numPk = "num_pk" + case name + case isSuperuser = "is_superuser" + case parent + case parentName = "parent_name" + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + numPk = try container.decode(Int.self, forKey: .numPk) + name = try container.decode(String.self, forKey: .name) + isSuperuser = try container.decodeIfPresent(Bool.self, forKey: .isSuperuser) + parent = try container.decodeIfPresent(UUID.self, forKey: .parent) + parentName = try container.decode(String.self, forKey: .parentName) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(numPk, forKey: .numPk) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(parent, forKey: .parent) + try container.encode(parentName, forKey: .parentName) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/UserGroupRequest.swift b/authentikClient/Sources/Models/UserGroupRequest.swift new file mode 100644 index 0000000..313b863 --- /dev/null +++ b/authentikClient/Sources/Models/UserGroupRequest.swift @@ -0,0 +1,47 @@ +// +// UserGroupRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Simplified Group Serializer for user's groups +public struct UserGroupRequest: Codable { + public var name: String + /// Users added to this group will be superusers. + public var isSuperuser: Bool? + public var parent: UUID? + public var attributes: [String: AnyCodable]? + + public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, attributes: [String: AnyCodable]? = nil) { + self.name = name + self.isSuperuser = isSuperuser + self.parent = parent + self.attributes = attributes + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case isSuperuser = "is_superuser" + case parent + case attributes + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + isSuperuser = try container.decodeIfPresent(Bool.self, forKey: .isSuperuser) + parent = try container.decodeIfPresent(UUID.self, forKey: .parent) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser) + try container.encodeIfPresent(parent, forKey: .parent) + try container.encodeIfPresent(attributes, forKey: .attributes) + } +} diff --git a/authentikClient/Sources/Models/UserLoginChallenge.swift b/authentikClient/Sources/Models/UserLoginChallenge.swift new file mode 100644 index 0000000..167b40d --- /dev/null +++ b/authentikClient/Sources/Models/UserLoginChallenge.swift @@ -0,0 +1,56 @@ +// +// UserLoginChallenge.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Empty challenge +public struct UserLoginChallenge: Codable { + public var type: ChallengeChoices + public var flowInfo: ContextualFlowInfo? + public var component: String? = "ak-stage-user-login" + public var responseErrors: [String: [ErrorDetail]]? + public var pendingUser: String + public var pendingUserAvatar: String + + public init(type: ChallengeChoices, flowInfo: ContextualFlowInfo? = nil, component: String? = "ak-stage-user-login", responseErrors: [String: [ErrorDetail]]? = nil, pendingUser: String, pendingUserAvatar: String) { + self.type = type + self.flowInfo = flowInfo + self.component = component + self.responseErrors = responseErrors + self.pendingUser = pendingUser + self.pendingUserAvatar = pendingUserAvatar + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case flowInfo = "flow_info" + case component + case responseErrors = "response_errors" + case pendingUser = "pending_user" + case pendingUserAvatar = "pending_user_avatar" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + type = try container.decode(ChallengeChoices.self, forKey: .type) + flowInfo = try container.decodeIfPresent(ContextualFlowInfo.self, forKey: .flowInfo) + component = try container.decodeIfPresent(String.self, forKey: .component) + responseErrors = try container.decodeIfPresent([String: [ErrorDetail]].self, forKey: .responseErrors) + pendingUser = try container.decode(String.self, forKey: .pendingUser) + pendingUserAvatar = try container.decode(String.self, forKey: .pendingUserAvatar) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(flowInfo, forKey: .flowInfo) + try container.encodeIfPresent(component, forKey: .component) + try container.encodeIfPresent(responseErrors, forKey: .responseErrors) + try container.encode(pendingUser, forKey: .pendingUser) + try container.encode(pendingUserAvatar, forKey: .pendingUserAvatar) + } +} diff --git a/authentikClient/Sources/Models/UserLoginChallengeResponseRequest.swift b/authentikClient/Sources/Models/UserLoginChallengeResponseRequest.swift new file mode 100644 index 0000000..d2eeeb2 --- /dev/null +++ b/authentikClient/Sources/Models/UserLoginChallengeResponseRequest.swift @@ -0,0 +1,36 @@ +// +// UserLoginChallengeResponseRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User login challenge +public struct UserLoginChallengeResponseRequest: Codable { + public var component: String? = "ak-stage-user-login" + public var rememberMe: Bool + + public init(component: String? = "ak-stage-user-login", rememberMe: Bool) { + self.component = component + self.rememberMe = rememberMe + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case component + case rememberMe = "remember_me" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + component = try container.decodeIfPresent(String.self, forKey: .component) + rememberMe = try container.decode(Bool.self, forKey: .rememberMe) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(component, forKey: .component) + try container.encode(rememberMe, forKey: .rememberMe) + } +} diff --git a/authentikClient/Sources/Models/UserLoginStage.swift b/authentikClient/Sources/Models/UserLoginStage.swift new file mode 100644 index 0000000..508c9a2 --- /dev/null +++ b/authentikClient/Sources/Models/UserLoginStage.swift @@ -0,0 +1,83 @@ +// +// UserLoginStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLoginStage Serializer +public struct UserLoginStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + /// Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) + public var sessionDuration: String? + /// Terminate all other sessions of the user logging in. + public var terminateOtherSessions: Bool? + /// Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + public var rememberMeOffset: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.sessionDuration = sessionDuration + self.terminateOtherSessions = terminateOtherSessions + self.rememberMeOffset = rememberMeOffset + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case sessionDuration = "session_duration" + case terminateOtherSessions = "terminate_other_sessions" + case rememberMeOffset = "remember_me_offset" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + sessionDuration = try container.decodeIfPresent(String.self, forKey: .sessionDuration) + terminateOtherSessions = try container.decodeIfPresent(Bool.self, forKey: .terminateOtherSessions) + rememberMeOffset = try container.decodeIfPresent(String.self, forKey: .rememberMeOffset) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) + try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) + try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) + } +} diff --git a/authentikClient/Sources/Models/UserLoginStageRequest.swift b/authentikClient/Sources/Models/UserLoginStageRequest.swift new file mode 100644 index 0000000..c404f46 --- /dev/null +++ b/authentikClient/Sources/Models/UserLoginStageRequest.swift @@ -0,0 +1,54 @@ +// +// UserLoginStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLoginStage Serializer +public struct UserLoginStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + /// Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) + public var sessionDuration: String? + /// Terminate all other sessions of the user logging in. + public var terminateOtherSessions: Bool? + /// Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + public var rememberMeOffset: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, sessionDuration: String? = nil, terminateOtherSessions: Bool? = nil, rememberMeOffset: String? = nil) { + self.name = name + self.flowSet = flowSet + self.sessionDuration = sessionDuration + self.terminateOtherSessions = terminateOtherSessions + self.rememberMeOffset = rememberMeOffset + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case sessionDuration = "session_duration" + case terminateOtherSessions = "terminate_other_sessions" + case rememberMeOffset = "remember_me_offset" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + sessionDuration = try container.decodeIfPresent(String.self, forKey: .sessionDuration) + terminateOtherSessions = try container.decodeIfPresent(Bool.self, forKey: .terminateOtherSessions) + rememberMeOffset = try container.decodeIfPresent(String.self, forKey: .rememberMeOffset) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(sessionDuration, forKey: .sessionDuration) + try container.encodeIfPresent(terminateOtherSessions, forKey: .terminateOtherSessions) + try container.encodeIfPresent(rememberMeOffset, forKey: .rememberMeOffset) + } +} diff --git a/authentikClient/Sources/Models/UserLogoutStage.swift b/authentikClient/Sources/Models/UserLogoutStage.swift new file mode 100644 index 0000000..2d6c468 --- /dev/null +++ b/authentikClient/Sources/Models/UserLogoutStage.swift @@ -0,0 +1,65 @@ +// +// UserLogoutStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLogoutStage Serializer +public struct UserLogoutStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Sources/Models/UserLogoutStageRequest.swift b/authentikClient/Sources/Models/UserLogoutStageRequest.swift new file mode 100644 index 0000000..7a4ea5b --- /dev/null +++ b/authentikClient/Sources/Models/UserLogoutStageRequest.swift @@ -0,0 +1,36 @@ +// +// UserLogoutStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserLogoutStage Serializer +public struct UserLogoutStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + + public init(name: String, flowSet: [FlowSetRequest]? = nil) { + self.name = name + self.flowSet = flowSet + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + } +} diff --git a/authentikClient/Classes/OpenAPIs/Models/UserMatchingModeEnum.swift b/authentikClient/Sources/Models/UserMatchingModeEnum.swift similarity index 79% rename from authentikClient/Classes/OpenAPIs/Models/UserMatchingModeEnum.swift rename to authentikClient/Sources/Models/UserMatchingModeEnum.swift index 46b37a9..42dadb3 100644 --- a/authentikClient/Classes/OpenAPIs/Models/UserMatchingModeEnum.swift +++ b/authentikClient/Sources/Models/UserMatchingModeEnum.swift @@ -6,12 +6,9 @@ // import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -/** * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. */ -public enum UserMatchingModeEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast { +/// * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. +public enum UserMatchingModeEnum: String, Codable, CaseIterable { case identifier = "identifier" case emailLink = "email_link" case emailDeny = "email_deny" diff --git a/authentikClient/Sources/Models/UserMetrics.swift b/authentikClient/Sources/Models/UserMetrics.swift new file mode 100644 index 0000000..83de2ef --- /dev/null +++ b/authentikClient/Sources/Models/UserMetrics.swift @@ -0,0 +1,41 @@ +// +// UserMetrics.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User Metrics +public struct UserMetrics: Codable { + public var logins: [Coordinate] + public var loginsFailed: [Coordinate] + public var authorizations: [Coordinate] + + public init(logins: [Coordinate], loginsFailed: [Coordinate], authorizations: [Coordinate]) { + self.logins = logins + self.loginsFailed = loginsFailed + self.authorizations = authorizations + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case logins + case loginsFailed = "logins_failed" + case authorizations + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + logins = try container.decode([Coordinate].self, forKey: .logins) + loginsFailed = try container.decode([Coordinate].self, forKey: .loginsFailed) + authorizations = try container.decode([Coordinate].self, forKey: .authorizations) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(logins, forKey: .logins) + try container.encode(loginsFailed, forKey: .loginsFailed) + try container.encode(authorizations, forKey: .authorizations) + } +} diff --git a/authentikClient/Sources/Models/UserOAuthSourceConnection.swift b/authentikClient/Sources/Models/UserOAuthSourceConnection.swift new file mode 100644 index 0000000..fbba8e7 --- /dev/null +++ b/authentikClient/Sources/Models/UserOAuthSourceConnection.swift @@ -0,0 +1,23 @@ +// +// UserOAuthSourceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct UserOAuthSourceConnection: Codable { + public var pk: Int + public var user: Int + public var source: Source + public var identifier: String + + public init(pk: Int, user: Int, source: Source, identifier: String) { + self.pk = pk + self.user = user + self.source = source + self.identifier = identifier + } +} diff --git a/authentikClient/Sources/Models/UserOAuthSourceConnectionRequest.swift b/authentikClient/Sources/Models/UserOAuthSourceConnectionRequest.swift new file mode 100644 index 0000000..45fbca8 --- /dev/null +++ b/authentikClient/Sources/Models/UserOAuthSourceConnectionRequest.swift @@ -0,0 +1,41 @@ +// +// UserOAuthSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct UserOAuthSourceConnectionRequest: Codable { + public var user: Int + public var identifier: String + public var accessToken: String? + + public init(user: Int, identifier: String, accessToken: String? = nil) { + self.user = user + self.identifier = identifier + self.accessToken = accessToken + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case user + case identifier + case accessToken = "access_token" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + user = try container.decode(Int.self, forKey: .user) + identifier = try container.decode(String.self, forKey: .identifier) + accessToken = try container.decodeIfPresent(String.self, forKey: .accessToken) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(user, forKey: .user) + try container.encode(identifier, forKey: .identifier) + try container.encodeIfPresent(accessToken, forKey: .accessToken) + } +} diff --git a/authentikClient/Sources/Models/UserObjectPermission.swift b/authentikClient/Sources/Models/UserObjectPermission.swift new file mode 100644 index 0000000..cdc9fec --- /dev/null +++ b/authentikClient/Sources/Models/UserObjectPermission.swift @@ -0,0 +1,56 @@ +// +// UserObjectPermission.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User-bound object level permission +public struct UserObjectPermission: Codable { + public var id: Int + public var codename: String + public var model: String + public var appLabel: String + public var objectPk: String + public var name: String + + public init(id: Int, codename: String, model: String, appLabel: String, objectPk: String, name: String) { + self.id = id + self.codename = codename + self.model = model + self.appLabel = appLabel + self.objectPk = objectPk + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case codename + case model + case appLabel = "app_label" + case objectPk = "object_pk" + case name + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + id = try container.decode(Int.self, forKey: .id) + codename = try container.decode(String.self, forKey: .codename) + model = try container.decode(String.self, forKey: .model) + appLabel = try container.decode(String.self, forKey: .appLabel) + objectPk = try container.decode(String.self, forKey: .objectPk) + name = try container.decode(String.self, forKey: .name) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(codename, forKey: .codename) + try container.encode(model, forKey: .model) + try container.encode(appLabel, forKey: .appLabel) + try container.encode(objectPk, forKey: .objectPk) + try container.encode(name, forKey: .name) + } +} diff --git a/authentikClient/Sources/Models/UserPasswordSetRequest.swift b/authentikClient/Sources/Models/UserPasswordSetRequest.swift new file mode 100644 index 0000000..ba47e86 --- /dev/null +++ b/authentikClient/Sources/Models/UserPasswordSetRequest.swift @@ -0,0 +1,16 @@ +// +// UserPasswordSetRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserPasswordSetRequest: Codable { + public var password: String + + public init(password: String) { + self.password = password + } +} diff --git a/authentikClient/Sources/Models/UserPath.swift b/authentikClient/Sources/Models/UserPath.swift new file mode 100644 index 0000000..d63fc9b --- /dev/null +++ b/authentikClient/Sources/Models/UserPath.swift @@ -0,0 +1,16 @@ +// +// UserPath.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserPath: Codable { + public var paths: [String] + + public init(paths: [String]) { + self.paths = paths + } +} diff --git a/authentikClient/Sources/Models/UserRequest.swift b/authentikClient/Sources/Models/UserRequest.swift new file mode 100644 index 0000000..5be1bb8 --- /dev/null +++ b/authentikClient/Sources/Models/UserRequest.swift @@ -0,0 +1,73 @@ +// +// UserRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User Serializer +public struct UserRequest: Codable { + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool? + public var lastLogin: Date? + public var groups: [UUID]? + public var email: String? + public var attributes: [String: AnyCodable]? + public var path: String? + public var type: UserTypeEnum? + + public init(username: String, name: String, isActive: Bool? = nil, lastLogin: Date? = nil, groups: [UUID]? = nil, email: String? = nil, attributes: [String: AnyCodable]? = nil, path: String? = nil, type: UserTypeEnum? = nil) { + self.username = username + self.name = name + self.isActive = isActive + self.lastLogin = lastLogin + self.groups = groups + self.email = email + self.attributes = attributes + self.path = path + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case username + case name + case isActive = "is_active" + case lastLogin = "last_login" + case groups + case email + case attributes + case path + case type + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decodeIfPresent(Bool.self, forKey: .isActive) + lastLogin = try container.decodeIfPresent(Date.self, forKey: .lastLogin) + groups = try container.decodeIfPresent([UUID].self, forKey: .groups) + email = try container.decodeIfPresent(String.self, forKey: .email) + attributes = try container.decodeIfPresent([String: AnyCodable].self, forKey: .attributes) + path = try container.decodeIfPresent(String.self, forKey: .path) + type = try container.decodeIfPresent(UserTypeEnum.self, forKey: .type) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(isActive, forKey: .isActive) + try container.encodeIfPresent(lastLogin, forKey: .lastLogin) + try container.encodeIfPresent(groups, forKey: .groups) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(attributes, forKey: .attributes) + try container.encodeIfPresent(path, forKey: .path) + try container.encodeIfPresent(type, forKey: .type) + } +} diff --git a/authentikClient/Sources/Models/UserSAMLSourceConnection.swift b/authentikClient/Sources/Models/UserSAMLSourceConnection.swift new file mode 100644 index 0000000..249baed --- /dev/null +++ b/authentikClient/Sources/Models/UserSAMLSourceConnection.swift @@ -0,0 +1,23 @@ +// +// UserSAMLSourceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAML Source Serializer +public struct UserSAMLSourceConnection: Codable { + public var pk: Int + public var user: Int + public var source: Source + public var identifier: String + + public init(pk: Int, user: Int, source: Source, identifier: String) { + self.pk = pk + self.user = user + self.source = source + self.identifier = identifier + } +} diff --git a/authentikClient/Sources/Models/UserSAMLSourceConnectionRequest.swift b/authentikClient/Sources/Models/UserSAMLSourceConnectionRequest.swift new file mode 100644 index 0000000..eaf2831 --- /dev/null +++ b/authentikClient/Sources/Models/UserSAMLSourceConnectionRequest.swift @@ -0,0 +1,19 @@ +// +// UserSAMLSourceConnectionRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// SAML Source Serializer +public struct UserSAMLSourceConnectionRequest: Codable { + public var user: Int + public var identifier: String + + public init(user: Int, identifier: String) { + self.user = user + self.identifier = identifier + } +} diff --git a/authentikClient/Sources/Models/UserSelf.swift b/authentikClient/Sources/Models/UserSelf.swift new file mode 100644 index 0000000..4e470b4 --- /dev/null +++ b/authentikClient/Sources/Models/UserSelf.swift @@ -0,0 +1,91 @@ +// +// UserSelf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// User Serializer for information a user can retrieve about themselves +public struct UserSelf: Codable { + public var pk: Int + /// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + public var username: String + /// User's display name. + public var name: String + /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + public var isActive: Bool + public var isSuperuser: Bool + public var groups: [UserSelfGroups] + public var email: String? + public var avatar: String + public var uid: String + /// Get user settings with tenant and group settings applied + public var settings: [String: AnyCodable] + public var type: UserTypeEnum? + /// Get all system permissions assigned to the user + public var systemPermissions: [String] + + public init(pk: Int, username: String, name: String, isActive: Bool, isSuperuser: Bool, groups: [UserSelfGroups], email: String? = nil, avatar: String, uid: String, settings: [String: AnyCodable], type: UserTypeEnum? = nil, systemPermissions: [String]) { + self.pk = pk + self.username = username + self.name = name + self.isActive = isActive + self.isSuperuser = isSuperuser + self.groups = groups + self.email = email + self.avatar = avatar + self.uid = uid + self.settings = settings + self.type = type + self.systemPermissions = systemPermissions + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case username + case name + case isActive = "is_active" + case isSuperuser = "is_superuser" + case groups + case email + case avatar + case uid + case settings + case type + case systemPermissions = "system_permissions" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(Int.self, forKey: .pk) + username = try container.decode(String.self, forKey: .username) + name = try container.decode(String.self, forKey: .name) + isActive = try container.decode(Bool.self, forKey: .isActive) + isSuperuser = try container.decode(Bool.self, forKey: .isSuperuser) + groups = try container.decode([UserSelfGroups].self, forKey: .groups) + email = try container.decodeIfPresent(String.self, forKey: .email) + avatar = try container.decode(String.self, forKey: .avatar) + uid = try container.decode(String.self, forKey: .uid) + settings = try container.decode([String: AnyCodable].self, forKey: .settings) + type = try container.decodeIfPresent(UserTypeEnum.self, forKey: .type) + systemPermissions = try container.decode([String].self, forKey: .systemPermissions) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(username, forKey: .username) + try container.encode(name, forKey: .name) + try container.encode(isActive, forKey: .isActive) + try container.encode(isSuperuser, forKey: .isSuperuser) + try container.encode(groups, forKey: .groups) + try container.encodeIfPresent(email, forKey: .email) + try container.encode(avatar, forKey: .avatar) + try container.encode(uid, forKey: .uid) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(type, forKey: .type) + try container.encode(systemPermissions, forKey: .systemPermissions) + } +} diff --git a/authentikClient/Sources/Models/UserSelfGroups.swift b/authentikClient/Sources/Models/UserSelfGroups.swift new file mode 100644 index 0000000..bb94bfb --- /dev/null +++ b/authentikClient/Sources/Models/UserSelfGroups.swift @@ -0,0 +1,18 @@ +// +// UserSelfGroups.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserSelfGroups: Codable { + public var name: String + public var pk: String + + public init(name: String, pk: String) { + self.name = name + self.pk = pk + } +} diff --git a/authentikClient/Sources/Models/UserServiceAccountRequest.swift b/authentikClient/Sources/Models/UserServiceAccountRequest.swift new file mode 100644 index 0000000..5be09ec --- /dev/null +++ b/authentikClient/Sources/Models/UserServiceAccountRequest.swift @@ -0,0 +1,46 @@ +// +// UserServiceAccountRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserServiceAccountRequest: Codable { + public var name: String + public var createGroup: Bool? = false + public var expiring: Bool? = true + /// If not provided, valid for 360 days + public var expires: Date? + + public init(name: String, createGroup: Bool? = false, expiring: Bool? = true, expires: Date? = nil) { + self.name = name + self.createGroup = createGroup + self.expiring = expiring + self.expires = expires + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case createGroup = "create_group" + case expiring + case expires + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + createGroup = try container.decodeIfPresent(Bool.self, forKey: .createGroup) + expiring = try container.decodeIfPresent(Bool.self, forKey: .expiring) + expires = try container.decodeIfPresent(Date.self, forKey: .expires) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(createGroup, forKey: .createGroup) + try container.encodeIfPresent(expiring, forKey: .expiring) + try container.encodeIfPresent(expires, forKey: .expires) + } +} diff --git a/authentikClient/Sources/Models/UserServiceAccountResponse.swift b/authentikClient/Sources/Models/UserServiceAccountResponse.swift new file mode 100644 index 0000000..83711a4 --- /dev/null +++ b/authentikClient/Sources/Models/UserServiceAccountResponse.swift @@ -0,0 +1,50 @@ +// +// UserServiceAccountResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserServiceAccountResponse: Codable { + public var username: String + public var token: String + public var userUid: String + public var userPk: Int + public var groupPk: String? + + public init(username: String, token: String, userUid: String, userPk: Int, groupPk: String? = nil) { + self.username = username + self.token = token + self.userUid = userUid + self.userPk = userPk + self.groupPk = groupPk + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case username + case token + case userUid = "user_uid" + case userPk = "user_pk" + case groupPk = "group_pk" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + username = try container.decode(String.self, forKey: .username) + token = try container.decode(String.self, forKey: .token) + userUid = try container.decode(String.self, forKey: .userUid) + userPk = try container.decode(Int.self, forKey: .userPk) + groupPk = try container.decodeIfPresent(String.self, forKey: .groupPk) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(username, forKey: .username) + try container.encode(token, forKey: .token) + try container.encode(userUid, forKey: .userUid) + try container.encode(userPk, forKey: .userPk) + try container.encodeIfPresent(groupPk, forKey: .groupPk) + } +} diff --git a/authentikClient/Sources/Models/UserSetting.swift b/authentikClient/Sources/Models/UserSetting.swift new file mode 100644 index 0000000..2743c0b --- /dev/null +++ b/authentikClient/Sources/Models/UserSetting.swift @@ -0,0 +1,51 @@ +// +// UserSetting.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for User settings for stages and sources +public struct UserSetting: Codable { + public var objectUid: String + public var component: String + public var title: String + public var configureUrl: String? + public var iconUrl: String? + + public init(objectUid: String, component: String, title: String, configureUrl: String? = nil, iconUrl: String? = nil) { + self.objectUid = objectUid + self.component = component + self.title = title + self.configureUrl = configureUrl + self.iconUrl = iconUrl + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case objectUid = "object_uid" + case component + case title + case configureUrl = "configure_url" + case iconUrl = "icon_url" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + objectUid = try container.decode(String.self, forKey: .objectUid) + component = try container.decode(String.self, forKey: .component) + title = try container.decode(String.self, forKey: .title) + configureUrl = try container.decodeIfPresent(String.self, forKey: .configureUrl) + iconUrl = try container.decodeIfPresent(String.self, forKey: .iconUrl) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(objectUid, forKey: .objectUid) + try container.encode(component, forKey: .component) + try container.encode(title, forKey: .title) + try container.encodeIfPresent(configureUrl, forKey: .configureUrl) + try container.encodeIfPresent(iconUrl, forKey: .iconUrl) + } +} diff --git a/authentikClient/Sources/Models/UserSourceConnection.swift b/authentikClient/Sources/Models/UserSourceConnection.swift new file mode 100644 index 0000000..e553bd3 --- /dev/null +++ b/authentikClient/Sources/Models/UserSourceConnection.swift @@ -0,0 +1,23 @@ +// +// UserSourceConnection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// OAuth Source Serializer +public struct UserSourceConnection: Codable { + public var pk: Int + public var user: Int + public var source: Source + public var created: Date + + public init(pk: Int, user: Int, source: Source, created: Date) { + self.pk = pk + self.user = user + self.source = source + self.created = created + } +} diff --git a/authentikClient/Sources/Models/UserTypeEnum.swift b/authentikClient/Sources/Models/UserTypeEnum.swift new file mode 100644 index 0000000..91df150 --- /dev/null +++ b/authentikClient/Sources/Models/UserTypeEnum.swift @@ -0,0 +1,17 @@ +// +// UserTypeEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account +public enum UserTypeEnum: String, Codable, CaseIterable { + case _internal = "internal" + case external = "external" + case serviceAccount = "service_account" + case internalServiceAccount = "internal_service_account" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/UserVerificationEnum.swift b/authentikClient/Sources/Models/UserVerificationEnum.swift new file mode 100644 index 0000000..159d00d --- /dev/null +++ b/authentikClient/Sources/Models/UserVerificationEnum.swift @@ -0,0 +1,16 @@ +// +// UserVerificationEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged +public enum UserVerificationEnum: String, Codable, CaseIterable { + case _required = "required" + case preferred = "preferred" + case discouraged = "discouraged" + case unknownDefaultOpenApi = "unknown_default_open_api" +} diff --git a/authentikClient/Sources/Models/UserWriteStage.swift b/authentikClient/Sources/Models/UserWriteStage.swift new file mode 100644 index 0000000..e95db03 --- /dev/null +++ b/authentikClient/Sources/Models/UserWriteStage.swift @@ -0,0 +1,92 @@ +// +// UserWriteStage.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserWriteStage Serializer +public struct UserWriteStage: Codable { + public var pk: UUID + public var name: String + /// Get object type so that we know how to edit the object + public var component: String + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var flowSet: [FlowSet]? + public var userCreationMode: UserCreationModeEnum? + /// When set, newly created users are inactive and cannot login. + public var createUsersAsInactive: Bool? + /// Optionally add newly created users to this group. + public var createUsersGroup: UUID? + public var userType: UserTypeEnum? + public var userPathTemplate: String? + + public init(pk: UUID, name: String, component: String, verboseName: String, verboseNamePlural: String, metaModelName: String, flowSet: [FlowSet]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { + self.pk = pk + self.name = name + self.component = component + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.flowSet = flowSet + self.userCreationMode = userCreationMode + self.createUsersAsInactive = createUsersAsInactive + self.createUsersGroup = createUsersGroup + self.userType = userType + self.userPathTemplate = userPathTemplate + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case pk + case name + case component + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case flowSet = "flow_set" + case userCreationMode = "user_creation_mode" + case createUsersAsInactive = "create_users_as_inactive" + case createUsersGroup = "create_users_group" + case userType = "user_type" + case userPathTemplate = "user_path_template" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + pk = try container.decode(UUID.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + component = try container.decode(String.self, forKey: .component) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + flowSet = try container.decodeIfPresent([FlowSet].self, forKey: .flowSet) + userCreationMode = try container.decodeIfPresent(UserCreationModeEnum.self, forKey: .userCreationMode) + createUsersAsInactive = try container.decodeIfPresent(Bool.self, forKey: .createUsersAsInactive) + createUsersGroup = try container.decodeIfPresent(UUID.self, forKey: .createUsersGroup) + userType = try container.decodeIfPresent(UserTypeEnum.self, forKey: .userType) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(component, forKey: .component) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) + try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) + try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) + try container.encodeIfPresent(userType, forKey: .userType) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + } +} diff --git a/authentikClient/Sources/Models/UserWriteStageRequest.swift b/authentikClient/Sources/Models/UserWriteStageRequest.swift new file mode 100644 index 0000000..c275c4a --- /dev/null +++ b/authentikClient/Sources/Models/UserWriteStageRequest.swift @@ -0,0 +1,63 @@ +// +// UserWriteStageRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// UserWriteStage Serializer +public struct UserWriteStageRequest: Codable { + public var name: String + public var flowSet: [FlowSetRequest]? + public var userCreationMode: UserCreationModeEnum? + /// When set, newly created users are inactive and cannot login. + public var createUsersAsInactive: Bool? + /// Optionally add newly created users to this group. + public var createUsersGroup: UUID? + public var userType: UserTypeEnum? + public var userPathTemplate: String? + + public init(name: String, flowSet: [FlowSetRequest]? = nil, userCreationMode: UserCreationModeEnum? = nil, createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, userType: UserTypeEnum? = nil, userPathTemplate: String? = nil) { + self.name = name + self.flowSet = flowSet + self.userCreationMode = userCreationMode + self.createUsersAsInactive = createUsersAsInactive + self.createUsersGroup = createUsersGroup + self.userType = userType + self.userPathTemplate = userPathTemplate + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case flowSet = "flow_set" + case userCreationMode = "user_creation_mode" + case createUsersAsInactive = "create_users_as_inactive" + case createUsersGroup = "create_users_group" + case userType = "user_type" + case userPathTemplate = "user_path_template" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + flowSet = try container.decodeIfPresent([FlowSetRequest].self, forKey: .flowSet) + userCreationMode = try container.decodeIfPresent(UserCreationModeEnum.self, forKey: .userCreationMode) + createUsersAsInactive = try container.decodeIfPresent(Bool.self, forKey: .createUsersAsInactive) + createUsersGroup = try container.decodeIfPresent(UUID.self, forKey: .createUsersGroup) + userType = try container.decodeIfPresent(UserTypeEnum.self, forKey: .userType) + userPathTemplate = try container.decodeIfPresent(String.self, forKey: .userPathTemplate) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(flowSet, forKey: .flowSet) + try container.encodeIfPresent(userCreationMode, forKey: .userCreationMode) + try container.encodeIfPresent(createUsersAsInactive, forKey: .createUsersAsInactive) + try container.encodeIfPresent(createUsersGroup, forKey: .createUsersGroup) + try container.encodeIfPresent(userType, forKey: .userType) + try container.encodeIfPresent(userPathTemplate, forKey: .userPathTemplate) + } +} diff --git a/authentikClient/Sources/Models/ValidationError.swift b/authentikClient/Sources/Models/ValidationError.swift new file mode 100644 index 0000000..a4a002b --- /dev/null +++ b/authentikClient/Sources/Models/ValidationError.swift @@ -0,0 +1,36 @@ +// +// ValidationError.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Validation Error +public struct ValidationError: Codable { + public var nonFieldErrors: [String]? + public var code: String? + + public init(nonFieldErrors: [String]? = nil, code: String? = nil) { + self.nonFieldErrors = nonFieldErrors + self.code = code + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case nonFieldErrors = "non_field_errors" + case code + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + nonFieldErrors = try container.decodeIfPresent([String].self, forKey: .nonFieldErrors) + code = try container.decodeIfPresent(String.self, forKey: .code) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(nonFieldErrors, forKey: .nonFieldErrors) + try container.encodeIfPresent(code, forKey: .code) + } +} diff --git a/authentikClient/Sources/Models/Version.swift b/authentikClient/Sources/Models/Version.swift new file mode 100644 index 0000000..85b59d3 --- /dev/null +++ b/authentikClient/Sources/Models/Version.swift @@ -0,0 +1,50 @@ +// +// Version.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Get running and latest version. +public struct Version: Codable { + /// Get current version + public var versionCurrent: String + /// Get latest version from cache + public var versionLatest: String + /// Get build hash, if version is not latest or released + public var buildHash: String + /// Check if we're running the latest version + public var outdated: Bool + + public init(versionCurrent: String, versionLatest: String, buildHash: String, outdated: Bool) { + self.versionCurrent = versionCurrent + self.versionLatest = versionLatest + self.buildHash = buildHash + self.outdated = outdated + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case versionCurrent = "version_current" + case versionLatest = "version_latest" + case buildHash = "build_hash" + case outdated + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + versionCurrent = try container.decode(String.self, forKey: .versionCurrent) + versionLatest = try container.decode(String.self, forKey: .versionLatest) + buildHash = try container.decode(String.self, forKey: .buildHash) + outdated = try container.decode(Bool.self, forKey: .outdated) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(versionCurrent, forKey: .versionCurrent) + try container.encode(versionLatest, forKey: .versionLatest) + try container.encode(buildHash, forKey: .buildHash) + try container.encode(outdated, forKey: .outdated) + } +} diff --git a/authentikClient/Sources/Models/WebAuthnDevice.swift b/authentikClient/Sources/Models/WebAuthnDevice.swift new file mode 100644 index 0000000..4b4c4f3 --- /dev/null +++ b/authentikClient/Sources/Models/WebAuthnDevice.swift @@ -0,0 +1,65 @@ +// +// WebAuthnDevice.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for WebAuthn authenticator devices +public struct WebAuthnDevice: Codable { + /// Return object's verbose_name + public var verboseName: String + /// Return object's plural verbose_name + public var verboseNamePlural: String + /// Return internal model name + public var metaModelName: String + public var pk: String + public var name: String + /// Get type of device + public var type: String + public var confirmed: Bool + + public init(verboseName: String, verboseNamePlural: String, metaModelName: String, pk: String, name: String, type: String, confirmed: Bool) { + self.verboseName = verboseName + self.verboseNamePlural = verboseNamePlural + self.metaModelName = metaModelName + self.pk = pk + self.name = name + self.type = type + self.confirmed = confirmed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case verboseName = "verbose_name" + case verboseNamePlural = "verbose_name_plural" + case metaModelName = "meta_model_name" + case pk + case name + case type + case confirmed + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + verboseName = try container.decode(String.self, forKey: .verboseName) + verboseNamePlural = try container.decode(String.self, forKey: .verboseNamePlural) + metaModelName = try container.decode(String.self, forKey: .metaModelName) + pk = try container.decode(String.self, forKey: .pk) + name = try container.decode(String.self, forKey: .name) + type = try container.decode(String.self, forKey: .type) + confirmed = try container.decode(Bool.self, forKey: .confirmed) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(verboseName, forKey: .verboseName) + try container.encode(verboseNamePlural, forKey: .verboseNamePlural) + try container.encode(metaModelName, forKey: .metaModelName) + try container.encode(pk, forKey: .pk) + try container.encode(name, forKey: .name) + try container.encode(type, forKey: .type) + try container.encode(confirmed, forKey: .confirmed) + } +} diff --git a/authentikClient/Sources/Models/WebAuthnDeviceRequest.swift b/authentikClient/Sources/Models/WebAuthnDeviceRequest.swift new file mode 100644 index 0000000..453c209 --- /dev/null +++ b/authentikClient/Sources/Models/WebAuthnDeviceRequest.swift @@ -0,0 +1,19 @@ +// +// WebAuthnDeviceRequest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/// Serializer for WebAuthn authenticator devices +public struct WebAuthnDeviceRequest: Codable { + public var pk: String + public var name: String + + public init(pk: String, name: String) { + self.pk = pk + self.name = name + } +} diff --git a/authentikClient/Sources/Models/Workers.swift b/authentikClient/Sources/Models/Workers.swift new file mode 100644 index 0000000..dd37b56 --- /dev/null +++ b/authentikClient/Sources/Models/Workers.swift @@ -0,0 +1,16 @@ +// +// Workers.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Workers: Codable { + public var count: Int + + public init(count: Int) { + self.count = count + } +} diff --git a/authentikClient/Sources/Private/AnyDecodable.swift b/authentikClient/Sources/Private/AnyDecodable.swift new file mode 100644 index 0000000..0897aa8 --- /dev/null +++ b/authentikClient/Sources/Private/AnyDecodable.swift @@ -0,0 +1,117 @@ +// AnyDecodable.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension KeyedDecodingContainer { + func decode(_ type: Dictionary.Type, forKey key: K) throws -> Dictionary { + let container = try self.nestedContainer(keyedBy: AnyCodingKeys.self, forKey: key) + return try container.decode(type) + } + + func decodeIfPresent(_ type: Dictionary.Type, forKey key: K) throws -> Dictionary? { + if contains(key) { + return try decode(type, forKey: key) + } + return nil + } + + func decode(_ type: Array.Type, forKey key: K) throws -> Array { + var container = try self.nestedUnkeyedContainer(forKey: key) + return try container.decode(type) + } + + func decodeIfPresent(_ type: Array.Type, forKey key: K) throws -> Array? { + if contains(key) { + return try decode(type, forKey: key) + } + return nil + } + + func decode(_ type: Dictionary>.Type, forKey key: K) throws -> Dictionary> { + let container = try self.nestedContainer(keyedBy: AnyCodingKeys.self, forKey: key) + return try container.decode(type) + } + + func decodeIfPresent(_ type: Dictionary>.Type, forKey key: K) throws -> Dictionary>? { + if contains(key) { + return try decode(type, forKey: key) + } + return nil + } + + func decode(_ type: Dictionary.Type) throws -> Dictionary { + var dictionary = Dictionary() + + for key in allKeys { + if let boolValue = try? decode(Bool.self, forKey: key) { + dictionary[key.stringValue] = boolValue + } else if let stringValue = try? decode(String.self, forKey: key) { + dictionary[key.stringValue] = stringValue + } else if let intValue = try? decode(Int.self, forKey: key) { + dictionary[key.stringValue] = intValue + } else if let doubleValue = try? decode(Double.self, forKey: key) { + dictionary[key.stringValue] = doubleValue + } else if let nestedDictionary = try? decode(Dictionary.self, forKey: key) { + dictionary[key.stringValue] = nestedDictionary + } else if let nestedArray = try? decode(Array.self, forKey: key) { + dictionary[key.stringValue] = nestedArray + } + } + return dictionary + } + + func decode(_ type: Dictionary>.Type) throws -> Dictionary> { + var dictionary = Dictionary>() + + for key in allKeys { + if let nestedDictionary = try? decode(Dictionary.self, forKey: key) { + dictionary[key.stringValue] = nestedDictionary + } + } + return dictionary + } +} + +extension UnkeyedDecodingContainer { + mutating func decode(_ type: Array.Type) throws -> Array { + var array: [Any] = [] + while isAtEnd == false { + if let value = try? decode(Bool.self) { + array.append(value) + } else if let value = try? decode(Double.self) { + array.append(value) + } else if let value = try? decode(String.self) { + array.append(value) + } else if let nestedDictionary = try? decode(Dictionary.self) { + array.append(nestedDictionary) + } else if let nestedArray = try? decode(Array.self) { + array.append(nestedArray) + } + } + return array + } + + mutating func decode(_ type: Dictionary.Type) throws -> Dictionary { + let nestedContainer = try self.nestedContainer(keyedBy: AnyCodingKeys.self) + return try nestedContainer.decode(type) + } +} + +private struct AnyCodingKeys: CodingKey { + var stringValue: String + + init(stringValue: String) { + self.stringValue = stringValue + } + + var intValue: Int? + + init?(intValue: Int) { + self.init(stringValue: "\(intValue)") + self.intValue = intValue + } +} diff --git a/authentikClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/authentikClient/Sources/Private/OpenISO8601DateFormatter.swift similarity index 87% rename from authentikClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift rename to authentikClient/Sources/Private/OpenISO8601DateFormatter.swift index e062080..f6a6fc8 100644 --- a/authentikClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift +++ b/authentikClient/Sources/Private/OpenISO8601DateFormatter.swift @@ -8,7 +8,7 @@ import Foundation // https://stackoverflow.com/a/50281094/976628 -public class OpenISO8601DateFormatter: DateFormatter { +class OpenISO8601DateFormatter: DateFormatter { static let withoutSeconds: DateFormatter = { let formatter = DateFormatter() formatter.calendar = Calendar(identifier: .iso8601) @@ -25,6 +25,8 @@ public class OpenISO8601DateFormatter: DateFormatter { dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" } + static var shared = OpenISO8601DateFormatter() + override init() { super.init() setup() @@ -35,7 +37,7 @@ public class OpenISO8601DateFormatter: DateFormatter { setup() } - override public func date(from string: String) -> Date? { + override func date(from string: String) -> Date? { if let result = super.date(from: string) { return result } diff --git a/config.yaml b/config.yaml index 8abfc5f..b240f1c 100644 --- a/config.yaml +++ b/config.yaml @@ -10,3 +10,18 @@ files: README.mustache: templateType: SupportingFiles destinationFilename: README.md +enumNameMappings: + 2000/09/xmldsig#sha1: _2000_09_xmldsig_sha1 + 2001/04/xmldsig-more#sha384: _2001_04_xmldsig_more_sha384 + 2001/04/xmlenc#sha256: _2001_04_xmlenc_sha256 + 2001/04/xmlenc#sha512: _2001_04_xmlenc_sha512 + 1.1:nameid-format:emailAddress: _1_1_nameid_format_emailAddress + 2.0:nameid-format:persistent: _2_0_nameid_format_persistent + 2.0:nameid-format:X509SubjectName: _2_0_nameid_format_X509SubjectName + 2.0:nameid-format:WindowsDomainQualifiedName: _2_0_nameid_format_WindowsDomainQualifiedName + 2.0:nameid-format:transient: _2_0_nameid_format_transient + 2000/09/xmldsig#rsa-sha1: _2000_09_xmldsig_rsa_sha1 + 2001/04/xmldsig-more#rsa-sha256: _2001_04_xmldsig_more_rsa_sha256 + 2001/04/xmldsig-more#rsa-sha384: _2001_04_xmldsig_more_rsa_sha384 + 2001/04/xmldsig-more#rsa-sha512: _2001_04_xmldsig_more_rsa_sha512 + 2000/09/xmldsig#dsa-sha1: _2000_09_xmldsig_dsa_sha1 diff --git a/docs/AccessDeniedChallenge.md b/docs/AccessDeniedChallenge.md deleted file mode 100644 index 579643a..0000000 --- a/docs/AccessDeniedChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AccessDeniedChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-access-denied"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**errorMessage** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AdminAPI.md b/docs/AdminAPI.md deleted file mode 100644 index 013a6cb..0000000 --- a/docs/AdminAPI.md +++ /dev/null @@ -1,476 +0,0 @@ -# AdminAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**adminAppsList**](AdminAPI.md#adminappslist) | **GET** /admin/apps/ | -[**adminMetricsRetrieve**](AdminAPI.md#adminmetricsretrieve) | **GET** /admin/metrics/ | -[**adminModelsList**](AdminAPI.md#adminmodelslist) | **GET** /admin/models/ | -[**adminSystemCreate**](AdminAPI.md#adminsystemcreate) | **POST** /admin/system/ | -[**adminSystemRetrieve**](AdminAPI.md#adminsystemretrieve) | **GET** /admin/system/ | -[**adminSystemTasksList**](AdminAPI.md#adminsystemtaskslist) | **GET** /admin/system_tasks/ | -[**adminSystemTasksRetrieve**](AdminAPI.md#adminsystemtasksretrieve) | **GET** /admin/system_tasks/{id}/ | -[**adminSystemTasksRetryCreate**](AdminAPI.md#adminsystemtasksretrycreate) | **POST** /admin/system_tasks/{id}/retry/ | -[**adminVersionRetrieve**](AdminAPI.md#adminversionretrieve) | **GET** /admin/version/ | -[**adminWorkersRetrieve**](AdminAPI.md#adminworkersretrieve) | **GET** /admin/workers/ | - - -# **adminAppsList** -```swift - open class func adminAppsList(completion: @escaping (_ data: [App]?, _ error: Error?) -> Void) -``` - - - -Read-only view list all installed apps - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminAppsList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[App]**](App.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminMetricsRetrieve** -```swift - open class func adminMetricsRetrieve(completion: @escaping (_ data: LoginMetrics?, _ error: Error?) -> Void) -``` - - - -Login Metrics per 1h - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminMetricsRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**LoginMetrics**](LoginMetrics.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminModelsList** -```swift - open class func adminModelsList(completion: @escaping (_ data: [App]?, _ error: Error?) -> Void) -``` - - - -Read-only view list all installed models - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminModelsList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[App]**](App.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminSystemCreate** -```swift - open class func adminSystemCreate(completion: @escaping (_ data: SystemInfo?, _ error: Error?) -> Void) -``` - - - -Get system information. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminSystemCreate() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SystemInfo**](SystemInfo.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminSystemRetrieve** -```swift - open class func adminSystemRetrieve(completion: @escaping (_ data: SystemInfo?, _ error: Error?) -> Void) -``` - - - -Get system information. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminSystemRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SystemInfo**](SystemInfo.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminSystemTasksList** -```swift - open class func adminSystemTasksList(completion: @escaping (_ data: [Task]?, _ error: Error?) -> Void) -``` - - - -List system tasks - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminSystemTasksList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[Task]**](Task.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminSystemTasksRetrieve** -```swift - open class func adminSystemTasksRetrieve(id: String, completion: @escaping (_ data: Task?, _ error: Error?) -> Void) -``` - - - -Get a single system task - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = "id_example" // String | - -AdminAPI.adminSystemTasksRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String** | | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminSystemTasksRetryCreate** -```swift - open class func adminSystemTasksRetryCreate(id: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Retry task - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = "id_example" // String | - -AdminAPI.adminSystemTasksRetryCreate(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminVersionRetrieve** -```swift - open class func adminVersionRetrieve(completion: @escaping (_ data: Version?, _ error: Error?) -> Void) -``` - - - -Get running and latest version. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminVersionRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **adminWorkersRetrieve** -```swift - open class func adminWorkersRetrieve(completion: @escaping (_ data: Workers?, _ error: Error?) -> Void) -``` - - - -Get currently connected worker count. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AdminAPI.adminWorkersRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Workers**](Workers.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/App.md b/docs/App.md deleted file mode 100644 index 44f1251..0000000 --- a/docs/App.md +++ /dev/null @@ -1,11 +0,0 @@ -# App - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**label** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AppEnum.md b/docs/AppEnum.md deleted file mode 100644 index 6687e4b..0000000 --- a/docs/AppEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# AppEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AppleChallengeResponseRequest.md b/docs/AppleChallengeResponseRequest.md deleted file mode 100644 index 17d504b..0000000 --- a/docs/AppleChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AppleChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-source-oauth-apple"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AppleLoginChallenge.md b/docs/AppleLoginChallenge.md deleted file mode 100644 index c9f49f3..0000000 --- a/docs/AppleLoginChallenge.md +++ /dev/null @@ -1,17 +0,0 @@ -# AppleLoginChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-source-oauth-apple"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**clientId** | **String** | | -**scope** | **String** | | -**redirectUri** | **String** | | -**state** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Application.md b/docs/Application.md deleted file mode 100644 index 53f83b6..0000000 --- a/docs/Application.md +++ /dev/null @@ -1,24 +0,0 @@ -# Application - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Application's display Name. | -**slug** | **String** | Internal application name, used in URLs. | -**provider** | **Int** | | [optional] -**providerObj** | [**Provider**](Provider.md) | | [readonly] -**backchannelProviders** | **[Int]** | | [optional] -**backchannelProvidersObj** | [Provider] | | [readonly] -**launchUrl** | **String** | Allow formatting of launch URL | [readonly] -**openInNewTab** | **Bool** | Open launch URL in a new browser tab or window. | [optional] -**metaLaunchUrl** | **String** | | [optional] -**metaIcon** | **String** | Get the URL to the App Icon image. If the name is /static or starts with http it is returned as-is | [readonly] -**metaDescription** | **String** | | [optional] -**metaPublisher** | **String** | | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**group** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ApplicationRequest.md b/docs/ApplicationRequest.md deleted file mode 100644 index ba4b802..0000000 --- a/docs/ApplicationRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ApplicationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Application's display Name. | -**slug** | **String** | Internal application name, used in URLs. | -**provider** | **Int** | | [optional] -**backchannelProviders** | **[Int]** | | [optional] -**openInNewTab** | **Bool** | Open launch URL in a new browser tab or window. | [optional] -**metaLaunchUrl** | **String** | | [optional] -**metaDescription** | **String** | | [optional] -**metaPublisher** | **String** | | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**group** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthTypeEnum.md b/docs/AuthTypeEnum.md deleted file mode 100644 index 0fac2e3..0000000 --- a/docs/AuthTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# AuthTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticateWebAuthnStage.md b/docs/AuthenticateWebAuthnStage.md deleted file mode 100644 index a1c36d6..0000000 --- a/docs/AuthenticateWebAuthnStage.md +++ /dev/null @@ -1,21 +0,0 @@ -# AuthenticateWebAuthnStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**userVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] -**authenticatorAttachment** | [**AuthenticatorAttachmentEnum**](AuthenticatorAttachmentEnum.md) | | [optional] -**residentKeyRequirement** | [**ResidentKeyRequirementEnum**](ResidentKeyRequirementEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticateWebAuthnStageRequest.md b/docs/AuthenticateWebAuthnStageRequest.md deleted file mode 100644 index a52b94e..0000000 --- a/docs/AuthenticateWebAuthnStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticateWebAuthnStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**userVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] -**authenticatorAttachment** | [**AuthenticatorAttachmentEnum**](AuthenticatorAttachmentEnum.md) | | [optional] -**residentKeyRequirement** | [**ResidentKeyRequirementEnum**](ResidentKeyRequirementEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSession.md b/docs/AuthenticatedSession.md deleted file mode 100644 index e1d8657..0000000 --- a/docs/AuthenticatedSession.md +++ /dev/null @@ -1,18 +0,0 @@ -# AuthenticatedSession - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**current** | **Bool** | Check if session is currently active session | [readonly] -**userAgent** | [**AuthenticatedSessionUserAgent**](AuthenticatedSessionUserAgent.md) | | -**geoIp** | [**AuthenticatedSessionGeoIp**](AuthenticatedSessionGeoIp.md) | | -**user** | **Int** | | -**lastIp** | **String** | | -**lastUserAgent** | **String** | | [optional] -**lastUsed** | **Date** | | [readonly] -**expires** | **Date** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSessionGeoIp.md b/docs/AuthenticatedSessionGeoIp.md deleted file mode 100644 index afc7680..0000000 --- a/docs/AuthenticatedSessionGeoIp.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedSessionGeoIp - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**continent** | **String** | | -**country** | **String** | | -**lat** | **Double** | | -**long** | **Double** | | -**city** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSessionUserAgent.md b/docs/AuthenticatedSessionUserAgent.md deleted file mode 100644 index 4200db1..0000000 --- a/docs/AuthenticatedSessionUserAgent.md +++ /dev/null @@ -1,13 +0,0 @@ -# AuthenticatedSessionUserAgent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**device** | [**AuthenticatedSessionUserAgentDevice**](AuthenticatedSessionUserAgentDevice.md) | | -**os** | [**AuthenticatedSessionUserAgentOs**](AuthenticatedSessionUserAgentOs.md) | | -**userAgent** | [**AuthenticatedSessionUserAgentUserAgent**](AuthenticatedSessionUserAgentUserAgent.md) | | -**string** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSessionUserAgentDevice.md b/docs/AuthenticatedSessionUserAgentDevice.md deleted file mode 100644 index 76ba32c..0000000 --- a/docs/AuthenticatedSessionUserAgentDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# AuthenticatedSessionUserAgentDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**brand** | **String** | | -**family** | **String** | | -**model** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSessionUserAgentOs.md b/docs/AuthenticatedSessionUserAgentOs.md deleted file mode 100644 index d877174..0000000 --- a/docs/AuthenticatedSessionUserAgentOs.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedSessionUserAgentOs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**family** | **String** | | -**major** | **String** | | -**minor** | **String** | | -**patch** | **String** | | -**patchMinor** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatedSessionUserAgentUserAgent.md b/docs/AuthenticatedSessionUserAgentUserAgent.md deleted file mode 100644 index ed6ed44..0000000 --- a/docs/AuthenticatedSessionUserAgentUserAgent.md +++ /dev/null @@ -1,13 +0,0 @@ -# AuthenticatedSessionUserAgentUserAgent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**family** | **String** | | -**major** | **String** | | -**minor** | **String** | | -**patch** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticationEnum.md b/docs/AuthenticationEnum.md deleted file mode 100644 index 547a934..0000000 --- a/docs/AuthenticationEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# AuthenticationEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorAttachmentEnum.md b/docs/AuthenticatorAttachmentEnum.md deleted file mode 100644 index d746ce5..0000000 --- a/docs/AuthenticatorAttachmentEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# AuthenticatorAttachmentEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoChallenge.md b/docs/AuthenticatorDuoChallenge.md deleted file mode 100644 index bc2d584..0000000 --- a/docs/AuthenticatorDuoChallenge.md +++ /dev/null @@ -1,18 +0,0 @@ -# AuthenticatorDuoChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-duo"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**activationBarcode** | **String** | | -**activationCode** | **String** | | -**stageUuid** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoChallengeResponseRequest.md b/docs/AuthenticatorDuoChallengeResponseRequest.md deleted file mode 100644 index 44a065b..0000000 --- a/docs/AuthenticatorDuoChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AuthenticatorDuoChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-duo"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoStage.md b/docs/AuthenticatorDuoStage.md deleted file mode 100644 index 6d710f5..0000000 --- a/docs/AuthenticatorDuoStage.md +++ /dev/null @@ -1,21 +0,0 @@ -# AuthenticatorDuoStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**clientId** | **String** | | -**apiHostname** | **String** | | -**adminIntegrationKey** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoStageDeviceImportResponse.md b/docs/AuthenticatorDuoStageDeviceImportResponse.md deleted file mode 100644 index d2fd86e..0000000 --- a/docs/AuthenticatorDuoStageDeviceImportResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticatorDuoStageDeviceImportResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**count** | **Int** | | [readonly] -**error** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoStageManualDeviceImportRequest.md b/docs/AuthenticatorDuoStageManualDeviceImportRequest.md deleted file mode 100644 index 0381738..0000000 --- a/docs/AuthenticatorDuoStageManualDeviceImportRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticatorDuoStageManualDeviceImportRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**duoUserId** | **String** | | -**username** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorDuoStageRequest.md b/docs/AuthenticatorDuoStageRequest.md deleted file mode 100644 index 73a9b0a..0000000 --- a/docs/AuthenticatorDuoStageRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# AuthenticatorDuoStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**clientId** | **String** | | -**clientSecret** | **String** | | -**apiHostname** | **String** | | -**adminIntegrationKey** | **String** | | [optional] -**adminSecretKey** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorSMSChallenge.md b/docs/AuthenticatorSMSChallenge.md deleted file mode 100644 index 1f67d33..0000000 --- a/docs/AuthenticatorSMSChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticatorSMSChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-sms"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**phoneNumberRequired** | **Bool** | | [optional] [default to true] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorSMSChallengeResponseRequest.md b/docs/AuthenticatorSMSChallengeResponseRequest.md deleted file mode 100644 index ae5adc0..0000000 --- a/docs/AuthenticatorSMSChallengeResponseRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# AuthenticatorSMSChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-sms"] -**code** | **Int** | | [optional] -**phoneNumber** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorSMSStage.md b/docs/AuthenticatorSMSStage.md deleted file mode 100644 index 8cc56f1..0000000 --- a/docs/AuthenticatorSMSStage.md +++ /dev/null @@ -1,26 +0,0 @@ -# AuthenticatorSMSStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**provider** | [**ProviderEnum**](ProviderEnum.md) | | -**fromNumber** | **String** | | -**accountSid** | **String** | | -**auth** | **String** | | -**authPassword** | **String** | | [optional] -**authType** | [**AuthTypeEnum**](AuthTypeEnum.md) | | [optional] -**verifyOnly** | **Bool** | When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. | [optional] -**mapping** | **UUID** | Optionally modify the payload being sent to custom providers. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorSMSStageRequest.md b/docs/AuthenticatorSMSStageRequest.md deleted file mode 100644 index d429c17..0000000 --- a/docs/AuthenticatorSMSStageRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# AuthenticatorSMSStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**provider** | [**ProviderEnum**](ProviderEnum.md) | | -**fromNumber** | **String** | | -**accountSid** | **String** | | -**auth** | **String** | | -**authPassword** | **String** | | [optional] -**authType** | [**AuthTypeEnum**](AuthTypeEnum.md) | | [optional] -**verifyOnly** | **Bool** | When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. | [optional] -**mapping** | **UUID** | Optionally modify the payload being sent to custom providers. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorStaticChallenge.md b/docs/AuthenticatorStaticChallenge.md deleted file mode 100644 index bc7e359..0000000 --- a/docs/AuthenticatorStaticChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticatorStaticChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-static"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**codes** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorStaticChallengeResponseRequest.md b/docs/AuthenticatorStaticChallengeResponseRequest.md deleted file mode 100644 index 1b7ba70..0000000 --- a/docs/AuthenticatorStaticChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AuthenticatorStaticChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-static"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorStaticStage.md b/docs/AuthenticatorStaticStage.md deleted file mode 100644 index c0c42a8..0000000 --- a/docs/AuthenticatorStaticStage.md +++ /dev/null @@ -1,20 +0,0 @@ -# AuthenticatorStaticStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**tokenCount** | **Int** | | [optional] -**tokenLength** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorStaticStageRequest.md b/docs/AuthenticatorStaticStageRequest.md deleted file mode 100644 index a325499..0000000 --- a/docs/AuthenticatorStaticStageRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# AuthenticatorStaticStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**tokenCount** | **Int** | | [optional] -**tokenLength** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorTOTPChallenge.md b/docs/AuthenticatorTOTPChallenge.md deleted file mode 100644 index 93fe1a5..0000000 --- a/docs/AuthenticatorTOTPChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticatorTOTPChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-totp"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**configUrl** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorTOTPChallengeResponseRequest.md b/docs/AuthenticatorTOTPChallengeResponseRequest.md deleted file mode 100644 index 2f459fa..0000000 --- a/docs/AuthenticatorTOTPChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticatorTOTPChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-totp"] -**code** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorTOTPStage.md b/docs/AuthenticatorTOTPStage.md deleted file mode 100644 index 9b2af32..0000000 --- a/docs/AuthenticatorTOTPStage.md +++ /dev/null @@ -1,19 +0,0 @@ -# AuthenticatorTOTPStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**digits** | [**DigitsEnum**](DigitsEnum.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorTOTPStageRequest.md b/docs/AuthenticatorTOTPStageRequest.md deleted file mode 100644 index 0095046..0000000 --- a/docs/AuthenticatorTOTPStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatorTOTPStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**digits** | [**DigitsEnum**](DigitsEnum.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorValidateStage.md b/docs/AuthenticatorValidateStage.md deleted file mode 100644 index cae1d14..0000000 --- a/docs/AuthenticatorValidateStage.md +++ /dev/null @@ -1,21 +0,0 @@ -# AuthenticatorValidateStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**notConfiguredAction** | [**NotConfiguredActionEnum**](NotConfiguredActionEnum.md) | | [optional] -**deviceClasses** | [DeviceClassesEnum] | Device classes which can be used to authenticate | [optional] -**configurationStages** | **[UUID]** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] -**lastAuthThreshold** | **String** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**webauthnUserVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorValidateStageRequest.md b/docs/AuthenticatorValidateStageRequest.md deleted file mode 100644 index 2a5cf40..0000000 --- a/docs/AuthenticatorValidateStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticatorValidateStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**notConfiguredAction** | [**NotConfiguredActionEnum**](NotConfiguredActionEnum.md) | | [optional] -**deviceClasses** | [DeviceClassesEnum] | Device classes which can be used to authenticate | [optional] -**configurationStages** | **[UUID]** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] -**lastAuthThreshold** | **String** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**webauthnUserVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorValidationChallenge.md b/docs/AuthenticatorValidationChallenge.md deleted file mode 100644 index a510661..0000000 --- a/docs/AuthenticatorValidationChallenge.md +++ /dev/null @@ -1,17 +0,0 @@ -# AuthenticatorValidationChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-validate"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**deviceChallenges** | [DeviceChallenge] | | -**configurationStages** | [SelectableStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorValidationChallengeResponseRequest.md b/docs/AuthenticatorValidationChallengeResponseRequest.md deleted file mode 100644 index b31ee77..0000000 --- a/docs/AuthenticatorValidationChallengeResponseRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# AuthenticatorValidationChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-validate"] -**selectedChallenge** | [**DeviceChallengeRequest**](DeviceChallengeRequest.md) | | [optional] -**selectedStage** | **String** | | [optional] -**code** | **String** | | [optional] -**webauthn** | [String: AnyCodable] | | [optional] -**duo** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorWebAuthnChallenge.md b/docs/AuthenticatorWebAuthnChallenge.md deleted file mode 100644 index bbf1b2e..0000000 --- a/docs/AuthenticatorWebAuthnChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticatorWebAuthnChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-authenticator-webauthn"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**registration** | [String: AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorWebAuthnChallengeResponseRequest.md b/docs/AuthenticatorWebAuthnChallengeResponseRequest.md deleted file mode 100644 index c071b4b..0000000 --- a/docs/AuthenticatorWebAuthnChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticatorWebAuthnChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-authenticator-webauthn"] -**response** | [String: AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorsAPI.md b/docs/AuthenticatorsAPI.md deleted file mode 100644 index 5e9057d..0000000 --- a/docs/AuthenticatorsAPI.md +++ /dev/null @@ -1,3224 +0,0 @@ -# AuthenticatorsAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**authenticatorsAdminAllList**](AuthenticatorsAPI.md#authenticatorsadminalllist) | **GET** /authenticators/admin/all/ | -[**authenticatorsAdminDuoCreate**](AuthenticatorsAPI.md#authenticatorsadminduocreate) | **POST** /authenticators/admin/duo/ | -[**authenticatorsAdminDuoDestroy**](AuthenticatorsAPI.md#authenticatorsadminduodestroy) | **DELETE** /authenticators/admin/duo/{id}/ | -[**authenticatorsAdminDuoList**](AuthenticatorsAPI.md#authenticatorsadminduolist) | **GET** /authenticators/admin/duo/ | -[**authenticatorsAdminDuoPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminduopartialupdate) | **PATCH** /authenticators/admin/duo/{id}/ | -[**authenticatorsAdminDuoRetrieve**](AuthenticatorsAPI.md#authenticatorsadminduoretrieve) | **GET** /authenticators/admin/duo/{id}/ | -[**authenticatorsAdminDuoUpdate**](AuthenticatorsAPI.md#authenticatorsadminduoupdate) | **PUT** /authenticators/admin/duo/{id}/ | -[**authenticatorsAdminSmsCreate**](AuthenticatorsAPI.md#authenticatorsadminsmscreate) | **POST** /authenticators/admin/sms/ | -[**authenticatorsAdminSmsDestroy**](AuthenticatorsAPI.md#authenticatorsadminsmsdestroy) | **DELETE** /authenticators/admin/sms/{id}/ | -[**authenticatorsAdminSmsList**](AuthenticatorsAPI.md#authenticatorsadminsmslist) | **GET** /authenticators/admin/sms/ | -[**authenticatorsAdminSmsPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminsmspartialupdate) | **PATCH** /authenticators/admin/sms/{id}/ | -[**authenticatorsAdminSmsRetrieve**](AuthenticatorsAPI.md#authenticatorsadminsmsretrieve) | **GET** /authenticators/admin/sms/{id}/ | -[**authenticatorsAdminSmsUpdate**](AuthenticatorsAPI.md#authenticatorsadminsmsupdate) | **PUT** /authenticators/admin/sms/{id}/ | -[**authenticatorsAdminStaticCreate**](AuthenticatorsAPI.md#authenticatorsadminstaticcreate) | **POST** /authenticators/admin/static/ | -[**authenticatorsAdminStaticDestroy**](AuthenticatorsAPI.md#authenticatorsadminstaticdestroy) | **DELETE** /authenticators/admin/static/{id}/ | -[**authenticatorsAdminStaticList**](AuthenticatorsAPI.md#authenticatorsadminstaticlist) | **GET** /authenticators/admin/static/ | -[**authenticatorsAdminStaticPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminstaticpartialupdate) | **PATCH** /authenticators/admin/static/{id}/ | -[**authenticatorsAdminStaticRetrieve**](AuthenticatorsAPI.md#authenticatorsadminstaticretrieve) | **GET** /authenticators/admin/static/{id}/ | -[**authenticatorsAdminStaticUpdate**](AuthenticatorsAPI.md#authenticatorsadminstaticupdate) | **PUT** /authenticators/admin/static/{id}/ | -[**authenticatorsAdminTotpCreate**](AuthenticatorsAPI.md#authenticatorsadmintotpcreate) | **POST** /authenticators/admin/totp/ | -[**authenticatorsAdminTotpDestroy**](AuthenticatorsAPI.md#authenticatorsadmintotpdestroy) | **DELETE** /authenticators/admin/totp/{id}/ | -[**authenticatorsAdminTotpList**](AuthenticatorsAPI.md#authenticatorsadmintotplist) | **GET** /authenticators/admin/totp/ | -[**authenticatorsAdminTotpPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadmintotppartialupdate) | **PATCH** /authenticators/admin/totp/{id}/ | -[**authenticatorsAdminTotpRetrieve**](AuthenticatorsAPI.md#authenticatorsadmintotpretrieve) | **GET** /authenticators/admin/totp/{id}/ | -[**authenticatorsAdminTotpUpdate**](AuthenticatorsAPI.md#authenticatorsadmintotpupdate) | **PUT** /authenticators/admin/totp/{id}/ | -[**authenticatorsAdminWebauthnCreate**](AuthenticatorsAPI.md#authenticatorsadminwebauthncreate) | **POST** /authenticators/admin/webauthn/ | -[**authenticatorsAdminWebauthnDestroy**](AuthenticatorsAPI.md#authenticatorsadminwebauthndestroy) | **DELETE** /authenticators/admin/webauthn/{id}/ | -[**authenticatorsAdminWebauthnList**](AuthenticatorsAPI.md#authenticatorsadminwebauthnlist) | **GET** /authenticators/admin/webauthn/ | -[**authenticatorsAdminWebauthnPartialUpdate**](AuthenticatorsAPI.md#authenticatorsadminwebauthnpartialupdate) | **PATCH** /authenticators/admin/webauthn/{id}/ | -[**authenticatorsAdminWebauthnRetrieve**](AuthenticatorsAPI.md#authenticatorsadminwebauthnretrieve) | **GET** /authenticators/admin/webauthn/{id}/ | -[**authenticatorsAdminWebauthnUpdate**](AuthenticatorsAPI.md#authenticatorsadminwebauthnupdate) | **PUT** /authenticators/admin/webauthn/{id}/ | -[**authenticatorsAllList**](AuthenticatorsAPI.md#authenticatorsalllist) | **GET** /authenticators/all/ | -[**authenticatorsDuoDestroy**](AuthenticatorsAPI.md#authenticatorsduodestroy) | **DELETE** /authenticators/duo/{id}/ | -[**authenticatorsDuoList**](AuthenticatorsAPI.md#authenticatorsduolist) | **GET** /authenticators/duo/ | -[**authenticatorsDuoPartialUpdate**](AuthenticatorsAPI.md#authenticatorsduopartialupdate) | **PATCH** /authenticators/duo/{id}/ | -[**authenticatorsDuoRetrieve**](AuthenticatorsAPI.md#authenticatorsduoretrieve) | **GET** /authenticators/duo/{id}/ | -[**authenticatorsDuoUpdate**](AuthenticatorsAPI.md#authenticatorsduoupdate) | **PUT** /authenticators/duo/{id}/ | -[**authenticatorsDuoUsedByList**](AuthenticatorsAPI.md#authenticatorsduousedbylist) | **GET** /authenticators/duo/{id}/used_by/ | -[**authenticatorsSmsDestroy**](AuthenticatorsAPI.md#authenticatorssmsdestroy) | **DELETE** /authenticators/sms/{id}/ | -[**authenticatorsSmsList**](AuthenticatorsAPI.md#authenticatorssmslist) | **GET** /authenticators/sms/ | -[**authenticatorsSmsPartialUpdate**](AuthenticatorsAPI.md#authenticatorssmspartialupdate) | **PATCH** /authenticators/sms/{id}/ | -[**authenticatorsSmsRetrieve**](AuthenticatorsAPI.md#authenticatorssmsretrieve) | **GET** /authenticators/sms/{id}/ | -[**authenticatorsSmsUpdate**](AuthenticatorsAPI.md#authenticatorssmsupdate) | **PUT** /authenticators/sms/{id}/ | -[**authenticatorsSmsUsedByList**](AuthenticatorsAPI.md#authenticatorssmsusedbylist) | **GET** /authenticators/sms/{id}/used_by/ | -[**authenticatorsStaticDestroy**](AuthenticatorsAPI.md#authenticatorsstaticdestroy) | **DELETE** /authenticators/static/{id}/ | -[**authenticatorsStaticList**](AuthenticatorsAPI.md#authenticatorsstaticlist) | **GET** /authenticators/static/ | -[**authenticatorsStaticPartialUpdate**](AuthenticatorsAPI.md#authenticatorsstaticpartialupdate) | **PATCH** /authenticators/static/{id}/ | -[**authenticatorsStaticRetrieve**](AuthenticatorsAPI.md#authenticatorsstaticretrieve) | **GET** /authenticators/static/{id}/ | -[**authenticatorsStaticUpdate**](AuthenticatorsAPI.md#authenticatorsstaticupdate) | **PUT** /authenticators/static/{id}/ | -[**authenticatorsStaticUsedByList**](AuthenticatorsAPI.md#authenticatorsstaticusedbylist) | **GET** /authenticators/static/{id}/used_by/ | -[**authenticatorsTotpDestroy**](AuthenticatorsAPI.md#authenticatorstotpdestroy) | **DELETE** /authenticators/totp/{id}/ | -[**authenticatorsTotpList**](AuthenticatorsAPI.md#authenticatorstotplist) | **GET** /authenticators/totp/ | -[**authenticatorsTotpPartialUpdate**](AuthenticatorsAPI.md#authenticatorstotppartialupdate) | **PATCH** /authenticators/totp/{id}/ | -[**authenticatorsTotpRetrieve**](AuthenticatorsAPI.md#authenticatorstotpretrieve) | **GET** /authenticators/totp/{id}/ | -[**authenticatorsTotpUpdate**](AuthenticatorsAPI.md#authenticatorstotpupdate) | **PUT** /authenticators/totp/{id}/ | -[**authenticatorsTotpUsedByList**](AuthenticatorsAPI.md#authenticatorstotpusedbylist) | **GET** /authenticators/totp/{id}/used_by/ | -[**authenticatorsWebauthnDestroy**](AuthenticatorsAPI.md#authenticatorswebauthndestroy) | **DELETE** /authenticators/webauthn/{id}/ | -[**authenticatorsWebauthnList**](AuthenticatorsAPI.md#authenticatorswebauthnlist) | **GET** /authenticators/webauthn/ | -[**authenticatorsWebauthnPartialUpdate**](AuthenticatorsAPI.md#authenticatorswebauthnpartialupdate) | **PATCH** /authenticators/webauthn/{id}/ | -[**authenticatorsWebauthnRetrieve**](AuthenticatorsAPI.md#authenticatorswebauthnretrieve) | **GET** /authenticators/webauthn/{id}/ | -[**authenticatorsWebauthnUpdate**](AuthenticatorsAPI.md#authenticatorswebauthnupdate) | **PUT** /authenticators/webauthn/{id}/ | -[**authenticatorsWebauthnUsedByList**](AuthenticatorsAPI.md#authenticatorswebauthnusedbylist) | **GET** /authenticators/webauthn/{id}/used_by/ | - - -# **authenticatorsAdminAllList** -```swift - open class func authenticatorsAdminAllList(user: Int? = nil, completion: @escaping (_ data: [Device]?, _ error: Error?) -> Void) -``` - - - -Get all devices for current user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let user = 987 // Int | (optional) - -AuthenticatorsAPI.authenticatorsAdminAllList(user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **Int** | | [optional] - -### Return type - -[**[Device]**](Device.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoCreate** -```swift - open class func authenticatorsAdminDuoCreate(duoDeviceRequest: DuoDeviceRequest, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let duoDeviceRequest = DuoDeviceRequest(name: "name_example") // DuoDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminDuoCreate(duoDeviceRequest: duoDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duoDeviceRequest** | [**DuoDeviceRequest**](DuoDeviceRequest.md) | | - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoDestroy** -```swift - open class func authenticatorsAdminDuoDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. - -AuthenticatorsAPI.authenticatorsAdminDuoDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoList** -```swift - open class func authenticatorsAdminDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedDuoDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsAdminDuoList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedDuoDeviceList**](PaginatedDuoDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoPartialUpdate** -```swift - open class func authenticatorsAdminDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. -let patchedDuoDeviceRequest = PatchedDuoDeviceRequest(name: "name_example") // PatchedDuoDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsAdminDuoPartialUpdate(id: id, patchedDuoDeviceRequest: patchedDuoDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - **patchedDuoDeviceRequest** | [**PatchedDuoDeviceRequest**](PatchedDuoDeviceRequest.md) | | [optional] - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoRetrieve** -```swift - open class func authenticatorsAdminDuoRetrieve(id: Int, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. - -AuthenticatorsAPI.authenticatorsAdminDuoRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminDuoUpdate** -```swift - open class func authenticatorsAdminDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. -let duoDeviceRequest = DuoDeviceRequest(name: "name_example") // DuoDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminDuoUpdate(id: id, duoDeviceRequest: duoDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - **duoDeviceRequest** | [**DuoDeviceRequest**](DuoDeviceRequest.md) | | - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsCreate** -```swift - open class func authenticatorsAdminSmsCreate(sMSDeviceRequest: SMSDeviceRequest, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sMSDeviceRequest = SMSDeviceRequest(name: "name_example") // SMSDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminSmsCreate(sMSDeviceRequest: sMSDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sMSDeviceRequest** | [**SMSDeviceRequest**](SMSDeviceRequest.md) | | - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsDestroy** -```swift - open class func authenticatorsAdminSmsDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. - -AuthenticatorsAPI.authenticatorsAdminSmsDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsList** -```swift - open class func authenticatorsAdminSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedSMSDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsAdminSmsList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedSMSDeviceList**](PaginatedSMSDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsPartialUpdate** -```swift - open class func authenticatorsAdminSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. -let patchedSMSDeviceRequest = PatchedSMSDeviceRequest(name: "name_example") // PatchedSMSDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsAdminSmsPartialUpdate(id: id, patchedSMSDeviceRequest: patchedSMSDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - **patchedSMSDeviceRequest** | [**PatchedSMSDeviceRequest**](PatchedSMSDeviceRequest.md) | | [optional] - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsRetrieve** -```swift - open class func authenticatorsAdminSmsRetrieve(id: Int, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. - -AuthenticatorsAPI.authenticatorsAdminSmsRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminSmsUpdate** -```swift - open class func authenticatorsAdminSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. -let sMSDeviceRequest = SMSDeviceRequest(name: "name_example") // SMSDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminSmsUpdate(id: id, sMSDeviceRequest: sMSDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - **sMSDeviceRequest** | [**SMSDeviceRequest**](SMSDeviceRequest.md) | | - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticCreate** -```swift - open class func authenticatorsAdminStaticCreate(staticDeviceRequest: StaticDeviceRequest, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let staticDeviceRequest = StaticDeviceRequest(name: "name_example") // StaticDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminStaticCreate(staticDeviceRequest: staticDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **staticDeviceRequest** | [**StaticDeviceRequest**](StaticDeviceRequest.md) | | - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticDestroy** -```swift - open class func authenticatorsAdminStaticDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. - -AuthenticatorsAPI.authenticatorsAdminStaticDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticList** -```swift - open class func authenticatorsAdminStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedStaticDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsAdminStaticList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedStaticDeviceList**](PaginatedStaticDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticPartialUpdate** -```swift - open class func authenticatorsAdminStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. -let patchedStaticDeviceRequest = PatchedStaticDeviceRequest(name: "name_example") // PatchedStaticDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsAdminStaticPartialUpdate(id: id, patchedStaticDeviceRequest: patchedStaticDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - **patchedStaticDeviceRequest** | [**PatchedStaticDeviceRequest**](PatchedStaticDeviceRequest.md) | | [optional] - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticRetrieve** -```swift - open class func authenticatorsAdminStaticRetrieve(id: Int, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. - -AuthenticatorsAPI.authenticatorsAdminStaticRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminStaticUpdate** -```swift - open class func authenticatorsAdminStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. -let staticDeviceRequest = StaticDeviceRequest(name: "name_example") // StaticDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminStaticUpdate(id: id, staticDeviceRequest: staticDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - **staticDeviceRequest** | [**StaticDeviceRequest**](StaticDeviceRequest.md) | | - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpCreate** -```swift - open class func authenticatorsAdminTotpCreate(tOTPDeviceRequest: TOTPDeviceRequest, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tOTPDeviceRequest = TOTPDeviceRequest(name: "name_example") // TOTPDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminTotpCreate(tOTPDeviceRequest: tOTPDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tOTPDeviceRequest** | [**TOTPDeviceRequest**](TOTPDeviceRequest.md) | | - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpDestroy** -```swift - open class func authenticatorsAdminTotpDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. - -AuthenticatorsAPI.authenticatorsAdminTotpDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpList** -```swift - open class func authenticatorsAdminTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedTOTPDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsAdminTotpList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedTOTPDeviceList**](PaginatedTOTPDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpPartialUpdate** -```swift - open class func authenticatorsAdminTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. -let patchedTOTPDeviceRequest = PatchedTOTPDeviceRequest(name: "name_example") // PatchedTOTPDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsAdminTotpPartialUpdate(id: id, patchedTOTPDeviceRequest: patchedTOTPDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - **patchedTOTPDeviceRequest** | [**PatchedTOTPDeviceRequest**](PatchedTOTPDeviceRequest.md) | | [optional] - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpRetrieve** -```swift - open class func authenticatorsAdminTotpRetrieve(id: Int, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. - -AuthenticatorsAPI.authenticatorsAdminTotpRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminTotpUpdate** -```swift - open class func authenticatorsAdminTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. -let tOTPDeviceRequest = TOTPDeviceRequest(name: "name_example") // TOTPDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminTotpUpdate(id: id, tOTPDeviceRequest: tOTPDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - **tOTPDeviceRequest** | [**TOTPDeviceRequest**](TOTPDeviceRequest.md) | | - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnCreate** -```swift - open class func authenticatorsAdminWebauthnCreate(webAuthnDeviceRequest: WebAuthnDeviceRequest, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let webAuthnDeviceRequest = WebAuthnDeviceRequest(name: "name_example") // WebAuthnDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminWebauthnCreate(webAuthnDeviceRequest: webAuthnDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **webAuthnDeviceRequest** | [**WebAuthnDeviceRequest**](WebAuthnDeviceRequest.md) | | - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnDestroy** -```swift - open class func authenticatorsAdminWebauthnDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. - -AuthenticatorsAPI.authenticatorsAdminWebauthnDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnList** -```swift - open class func authenticatorsAdminWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedWebAuthnDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsAdminWebauthnList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedWebAuthnDeviceList**](PaginatedWebAuthnDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnPartialUpdate** -```swift - open class func authenticatorsAdminWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. -let patchedWebAuthnDeviceRequest = PatchedWebAuthnDeviceRequest(name: "name_example") // PatchedWebAuthnDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsAdminWebauthnPartialUpdate(id: id, patchedWebAuthnDeviceRequest: patchedWebAuthnDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - **patchedWebAuthnDeviceRequest** | [**PatchedWebAuthnDeviceRequest**](PatchedWebAuthnDeviceRequest.md) | | [optional] - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnRetrieve** -```swift - open class func authenticatorsAdminWebauthnRetrieve(id: Int, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. - -AuthenticatorsAPI.authenticatorsAdminWebauthnRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAdminWebauthnUpdate** -```swift - open class func authenticatorsAdminWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices (for admins) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. -let webAuthnDeviceRequest = WebAuthnDeviceRequest(name: "name_example") // WebAuthnDeviceRequest | - -AuthenticatorsAPI.authenticatorsAdminWebauthnUpdate(id: id, webAuthnDeviceRequest: webAuthnDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - **webAuthnDeviceRequest** | [**WebAuthnDeviceRequest**](WebAuthnDeviceRequest.md) | | - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsAllList** -```swift - open class func authenticatorsAllList(completion: @escaping (_ data: [Device]?, _ error: Error?) -> Void) -``` - - - -Get all devices for current user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -AuthenticatorsAPI.authenticatorsAllList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[Device]**](Device.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoDestroy** -```swift - open class func authenticatorsDuoDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. - -AuthenticatorsAPI.authenticatorsDuoDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoList** -```swift - open class func authenticatorsDuoList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedDuoDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsDuoList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedDuoDeviceList**](PaginatedDuoDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoPartialUpdate** -```swift - open class func authenticatorsDuoPartialUpdate(id: Int, patchedDuoDeviceRequest: PatchedDuoDeviceRequest? = nil, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. -let patchedDuoDeviceRequest = PatchedDuoDeviceRequest(name: "name_example") // PatchedDuoDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsDuoPartialUpdate(id: id, patchedDuoDeviceRequest: patchedDuoDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - **patchedDuoDeviceRequest** | [**PatchedDuoDeviceRequest**](PatchedDuoDeviceRequest.md) | | [optional] - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoRetrieve** -```swift - open class func authenticatorsDuoRetrieve(id: Int, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. - -AuthenticatorsAPI.authenticatorsDuoRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoUpdate** -```swift - open class func authenticatorsDuoUpdate(id: Int, duoDeviceRequest: DuoDeviceRequest, completion: @escaping (_ data: DuoDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for Duo authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. -let duoDeviceRequest = DuoDeviceRequest(name: "name_example") // DuoDeviceRequest | - -AuthenticatorsAPI.authenticatorsDuoUpdate(id: id, duoDeviceRequest: duoDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - **duoDeviceRequest** | [**DuoDeviceRequest**](DuoDeviceRequest.md) | | - -### Return type - -[**DuoDevice**](DuoDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsDuoUsedByList** -```swift - open class func authenticatorsDuoUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Duo Device. - -AuthenticatorsAPI.authenticatorsDuoUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Duo Device. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsDestroy** -```swift - open class func authenticatorsSmsDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. - -AuthenticatorsAPI.authenticatorsSmsDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsList** -```swift - open class func authenticatorsSmsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedSMSDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsSmsList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedSMSDeviceList**](PaginatedSMSDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsPartialUpdate** -```swift - open class func authenticatorsSmsPartialUpdate(id: Int, patchedSMSDeviceRequest: PatchedSMSDeviceRequest? = nil, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. -let patchedSMSDeviceRequest = PatchedSMSDeviceRequest(name: "name_example") // PatchedSMSDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsSmsPartialUpdate(id: id, patchedSMSDeviceRequest: patchedSMSDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - **patchedSMSDeviceRequest** | [**PatchedSMSDeviceRequest**](PatchedSMSDeviceRequest.md) | | [optional] - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsRetrieve** -```swift - open class func authenticatorsSmsRetrieve(id: Int, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. - -AuthenticatorsAPI.authenticatorsSmsRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsUpdate** -```swift - open class func authenticatorsSmsUpdate(id: Int, sMSDeviceRequest: SMSDeviceRequest, completion: @escaping (_ data: SMSDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for sms authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. -let sMSDeviceRequest = SMSDeviceRequest(name: "name_example") // SMSDeviceRequest | - -AuthenticatorsAPI.authenticatorsSmsUpdate(id: id, sMSDeviceRequest: sMSDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - **sMSDeviceRequest** | [**SMSDeviceRequest**](SMSDeviceRequest.md) | | - -### Return type - -[**SMSDevice**](SMSDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsSmsUsedByList** -```swift - open class func authenticatorsSmsUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SMS Device. - -AuthenticatorsAPI.authenticatorsSmsUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SMS Device. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticDestroy** -```swift - open class func authenticatorsStaticDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. - -AuthenticatorsAPI.authenticatorsStaticDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticList** -```swift - open class func authenticatorsStaticList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedStaticDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsStaticList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedStaticDeviceList**](PaginatedStaticDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticPartialUpdate** -```swift - open class func authenticatorsStaticPartialUpdate(id: Int, patchedStaticDeviceRequest: PatchedStaticDeviceRequest? = nil, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. -let patchedStaticDeviceRequest = PatchedStaticDeviceRequest(name: "name_example") // PatchedStaticDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsStaticPartialUpdate(id: id, patchedStaticDeviceRequest: patchedStaticDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - **patchedStaticDeviceRequest** | [**PatchedStaticDeviceRequest**](PatchedStaticDeviceRequest.md) | | [optional] - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticRetrieve** -```swift - open class func authenticatorsStaticRetrieve(id: Int, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. - -AuthenticatorsAPI.authenticatorsStaticRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticUpdate** -```swift - open class func authenticatorsStaticUpdate(id: Int, staticDeviceRequest: StaticDeviceRequest, completion: @escaping (_ data: StaticDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for static authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. -let staticDeviceRequest = StaticDeviceRequest(name: "name_example") // StaticDeviceRequest | - -AuthenticatorsAPI.authenticatorsStaticUpdate(id: id, staticDeviceRequest: staticDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - **staticDeviceRequest** | [**StaticDeviceRequest**](StaticDeviceRequest.md) | | - -### Return type - -[**StaticDevice**](StaticDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsStaticUsedByList** -```swift - open class func authenticatorsStaticUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Static Device. - -AuthenticatorsAPI.authenticatorsStaticUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Static Device. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpDestroy** -```swift - open class func authenticatorsTotpDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. - -AuthenticatorsAPI.authenticatorsTotpDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpList** -```swift - open class func authenticatorsTotpList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedTOTPDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsTotpList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedTOTPDeviceList**](PaginatedTOTPDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpPartialUpdate** -```swift - open class func authenticatorsTotpPartialUpdate(id: Int, patchedTOTPDeviceRequest: PatchedTOTPDeviceRequest? = nil, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. -let patchedTOTPDeviceRequest = PatchedTOTPDeviceRequest(name: "name_example") // PatchedTOTPDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsTotpPartialUpdate(id: id, patchedTOTPDeviceRequest: patchedTOTPDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - **patchedTOTPDeviceRequest** | [**PatchedTOTPDeviceRequest**](PatchedTOTPDeviceRequest.md) | | [optional] - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpRetrieve** -```swift - open class func authenticatorsTotpRetrieve(id: Int, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. - -AuthenticatorsAPI.authenticatorsTotpRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpUpdate** -```swift - open class func authenticatorsTotpUpdate(id: Int, tOTPDeviceRequest: TOTPDeviceRequest, completion: @escaping (_ data: TOTPDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for totp authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. -let tOTPDeviceRequest = TOTPDeviceRequest(name: "name_example") // TOTPDeviceRequest | - -AuthenticatorsAPI.authenticatorsTotpUpdate(id: id, tOTPDeviceRequest: tOTPDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - **tOTPDeviceRequest** | [**TOTPDeviceRequest**](TOTPDeviceRequest.md) | | - -### Return type - -[**TOTPDevice**](TOTPDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsTotpUsedByList** -```swift - open class func authenticatorsTotpUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this TOTP Device. - -AuthenticatorsAPI.authenticatorsTotpUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this TOTP Device. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnDestroy** -```swift - open class func authenticatorsWebauthnDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. - -AuthenticatorsAPI.authenticatorsWebauthnDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnList** -```swift - open class func authenticatorsWebauthnList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedWebAuthnDeviceList?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -AuthenticatorsAPI.authenticatorsWebauthnList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedWebAuthnDeviceList**](PaginatedWebAuthnDeviceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnPartialUpdate** -```swift - open class func authenticatorsWebauthnPartialUpdate(id: Int, patchedWebAuthnDeviceRequest: PatchedWebAuthnDeviceRequest? = nil, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. -let patchedWebAuthnDeviceRequest = PatchedWebAuthnDeviceRequest(name: "name_example") // PatchedWebAuthnDeviceRequest | (optional) - -AuthenticatorsAPI.authenticatorsWebauthnPartialUpdate(id: id, patchedWebAuthnDeviceRequest: patchedWebAuthnDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - **patchedWebAuthnDeviceRequest** | [**PatchedWebAuthnDeviceRequest**](PatchedWebAuthnDeviceRequest.md) | | [optional] - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnRetrieve** -```swift - open class func authenticatorsWebauthnRetrieve(id: Int, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. - -AuthenticatorsAPI.authenticatorsWebauthnRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnUpdate** -```swift - open class func authenticatorsWebauthnUpdate(id: Int, webAuthnDeviceRequest: WebAuthnDeviceRequest, completion: @escaping (_ data: WebAuthnDevice?, _ error: Error?) -> Void) -``` - - - -Viewset for WebAuthn authenticator devices - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. -let webAuthnDeviceRequest = WebAuthnDeviceRequest(name: "name_example") // WebAuthnDeviceRequest | - -AuthenticatorsAPI.authenticatorsWebauthnUpdate(id: id, webAuthnDeviceRequest: webAuthnDeviceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - **webAuthnDeviceRequest** | [**WebAuthnDeviceRequest**](WebAuthnDeviceRequest.md) | | - -### Return type - -[**WebAuthnDevice**](WebAuthnDevice.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **authenticatorsWebauthnUsedByList** -```swift - open class func authenticatorsWebauthnUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this WebAuthn Device. - -AuthenticatorsAPI.authenticatorsWebauthnUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this WebAuthn Device. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AutoSubmitChallengeResponseRequest.md b/docs/AutoSubmitChallengeResponseRequest.md deleted file mode 100644 index 2dd2c84..0000000 --- a/docs/AutoSubmitChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AutoSubmitChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-autosubmit"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AutosubmitChallenge.md b/docs/AutosubmitChallenge.md deleted file mode 100644 index 3f2b9a1..0000000 --- a/docs/AutosubmitChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# AutosubmitChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-autosubmit"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**url** | **String** | | -**attrs** | **[String: String]** | | -**title** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BackendsEnum.md b/docs/BackendsEnum.md deleted file mode 100644 index ca5c896..0000000 --- a/docs/BackendsEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# BackendsEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BindingTypeEnum.md b/docs/BindingTypeEnum.md deleted file mode 100644 index a936064..0000000 --- a/docs/BindingTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# BindingTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BlueprintFile.md b/docs/BlueprintFile.md deleted file mode 100644 index 352781c..0000000 --- a/docs/BlueprintFile.md +++ /dev/null @@ -1,13 +0,0 @@ -# BlueprintFile - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **String** | | -**lastM** | **Date** | | -**hash** | **String** | | -**meta** | [**Metadata**](Metadata.md) | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BlueprintInstance.md b/docs/BlueprintInstance.md deleted file mode 100644 index 4a55ef6..0000000 --- a/docs/BlueprintInstance.md +++ /dev/null @@ -1,20 +0,0 @@ -# BlueprintInstance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**path** | **String** | | [optional] [default to ""] -**context** | [String: AnyCodable] | | [optional] -**lastApplied** | **Date** | | [readonly] -**lastAppliedHash** | **String** | | [readonly] -**status** | [**BlueprintInstanceStatusEnum**](BlueprintInstanceStatusEnum.md) | | [readonly] -**enabled** | **Bool** | | [optional] -**managedModels** | **[String]** | | [readonly] -**metadata** | [String: AnyCodable] | | [readonly] -**content** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BlueprintInstanceRequest.md b/docs/BlueprintInstanceRequest.md deleted file mode 100644 index 4eab1c7..0000000 --- a/docs/BlueprintInstanceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# BlueprintInstanceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**path** | **String** | | [optional] [default to ""] -**context** | [String: AnyCodable] | | [optional] -**enabled** | **Bool** | | [optional] -**content** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BlueprintInstanceStatusEnum.md b/docs/BlueprintInstanceStatusEnum.md deleted file mode 100644 index 9e361dc..0000000 --- a/docs/BlueprintInstanceStatusEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# BlueprintInstanceStatusEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Cache.md b/docs/Cache.md deleted file mode 100644 index be03eb7..0000000 --- a/docs/Cache.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cache - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**count** | **Int** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CapabilitiesEnum.md b/docs/CapabilitiesEnum.md deleted file mode 100644 index e4b9e67..0000000 --- a/docs/CapabilitiesEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# CapabilitiesEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CaptchaChallenge.md b/docs/CaptchaChallenge.md deleted file mode 100644 index 7e77347..0000000 --- a/docs/CaptchaChallenge.md +++ /dev/null @@ -1,17 +0,0 @@ -# CaptchaChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-captcha"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**siteKey** | **String** | | -**jsUrl** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CaptchaChallengeResponseRequest.md b/docs/CaptchaChallengeResponseRequest.md deleted file mode 100644 index 2a2a59d..0000000 --- a/docs/CaptchaChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CaptchaChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-captcha"] -**token** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CaptchaStage.md b/docs/CaptchaStage.md deleted file mode 100644 index f97ed98..0000000 --- a/docs/CaptchaStage.md +++ /dev/null @@ -1,19 +0,0 @@ -# CaptchaStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**publicKey** | **String** | Public key, acquired your captcha Provider. | -**jsUrl** | **String** | | [optional] -**apiUrl** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CaptchaStageRequest.md b/docs/CaptchaStageRequest.md deleted file mode 100644 index dd23df4..0000000 --- a/docs/CaptchaStageRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CaptchaStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**publicKey** | **String** | Public key, acquired your captcha Provider. | -**privateKey** | **String** | Private key, acquired your captcha Provider. | -**jsUrl** | **String** | | [optional] -**apiUrl** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CertificateData.md b/docs/CertificateData.md deleted file mode 100644 index 75395af..0000000 --- a/docs/CertificateData.md +++ /dev/null @@ -1,10 +0,0 @@ -# CertificateData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CertificateGenerationRequest.md b/docs/CertificateGenerationRequest.md deleted file mode 100644 index f6e656e..0000000 --- a/docs/CertificateGenerationRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CertificateGenerationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commonName** | **String** | | -**subjectAltName** | **String** | | [optional] -**validityDays** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CertificateKeyPair.md b/docs/CertificateKeyPair.md deleted file mode 100644 index 9c8ca83..0000000 --- a/docs/CertificateKeyPair.md +++ /dev/null @@ -1,20 +0,0 @@ -# CertificateKeyPair - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**fingerprintSha256** | **String** | Get certificate Hash (SHA256) | [readonly] -**fingerprintSha1** | **String** | Get certificate Hash (SHA1) | [readonly] -**certExpiry** | **Date** | Get certificate expiry | [readonly] -**certSubject** | **String** | Get certificate subject as full rfc4514 | [readonly] -**privateKeyAvailable** | **Bool** | Show if this keypair has a private key configured or not | [readonly] -**privateKeyType** | **String** | Get the private key's type, if set | [readonly] -**certificateDownloadUrl** | **String** | Get URL to download certificate | [readonly] -**privateKeyDownloadUrl** | **String** | Get URL to download private key | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CertificateKeyPairRequest.md b/docs/CertificateKeyPairRequest.md deleted file mode 100644 index 4a2d9c3..0000000 --- a/docs/CertificateKeyPairRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CertificateKeyPairRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**certificateData** | **String** | PEM-encoded Certificate data | -**keyData** | **String** | Optional Private Key. If this is set, you can use this keypair for encryption. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChallengeChoices.md b/docs/ChallengeChoices.md deleted file mode 100644 index 36d23bf..0000000 --- a/docs/ChallengeChoices.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChallengeChoices - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChallengeTypes.md b/docs/ChallengeTypes.md deleted file mode 100644 index f3091c3..0000000 --- a/docs/ChallengeTypes.md +++ /dev/null @@ -1,54 +0,0 @@ -# ChallengeTypes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-user-login"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**errorMessage** | **String** | | [optional] -**clientId** | **String** | | -**scope** | **String** | | -**redirectUri** | **String** | | -**state** | **String** | | -**activationBarcode** | **String** | | -**activationCode** | **String** | | -**stageUuid** | **String** | | -**phoneNumberRequired** | **Bool** | | [optional] [default to true] -**codes** | **[String]** | | -**configUrl** | **String** | | -**deviceChallenges** | [DeviceChallenge] | | -**configurationStages** | [SelectableStage] | | -**registration** | [String: AnyCodable] | | -**url** | **String** | | -**attrs** | **[String: String]** | | -**title** | **String** | | [optional] -**siteKey** | **String** | | -**jsUrl** | **String** | | -**headerText** | **String** | | [optional] -**permissions** | [ConsentPermission] | | -**additionalPermissions** | [ConsentPermission] | | -**token** | **String** | | -**requestId** | **String** | | -**error** | **String** | | [optional] -**traceback** | **String** | | [optional] -**userFields** | **[String]** | | -**passwordFields** | **Bool** | | -**applicationPre** | **String** | | [optional] -**enrollUrl** | **String** | | [optional] -**recoveryUrl** | **String** | | [optional] -**passwordlessUrl** | **String** | | [optional] -**primaryAction** | **String** | | -**sources** | [LoginSource] | | [optional] -**showSourceLabels** | **Bool** | | -**slug** | **String** | | -**fields** | [StagePrompt] | | -**to** | **String** | | -**body** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClientTypeEnum.md b/docs/ClientTypeEnum.md deleted file mode 100644 index 77061bc..0000000 --- a/docs/ClientTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClientTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Config.md b/docs/Config.md deleted file mode 100644 index a32cbe5..0000000 --- a/docs/Config.md +++ /dev/null @@ -1,15 +0,0 @@ -# Config - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errorReporting** | [**ErrorReportingConfig**](ErrorReportingConfig.md) | | -**capabilities** | [CapabilitiesEnum] | | -**cacheTimeout** | **Int** | | -**cacheTimeoutFlows** | **Int** | | -**cacheTimeoutPolicies** | **Int** | | -**cacheTimeoutReputation** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentChallenge.md b/docs/ConsentChallenge.md deleted file mode 100644 index 42f0832..0000000 --- a/docs/ConsentChallenge.md +++ /dev/null @@ -1,19 +0,0 @@ -# ConsentChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-consent"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**headerText** | **String** | | [optional] -**permissions** | [ConsentPermission] | | -**additionalPermissions** | [ConsentPermission] | | -**token** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentChallengeResponseRequest.md b/docs/ConsentChallengeResponseRequest.md deleted file mode 100644 index ed92251..0000000 --- a/docs/ConsentChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConsentChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-consent"] -**token** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentPermission.md b/docs/ConsentPermission.md deleted file mode 100644 index 02da9fe..0000000 --- a/docs/ConsentPermission.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConsentPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**id** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentStage.md b/docs/ConsentStage.md deleted file mode 100644 index 3dcf628..0000000 --- a/docs/ConsentStage.md +++ /dev/null @@ -1,18 +0,0 @@ -# ConsentStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**mode** | [**ConsentStageModeEnum**](ConsentStageModeEnum.md) | | [optional] -**consentExpireIn** | **String** | Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentStageModeEnum.md b/docs/ConsentStageModeEnum.md deleted file mode 100644 index f6d6755..0000000 --- a/docs/ConsentStageModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ConsentStageModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConsentStageRequest.md b/docs/ConsentStageRequest.md deleted file mode 100644 index ebd898a..0000000 --- a/docs/ConsentStageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConsentStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**mode** | [**ConsentStageModeEnum**](ConsentStageModeEnum.md) | | [optional] -**consentExpireIn** | **String** | Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ContextualFlowInfo.md b/docs/ContextualFlowInfo.md deleted file mode 100644 index 339ea5e..0000000 --- a/docs/ContextualFlowInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContextualFlowInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **String** | | [optional] -**background** | **String** | | [optional] -**cancelUrl** | **String** | | -**layout** | [**LayoutEnum**](LayoutEnum.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Coordinate.md b/docs/Coordinate.md deleted file mode 100644 index 40a6259..0000000 --- a/docs/Coordinate.md +++ /dev/null @@ -1,11 +0,0 @@ -# Coordinate - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**xCord** | **Int** | | [readonly] -**yCord** | **Int** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CoreAPI.md b/docs/CoreAPI.md deleted file mode 100644 index a340a7a..0000000 --- a/docs/CoreAPI.md +++ /dev/null @@ -1,3276 +0,0 @@ -# CoreAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**coreApplicationsCheckAccessRetrieve**](CoreAPI.md#coreapplicationscheckaccessretrieve) | **GET** /core/applications/{slug}/check_access/ | -[**coreApplicationsCreate**](CoreAPI.md#coreapplicationscreate) | **POST** /core/applications/ | -[**coreApplicationsDestroy**](CoreAPI.md#coreapplicationsdestroy) | **DELETE** /core/applications/{slug}/ | -[**coreApplicationsList**](CoreAPI.md#coreapplicationslist) | **GET** /core/applications/ | -[**coreApplicationsMetricsList**](CoreAPI.md#coreapplicationsmetricslist) | **GET** /core/applications/{slug}/metrics/ | -[**coreApplicationsPartialUpdate**](CoreAPI.md#coreapplicationspartialupdate) | **PATCH** /core/applications/{slug}/ | -[**coreApplicationsRetrieve**](CoreAPI.md#coreapplicationsretrieve) | **GET** /core/applications/{slug}/ | -[**coreApplicationsSetIconCreate**](CoreAPI.md#coreapplicationsseticoncreate) | **POST** /core/applications/{slug}/set_icon/ | -[**coreApplicationsSetIconUrlCreate**](CoreAPI.md#coreapplicationsseticonurlcreate) | **POST** /core/applications/{slug}/set_icon_url/ | -[**coreApplicationsUpdate**](CoreAPI.md#coreapplicationsupdate) | **PUT** /core/applications/{slug}/ | -[**coreApplicationsUsedByList**](CoreAPI.md#coreapplicationsusedbylist) | **GET** /core/applications/{slug}/used_by/ | -[**coreAuthenticatedSessionsDestroy**](CoreAPI.md#coreauthenticatedsessionsdestroy) | **DELETE** /core/authenticated_sessions/{uuid}/ | -[**coreAuthenticatedSessionsList**](CoreAPI.md#coreauthenticatedsessionslist) | **GET** /core/authenticated_sessions/ | -[**coreAuthenticatedSessionsRetrieve**](CoreAPI.md#coreauthenticatedsessionsretrieve) | **GET** /core/authenticated_sessions/{uuid}/ | -[**coreAuthenticatedSessionsUsedByList**](CoreAPI.md#coreauthenticatedsessionsusedbylist) | **GET** /core/authenticated_sessions/{uuid}/used_by/ | -[**coreGroupsAddUserCreate**](CoreAPI.md#coregroupsaddusercreate) | **POST** /core/groups/{group_uuid}/add_user/ | -[**coreGroupsCreate**](CoreAPI.md#coregroupscreate) | **POST** /core/groups/ | -[**coreGroupsDestroy**](CoreAPI.md#coregroupsdestroy) | **DELETE** /core/groups/{group_uuid}/ | -[**coreGroupsList**](CoreAPI.md#coregroupslist) | **GET** /core/groups/ | -[**coreGroupsPartialUpdate**](CoreAPI.md#coregroupspartialupdate) | **PATCH** /core/groups/{group_uuid}/ | -[**coreGroupsRemoveUserCreate**](CoreAPI.md#coregroupsremoveusercreate) | **POST** /core/groups/{group_uuid}/remove_user/ | -[**coreGroupsRetrieve**](CoreAPI.md#coregroupsretrieve) | **GET** /core/groups/{group_uuid}/ | -[**coreGroupsUpdate**](CoreAPI.md#coregroupsupdate) | **PUT** /core/groups/{group_uuid}/ | -[**coreGroupsUsedByList**](CoreAPI.md#coregroupsusedbylist) | **GET** /core/groups/{group_uuid}/used_by/ | -[**coreTenantsCreate**](CoreAPI.md#coretenantscreate) | **POST** /core/tenants/ | -[**coreTenantsCurrentRetrieve**](CoreAPI.md#coretenantscurrentretrieve) | **GET** /core/tenants/current/ | -[**coreTenantsDestroy**](CoreAPI.md#coretenantsdestroy) | **DELETE** /core/tenants/{tenant_uuid}/ | -[**coreTenantsList**](CoreAPI.md#coretenantslist) | **GET** /core/tenants/ | -[**coreTenantsPartialUpdate**](CoreAPI.md#coretenantspartialupdate) | **PATCH** /core/tenants/{tenant_uuid}/ | -[**coreTenantsRetrieve**](CoreAPI.md#coretenantsretrieve) | **GET** /core/tenants/{tenant_uuid}/ | -[**coreTenantsUpdate**](CoreAPI.md#coretenantsupdate) | **PUT** /core/tenants/{tenant_uuid}/ | -[**coreTenantsUsedByList**](CoreAPI.md#coretenantsusedbylist) | **GET** /core/tenants/{tenant_uuid}/used_by/ | -[**coreTokensCreate**](CoreAPI.md#coretokenscreate) | **POST** /core/tokens/ | -[**coreTokensDestroy**](CoreAPI.md#coretokensdestroy) | **DELETE** /core/tokens/{identifier}/ | -[**coreTokensList**](CoreAPI.md#coretokenslist) | **GET** /core/tokens/ | -[**coreTokensPartialUpdate**](CoreAPI.md#coretokenspartialupdate) | **PATCH** /core/tokens/{identifier}/ | -[**coreTokensRetrieve**](CoreAPI.md#coretokensretrieve) | **GET** /core/tokens/{identifier}/ | -[**coreTokensSetKeyCreate**](CoreAPI.md#coretokenssetkeycreate) | **POST** /core/tokens/{identifier}/set_key/ | -[**coreTokensUpdate**](CoreAPI.md#coretokensupdate) | **PUT** /core/tokens/{identifier}/ | -[**coreTokensUsedByList**](CoreAPI.md#coretokensusedbylist) | **GET** /core/tokens/{identifier}/used_by/ | -[**coreTokensViewKeyRetrieve**](CoreAPI.md#coretokensviewkeyretrieve) | **GET** /core/tokens/{identifier}/view_key/ | -[**coreTransactionalApplicationsUpdate**](CoreAPI.md#coretransactionalapplicationsupdate) | **PUT** /core/transactional/applications/ | -[**coreUserConsentDestroy**](CoreAPI.md#coreuserconsentdestroy) | **DELETE** /core/user_consent/{id}/ | -[**coreUserConsentList**](CoreAPI.md#coreuserconsentlist) | **GET** /core/user_consent/ | -[**coreUserConsentRetrieve**](CoreAPI.md#coreuserconsentretrieve) | **GET** /core/user_consent/{id}/ | -[**coreUserConsentUsedByList**](CoreAPI.md#coreuserconsentusedbylist) | **GET** /core/user_consent/{id}/used_by/ | -[**coreUsersCreate**](CoreAPI.md#coreuserscreate) | **POST** /core/users/ | -[**coreUsersDestroy**](CoreAPI.md#coreusersdestroy) | **DELETE** /core/users/{id}/ | -[**coreUsersImpersonateCreate**](CoreAPI.md#coreusersimpersonatecreate) | **POST** /core/users/{id}/impersonate/ | -[**coreUsersImpersonateEndRetrieve**](CoreAPI.md#coreusersimpersonateendretrieve) | **GET** /core/users/impersonate_end/ | -[**coreUsersList**](CoreAPI.md#coreuserslist) | **GET** /core/users/ | -[**coreUsersMeRetrieve**](CoreAPI.md#coreusersmeretrieve) | **GET** /core/users/me/ | -[**coreUsersMetricsRetrieve**](CoreAPI.md#coreusersmetricsretrieve) | **GET** /core/users/{id}/metrics/ | -[**coreUsersPartialUpdate**](CoreAPI.md#coreuserspartialupdate) | **PATCH** /core/users/{id}/ | -[**coreUsersPathsRetrieve**](CoreAPI.md#coreuserspathsretrieve) | **GET** /core/users/paths/ | -[**coreUsersRecoveryEmailRetrieve**](CoreAPI.md#coreusersrecoveryemailretrieve) | **GET** /core/users/{id}/recovery_email/ | -[**coreUsersRecoveryRetrieve**](CoreAPI.md#coreusersrecoveryretrieve) | **GET** /core/users/{id}/recovery/ | -[**coreUsersRetrieve**](CoreAPI.md#coreusersretrieve) | **GET** /core/users/{id}/ | -[**coreUsersServiceAccountCreate**](CoreAPI.md#coreusersserviceaccountcreate) | **POST** /core/users/service_account/ | -[**coreUsersSetPasswordCreate**](CoreAPI.md#coreuserssetpasswordcreate) | **POST** /core/users/{id}/set_password/ | -[**coreUsersUpdate**](CoreAPI.md#coreusersupdate) | **PUT** /core/users/{id}/ | -[**coreUsersUsedByList**](CoreAPI.md#coreusersusedbylist) | **GET** /core/users/{id}/used_by/ | - - -# **coreApplicationsCheckAccessRetrieve** -```swift - open class func coreApplicationsCheckAccessRetrieve(slug: String, forUser: Int? = nil, completion: @escaping (_ data: PolicyTestResult?, _ error: Error?) -> Void) -``` - - - -Check access to a single application by slug - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let forUser = 987 // Int | (optional) - -CoreAPI.coreApplicationsCheckAccessRetrieve(slug: slug, forUser: forUser) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **forUser** | **Int** | | [optional] - -### Return type - -[**PolicyTestResult**](PolicyTestResult.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsCreate** -```swift - open class func coreApplicationsCreate(applicationRequest: ApplicationRequest, completion: @escaping (_ data: Application?, _ error: Error?) -> Void) -``` - - - -Application Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let applicationRequest = ApplicationRequest(name: "name_example", slug: "slug_example", provider: 123, backchannelProviders: [123], openInNewTab: false, metaLaunchUrl: "metaLaunchUrl_example", metaDescription: "metaDescription_example", metaPublisher: "metaPublisher_example", policyEngineMode: PolicyEngineMode(), group: "group_example") // ApplicationRequest | - -CoreAPI.coreApplicationsCreate(applicationRequest: applicationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md) | | - -### Return type - -[**Application**](Application.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsDestroy** -```swift - open class func coreApplicationsDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Application Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -CoreAPI.coreApplicationsDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsList** -```swift - open class func coreApplicationsList(group: String? = nil, metaDescription: String? = nil, metaLaunchUrl: String? = nil, metaPublisher: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, superuserFullList: Bool? = nil, completion: @escaping (_ data: PaginatedApplicationList?, _ error: Error?) -> Void) -``` - - - -Custom list method that checks Policy based access instead of guardian - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let group = "group_example" // String | (optional) -let metaDescription = "metaDescription_example" // String | (optional) -let metaLaunchUrl = "metaLaunchUrl_example" // String | (optional) -let metaPublisher = "metaPublisher_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let slug = "slug_example" // String | (optional) -let superuserFullList = true // Bool | (optional) - -CoreAPI.coreApplicationsList(group: group, metaDescription: metaDescription, metaLaunchUrl: metaLaunchUrl, metaPublisher: metaPublisher, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug, superuserFullList: superuserFullList) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **String** | | [optional] - **metaDescription** | **String** | | [optional] - **metaLaunchUrl** | **String** | | [optional] - **metaPublisher** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **slug** | **String** | | [optional] - **superuserFullList** | **Bool** | | [optional] - -### Return type - -[**PaginatedApplicationList**](PaginatedApplicationList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsMetricsList** -```swift - open class func coreApplicationsMetricsList(slug: String, completion: @escaping (_ data: [Coordinate]?, _ error: Error?) -> Void) -``` - - - -Metrics for application logins - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -CoreAPI.coreApplicationsMetricsList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[Coordinate]**](Coordinate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsPartialUpdate** -```swift - open class func coreApplicationsPartialUpdate(slug: String, patchedApplicationRequest: PatchedApplicationRequest? = nil, completion: @escaping (_ data: Application?, _ error: Error?) -> Void) -``` - - - -Application Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedApplicationRequest = PatchedApplicationRequest(name: "name_example", slug: "slug_example", provider: 123, backchannelProviders: [123], openInNewTab: false, metaLaunchUrl: "metaLaunchUrl_example", metaDescription: "metaDescription_example", metaPublisher: "metaPublisher_example", policyEngineMode: PolicyEngineMode(), group: "group_example") // PatchedApplicationRequest | (optional) - -CoreAPI.coreApplicationsPartialUpdate(slug: slug, patchedApplicationRequest: patchedApplicationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedApplicationRequest** | [**PatchedApplicationRequest**](PatchedApplicationRequest.md) | | [optional] - -### Return type - -[**Application**](Application.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsRetrieve** -```swift - open class func coreApplicationsRetrieve(slug: String, completion: @escaping (_ data: Application?, _ error: Error?) -> Void) -``` - - - -Application Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -CoreAPI.coreApplicationsRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**Application**](Application.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsSetIconCreate** -```swift - open class func coreApplicationsSetIconCreate(slug: String, file: URL? = nil, clear: Bool? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set application icon - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let file = URL(string: "https://example.com")! // URL | (optional) -let clear = true // Bool | (optional) (default to false) - -CoreAPI.coreApplicationsSetIconCreate(slug: slug, file: file, clear: clear) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **file** | **URL** | | [optional] - **clear** | **Bool** | | [optional] [default to false] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsSetIconUrlCreate** -```swift - open class func coreApplicationsSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set application icon (as URL) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let filePathRequest = FilePathRequest(url: "url_example") // FilePathRequest | - -CoreAPI.coreApplicationsSetIconUrlCreate(slug: slug, filePathRequest: filePathRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **filePathRequest** | [**FilePathRequest**](FilePathRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsUpdate** -```swift - open class func coreApplicationsUpdate(slug: String, applicationRequest: ApplicationRequest, completion: @escaping (_ data: Application?, _ error: Error?) -> Void) -``` - - - -Application Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let applicationRequest = ApplicationRequest(name: "name_example", slug: "slug_example", provider: 123, backchannelProviders: [123], openInNewTab: false, metaLaunchUrl: "metaLaunchUrl_example", metaDescription: "metaDescription_example", metaPublisher: "metaPublisher_example", policyEngineMode: PolicyEngineMode(), group: "group_example") // ApplicationRequest | - -CoreAPI.coreApplicationsUpdate(slug: slug, applicationRequest: applicationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md) | | - -### Return type - -[**Application**](Application.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreApplicationsUsedByList** -```swift - open class func coreApplicationsUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -CoreAPI.coreApplicationsUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreAuthenticatedSessionsDestroy** -```swift - open class func coreAuthenticatedSessionsDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatedSession Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Authenticated Session. - -CoreAPI.coreAuthenticatedSessionsDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Authenticated Session. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreAuthenticatedSessionsList** -```swift - open class func coreAuthenticatedSessionsList(lastIp: String? = nil, lastUserAgent: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil, completion: @escaping (_ data: PaginatedAuthenticatedSessionList?, _ error: Error?) -> Void) -``` - - - -AuthenticatedSession Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let lastIp = "lastIp_example" // String | (optional) -let lastUserAgent = "lastUserAgent_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let userUsername = "userUsername_example" // String | (optional) - -CoreAPI.coreAuthenticatedSessionsList(lastIp: lastIp, lastUserAgent: lastUserAgent, ordering: ordering, page: page, pageSize: pageSize, search: search, userUsername: userUsername) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lastIp** | **String** | | [optional] - **lastUserAgent** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **userUsername** | **String** | | [optional] - -### Return type - -[**PaginatedAuthenticatedSessionList**](PaginatedAuthenticatedSessionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreAuthenticatedSessionsRetrieve** -```swift - open class func coreAuthenticatedSessionsRetrieve(uuid: UUID, completion: @escaping (_ data: AuthenticatedSession?, _ error: Error?) -> Void) -``` - - - -AuthenticatedSession Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Authenticated Session. - -CoreAPI.coreAuthenticatedSessionsRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Authenticated Session. | - -### Return type - -[**AuthenticatedSession**](AuthenticatedSession.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreAuthenticatedSessionsUsedByList** -```swift - open class func coreAuthenticatedSessionsUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Authenticated Session. - -CoreAPI.coreAuthenticatedSessionsUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Authenticated Session. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsAddUserCreate** -```swift - open class func coreGroupsAddUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Add user to group - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. -let userAccountRequest = UserAccountRequest(pk: 123) // UserAccountRequest | - -CoreAPI.coreGroupsAddUserCreate(groupUuid: groupUuid, userAccountRequest: userAccountRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - **userAccountRequest** | [**UserAccountRequest**](UserAccountRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsCreate** -```swift - open class func coreGroupsCreate(groupRequest: GroupRequest, completion: @escaping (_ data: Group?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupRequest = GroupRequest(name: "name_example", isSuperuser: false, parent: 123, users: [123], attributes: "TODO", roles: [123]) // GroupRequest | - -CoreAPI.coreGroupsCreate(groupRequest: groupRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupRequest** | [**GroupRequest**](GroupRequest.md) | | - -### Return type - -[**Group**](Group.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsDestroy** -```swift - open class func coreGroupsDestroy(groupUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. - -CoreAPI.coreGroupsDestroy(groupUuid: groupUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsList** -```swift - open class func coreGroupsList(attributes: String? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedGroupList?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let attributes = "attributes_example" // String | Attributes (optional) -let isSuperuser = true // Bool | (optional) -let membersByPk = [123] // [Int] | (optional) -let membersByUsername = ["inner_example"] // [String] | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -CoreAPI.coreGroupsList(attributes: attributes, isSuperuser: isSuperuser, membersByPk: membersByPk, membersByUsername: membersByUsername, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attributes** | **String** | Attributes | [optional] - **isSuperuser** | **Bool** | | [optional] - **membersByPk** | [**[Int]**](Int.md) | | [optional] - **membersByUsername** | [**[String]**](String.md) | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedGroupList**](PaginatedGroupList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsPartialUpdate** -```swift - open class func coreGroupsPartialUpdate(groupUuid: UUID, patchedGroupRequest: PatchedGroupRequest? = nil, completion: @escaping (_ data: Group?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. -let patchedGroupRequest = PatchedGroupRequest(name: "name_example", isSuperuser: false, parent: 123, users: [123], attributes: "TODO", roles: [123]) // PatchedGroupRequest | (optional) - -CoreAPI.coreGroupsPartialUpdate(groupUuid: groupUuid, patchedGroupRequest: patchedGroupRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - **patchedGroupRequest** | [**PatchedGroupRequest**](PatchedGroupRequest.md) | | [optional] - -### Return type - -[**Group**](Group.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsRemoveUserCreate** -```swift - open class func coreGroupsRemoveUserCreate(groupUuid: UUID, userAccountRequest: UserAccountRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Add user to group - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. -let userAccountRequest = UserAccountRequest(pk: 123) // UserAccountRequest | - -CoreAPI.coreGroupsRemoveUserCreate(groupUuid: groupUuid, userAccountRequest: userAccountRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - **userAccountRequest** | [**UserAccountRequest**](UserAccountRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsRetrieve** -```swift - open class func coreGroupsRetrieve(groupUuid: UUID, completion: @escaping (_ data: Group?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. - -CoreAPI.coreGroupsRetrieve(groupUuid: groupUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - -### Return type - -[**Group**](Group.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsUpdate** -```swift - open class func coreGroupsUpdate(groupUuid: UUID, groupRequest: GroupRequest, completion: @escaping (_ data: Group?, _ error: Error?) -> Void) -``` - - - -Group Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. -let groupRequest = GroupRequest(name: "name_example", isSuperuser: false, parent: 123, users: [123], attributes: "TODO", roles: [123]) // GroupRequest | - -CoreAPI.coreGroupsUpdate(groupUuid: groupUuid, groupRequest: groupRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - **groupRequest** | [**GroupRequest**](GroupRequest.md) | | - -### Return type - -[**Group**](Group.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreGroupsUsedByList** -```swift - open class func coreGroupsUsedByList(groupUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupUuid = 987 // UUID | A UUID string identifying this Group. - -CoreAPI.coreGroupsUsedByList(groupUuid: groupUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupUuid** | **UUID** | A UUID string identifying this Group. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsCreate** -```swift - open class func coreTenantsCreate(tenantRequest: TenantRequest, completion: @escaping (_ data: Tenant?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantRequest = TenantRequest(domain: "domain_example", _default: false, brandingTitle: "brandingTitle_example", brandingLogo: "brandingLogo_example", brandingFavicon: "brandingFavicon_example", flowAuthentication: 123, flowInvalidation: 123, flowRecovery: 123, flowUnenrollment: 123, flowUserSettings: 123, flowDeviceCode: 123, eventRetention: "eventRetention_example", webCertificate: 123, attributes: "TODO") // TenantRequest | - -CoreAPI.coreTenantsCreate(tenantRequest: tenantRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantRequest** | [**TenantRequest**](TenantRequest.md) | | - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsCurrentRetrieve** -```swift - open class func coreTenantsCurrentRetrieve(completion: @escaping (_ data: CurrentTenant?, _ error: Error?) -> Void) -``` - - - -Get current tenant - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -CoreAPI.coreTenantsCurrentRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CurrentTenant**](CurrentTenant.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsDestroy** -```swift - open class func coreTenantsDestroy(tenantUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantUuid = 987 // UUID | A UUID string identifying this Tenant. - -CoreAPI.coreTenantsDestroy(tenantUuid: tenantUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantUuid** | **UUID** | A UUID string identifying this Tenant. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsList** -```swift - open class func coreTenantsList(brandingFavicon: String? = nil, brandingLogo: String? = nil, brandingTitle: String? = nil, _default: Bool? = nil, domain: String? = nil, eventRetention: String? = nil, flowAuthentication: UUID? = nil, flowDeviceCode: UUID? = nil, flowInvalidation: UUID? = nil, flowRecovery: UUID? = nil, flowUnenrollment: UUID? = nil, flowUserSettings: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantUuid: UUID? = nil, webCertificate: UUID? = nil, completion: @escaping (_ data: PaginatedTenantList?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let brandingFavicon = "brandingFavicon_example" // String | (optional) -let brandingLogo = "brandingLogo_example" // String | (optional) -let brandingTitle = "brandingTitle_example" // String | (optional) -let _default = true // Bool | (optional) -let domain = "domain_example" // String | (optional) -let eventRetention = "eventRetention_example" // String | (optional) -let flowAuthentication = 987 // UUID | (optional) -let flowDeviceCode = 987 // UUID | (optional) -let flowInvalidation = 987 // UUID | (optional) -let flowRecovery = 987 // UUID | (optional) -let flowUnenrollment = 987 // UUID | (optional) -let flowUserSettings = 987 // UUID | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let tenantUuid = 987 // UUID | (optional) -let webCertificate = 987 // UUID | (optional) - -CoreAPI.coreTenantsList(brandingFavicon: brandingFavicon, brandingLogo: brandingLogo, brandingTitle: brandingTitle, _default: _default, domain: domain, eventRetention: eventRetention, flowAuthentication: flowAuthentication, flowDeviceCode: flowDeviceCode, flowInvalidation: flowInvalidation, flowRecovery: flowRecovery, flowUnenrollment: flowUnenrollment, flowUserSettings: flowUserSettings, ordering: ordering, page: page, pageSize: pageSize, search: search, tenantUuid: tenantUuid, webCertificate: webCertificate) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **brandingFavicon** | **String** | | [optional] - **brandingLogo** | **String** | | [optional] - **brandingTitle** | **String** | | [optional] - **_default** | **Bool** | | [optional] - **domain** | **String** | | [optional] - **eventRetention** | **String** | | [optional] - **flowAuthentication** | **UUID** | | [optional] - **flowDeviceCode** | **UUID** | | [optional] - **flowInvalidation** | **UUID** | | [optional] - **flowRecovery** | **UUID** | | [optional] - **flowUnenrollment** | **UUID** | | [optional] - **flowUserSettings** | **UUID** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **tenantUuid** | **UUID** | | [optional] - **webCertificate** | **UUID** | | [optional] - -### Return type - -[**PaginatedTenantList**](PaginatedTenantList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsPartialUpdate** -```swift - open class func coreTenantsPartialUpdate(tenantUuid: UUID, patchedTenantRequest: PatchedTenantRequest? = nil, completion: @escaping (_ data: Tenant?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantUuid = 987 // UUID | A UUID string identifying this Tenant. -let patchedTenantRequest = PatchedTenantRequest(domain: "domain_example", _default: false, brandingTitle: "brandingTitle_example", brandingLogo: "brandingLogo_example", brandingFavicon: "brandingFavicon_example", flowAuthentication: 123, flowInvalidation: 123, flowRecovery: 123, flowUnenrollment: 123, flowUserSettings: 123, flowDeviceCode: 123, eventRetention: "eventRetention_example", webCertificate: 123, attributes: "TODO") // PatchedTenantRequest | (optional) - -CoreAPI.coreTenantsPartialUpdate(tenantUuid: tenantUuid, patchedTenantRequest: patchedTenantRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantUuid** | **UUID** | A UUID string identifying this Tenant. | - **patchedTenantRequest** | [**PatchedTenantRequest**](PatchedTenantRequest.md) | | [optional] - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsRetrieve** -```swift - open class func coreTenantsRetrieve(tenantUuid: UUID, completion: @escaping (_ data: Tenant?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantUuid = 987 // UUID | A UUID string identifying this Tenant. - -CoreAPI.coreTenantsRetrieve(tenantUuid: tenantUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantUuid** | **UUID** | A UUID string identifying this Tenant. | - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsUpdate** -```swift - open class func coreTenantsUpdate(tenantUuid: UUID, tenantRequest: TenantRequest, completion: @escaping (_ data: Tenant?, _ error: Error?) -> Void) -``` - - - -Tenant Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantUuid = 987 // UUID | A UUID string identifying this Tenant. -let tenantRequest = TenantRequest(domain: "domain_example", _default: false, brandingTitle: "brandingTitle_example", brandingLogo: "brandingLogo_example", brandingFavicon: "brandingFavicon_example", flowAuthentication: 123, flowInvalidation: 123, flowRecovery: 123, flowUnenrollment: 123, flowUserSettings: 123, flowDeviceCode: 123, eventRetention: "eventRetention_example", webCertificate: 123, attributes: "TODO") // TenantRequest | - -CoreAPI.coreTenantsUpdate(tenantUuid: tenantUuid, tenantRequest: tenantRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantUuid** | **UUID** | A UUID string identifying this Tenant. | - **tenantRequest** | [**TenantRequest**](TenantRequest.md) | | - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTenantsUsedByList** -```swift - open class func coreTenantsUsedByList(tenantUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tenantUuid = 987 // UUID | A UUID string identifying this Tenant. - -CoreAPI.coreTenantsUsedByList(tenantUuid: tenantUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenantUuid** | **UUID** | A UUID string identifying this Tenant. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensCreate** -```swift - open class func coreTokensCreate(tokenRequest: TokenRequest, completion: @escaping (_ data: Token?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let tokenRequest = TokenRequest(managed: "managed_example", identifier: "identifier_example", intent: IntentEnum(), user: 123, description: "description_example", expires: Date(), expiring: false) // TokenRequest | - -CoreAPI.coreTokensCreate(tokenRequest: tokenRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tokenRequest** | [**TokenRequest**](TokenRequest.md) | | - -### Return type - -[**Token**](Token.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensDestroy** -```swift - open class func coreTokensDestroy(identifier: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | - -CoreAPI.coreTokensDestroy(identifier: identifier) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensList** -```swift - open class func coreTokensList(description: String? = nil, expires: Date? = nil, expiring: Bool? = nil, identifier: String? = nil, intent: Intent_coreTokensList? = nil, managed: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, userUsername: String? = nil, completion: @escaping (_ data: PaginatedTokenList?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let description = "description_example" // String | (optional) -let expires = Date() // Date | (optional) -let expiring = true // Bool | (optional) -let identifier = "identifier_example" // String | (optional) -let intent = "intent_example" // String | * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password (optional) -let managed = "managed_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let userUsername = "userUsername_example" // String | (optional) - -CoreAPI.coreTokensList(description: description, expires: expires, expiring: expiring, identifier: identifier, intent: intent, managed: managed, ordering: ordering, page: page, pageSize: pageSize, search: search, userUsername: userUsername) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **description** | **String** | | [optional] - **expires** | **Date** | | [optional] - **expiring** | **Bool** | | [optional] - **identifier** | **String** | | [optional] - **intent** | **String** | * `verification` - Intent Verification * `api` - Intent Api * `recovery` - Intent Recovery * `app_password` - Intent App Password | [optional] - **managed** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **userUsername** | **String** | | [optional] - -### Return type - -[**PaginatedTokenList**](PaginatedTokenList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensPartialUpdate** -```swift - open class func coreTokensPartialUpdate(identifier: String, patchedTokenRequest: PatchedTokenRequest? = nil, completion: @escaping (_ data: Token?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | -let patchedTokenRequest = PatchedTokenRequest(managed: "managed_example", identifier: "identifier_example", intent: IntentEnum(), user: 123, description: "description_example", expires: Date(), expiring: false) // PatchedTokenRequest | (optional) - -CoreAPI.coreTokensPartialUpdate(identifier: identifier, patchedTokenRequest: patchedTokenRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - **patchedTokenRequest** | [**PatchedTokenRequest**](PatchedTokenRequest.md) | | [optional] - -### Return type - -[**Token**](Token.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensRetrieve** -```swift - open class func coreTokensRetrieve(identifier: String, completion: @escaping (_ data: Token?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | - -CoreAPI.coreTokensRetrieve(identifier: identifier) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - -### Return type - -[**Token**](Token.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensSetKeyCreate** -```swift - open class func coreTokensSetKeyCreate(identifier: String, tokenSetKeyRequest: TokenSetKeyRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set token key. Action is logged as event. `authentik_core.set_token_key` permission is required. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | -let tokenSetKeyRequest = TokenSetKeyRequest(key: "key_example") // TokenSetKeyRequest | - -CoreAPI.coreTokensSetKeyCreate(identifier: identifier, tokenSetKeyRequest: tokenSetKeyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - **tokenSetKeyRequest** | [**TokenSetKeyRequest**](TokenSetKeyRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensUpdate** -```swift - open class func coreTokensUpdate(identifier: String, tokenRequest: TokenRequest, completion: @escaping (_ data: Token?, _ error: Error?) -> Void) -``` - - - -Token Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | -let tokenRequest = TokenRequest(managed: "managed_example", identifier: "identifier_example", intent: IntentEnum(), user: 123, description: "description_example", expires: Date(), expiring: false) // TokenRequest | - -CoreAPI.coreTokensUpdate(identifier: identifier, tokenRequest: tokenRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - **tokenRequest** | [**TokenRequest**](TokenRequest.md) | | - -### Return type - -[**Token**](Token.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensUsedByList** -```swift - open class func coreTokensUsedByList(identifier: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | - -CoreAPI.coreTokensUsedByList(identifier: identifier) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTokensViewKeyRetrieve** -```swift - open class func coreTokensViewKeyRetrieve(identifier: String, completion: @escaping (_ data: TokenView?, _ error: Error?) -> Void) -``` - - - -Return token key and log access - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | - -CoreAPI.coreTokensViewKeyRetrieve(identifier: identifier) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | - -### Return type - -[**TokenView**](TokenView.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreTransactionalApplicationsUpdate** -```swift - open class func coreTransactionalApplicationsUpdate(transactionApplicationRequest: TransactionApplicationRequest, completion: @escaping (_ data: TransactionApplicationResponse?, _ error: Error?) -> Void) -``` - - - -Convert data into a blueprint, validate it and apply it - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let transactionApplicationRequest = TransactionApplicationRequest(app: ApplicationRequest(name: "name_example", slug: "slug_example", provider: 123, backchannelProviders: [123], openInNewTab: false, metaLaunchUrl: "metaLaunchUrl_example", metaDescription: "metaDescription_example", metaPublisher: "metaPublisher_example", policyEngineMode: PolicyEngineMode(), group: "group_example"), providerModel: ProviderModelEnum(), provider: modelRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], baseDn: "baseDn_example", searchGroup: 123, certificate: 123, tlsServerName: "tlsServerName_example", uidStartNumber: 123, gidStartNumber: 123, searchMode: LDAPAPIAccessMode(), bindMode: nil, mfaSupport: false, clientType: ClientTypeEnum(), clientId: "clientId_example", clientSecret: "clientSecret_example", accessCodeValidity: "accessCodeValidity_example", accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example", includeClaimsInIdToken: false, signingKey: 123, redirectUris: "redirectUris_example", subMode: SubModeEnum(), issuerMode: IssuerModeEnum(), jwksSources: [123], internalHost: "internalHost_example", externalHost: "externalHost_example", internalHostSslValidation: false, skipPathRegex: "skipPathRegex_example", basicAuthEnabled: false, basicAuthPasswordAttribute: "basicAuthPasswordAttribute_example", basicAuthUserAttribute: "basicAuthUserAttribute_example", mode: ProxyMode(), interceptHeaderAuth: false, cookieDomain: "cookieDomain_example", clientNetworks: "clientNetworks_example", sharedSecret: "sharedSecret_example", acsUrl: "acsUrl_example", audience: "audience_example", issuer: "issuer_example", assertionValidNotBefore: "assertionValidNotBefore_example", assertionValidNotOnOrAfter: "assertionValidNotOnOrAfter_example", sessionValidNotOnOrAfter: "sessionValidNotOnOrAfter_example", nameIdMapping: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), signingKp: 123, verificationKp: 123, spBinding: SpBindingEnum(), defaultRelayState: "defaultRelayState_example", propertyMappingsGroup: [123], url: "url_example", token: "token_example", excludeUsersServiceAccount: false, filterGroup: 123)) // TransactionApplicationRequest | - -CoreAPI.coreTransactionalApplicationsUpdate(transactionApplicationRequest: transactionApplicationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transactionApplicationRequest** | [**TransactionApplicationRequest**](TransactionApplicationRequest.md) | | - -### Return type - -[**TransactionApplicationResponse**](TransactionApplicationResponse.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUserConsentDestroy** -```swift - open class func coreUserConsentDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -UserConsent Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Consent. - -CoreAPI.coreUserConsentDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Consent. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUserConsentList** -```swift - open class func coreUserConsentList(application: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedUserConsentList?, _ error: Error?) -> Void) -``` - - - -UserConsent Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let application = 987 // UUID | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -CoreAPI.coreUserConsentList(application: application, ordering: ordering, page: page, pageSize: pageSize, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **application** | **UUID** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedUserConsentList**](PaginatedUserConsentList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUserConsentRetrieve** -```swift - open class func coreUserConsentRetrieve(id: Int, completion: @escaping (_ data: UserConsent?, _ error: Error?) -> Void) -``` - - - -UserConsent Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Consent. - -CoreAPI.coreUserConsentRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Consent. | - -### Return type - -[**UserConsent**](UserConsent.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUserConsentUsedByList** -```swift - open class func coreUserConsentUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Consent. - -CoreAPI.coreUserConsentUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Consent. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersCreate** -```swift - open class func coreUsersCreate(userRequest: UserRequest, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userRequest = UserRequest(username: "username_example", name: "name_example", isActive: false, lastLogin: Date(), groups: [123], email: "email_example", attributes: "TODO", path: "path_example", type: UserTypeEnum()) // UserRequest | - -CoreAPI.coreUsersCreate(userRequest: userRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userRequest** | [**UserRequest**](UserRequest.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersDestroy** -```swift - open class func coreUsersDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersImpersonateCreate** -```swift - open class func coreUsersImpersonateCreate(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Impersonate a user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersImpersonateCreate(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersImpersonateEndRetrieve** -```swift - open class func coreUsersImpersonateEndRetrieve(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -End Impersonation a user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -CoreAPI.coreUsersImpersonateEndRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersList** -```swift - open class func coreUsersList(attributes: String? = nil, email: String? = nil, groupsByName: [String]? = nil, groupsByPk: [UUID]? = nil, isActive: Bool? = nil, isSuperuser: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, pathStartswith: String? = nil, search: String? = nil, type: [ModelType_coreUsersList]? = nil, username: String? = nil, uuid: UUID? = nil, completion: @escaping (_ data: PaginatedUserList?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let attributes = "attributes_example" // String | Attributes (optional) -let email = "email_example" // String | (optional) -let groupsByName = ["inner_example"] // [String] | (optional) -let groupsByPk = [123] // [UUID] | (optional) -let isActive = true // Bool | (optional) -let isSuperuser = true // Bool | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let path = "path_example" // String | (optional) -let pathStartswith = "pathStartswith_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let type = ["type_example"] // [String] | * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) -let username = "username_example" // String | (optional) -let uuid = 987 // UUID | (optional) - -CoreAPI.coreUsersList(attributes: attributes, email: email, groupsByName: groupsByName, groupsByPk: groupsByPk, isActive: isActive, isSuperuser: isSuperuser, name: name, ordering: ordering, page: page, pageSize: pageSize, path: path, pathStartswith: pathStartswith, search: search, type: type, username: username, uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attributes** | **String** | Attributes | [optional] - **email** | **String** | | [optional] - **groupsByName** | [**[String]**](String.md) | | [optional] - **groupsByPk** | [**[UUID]**](UUID.md) | | [optional] - **isActive** | **Bool** | | [optional] - **isSuperuser** | **Bool** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **path** | **String** | | [optional] - **pathStartswith** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **type** | [**[String]**](String.md) | * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account | [optional] - **username** | **String** | | [optional] - **uuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedUserList**](PaginatedUserList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersMeRetrieve** -```swift - open class func coreUsersMeRetrieve(completion: @escaping (_ data: SessionUser?, _ error: Error?) -> Void) -``` - - - -Get information about current user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -CoreAPI.coreUsersMeRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SessionUser**](SessionUser.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersMetricsRetrieve** -```swift - open class func coreUsersMetricsRetrieve(id: Int, completion: @escaping (_ data: UserMetrics?, _ error: Error?) -> Void) -``` - - - -User metrics per 1h - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersMetricsRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -[**UserMetrics**](UserMetrics.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersPartialUpdate** -```swift - open class func coreUsersPartialUpdate(id: Int, patchedUserRequest: PatchedUserRequest? = nil, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. -let patchedUserRequest = PatchedUserRequest(username: "username_example", name: "name_example", isActive: false, lastLogin: Date(), groups: [123], email: "email_example", attributes: "TODO", path: "path_example", type: UserTypeEnum()) // PatchedUserRequest | (optional) - -CoreAPI.coreUsersPartialUpdate(id: id, patchedUserRequest: patchedUserRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - **patchedUserRequest** | [**PatchedUserRequest**](PatchedUserRequest.md) | | [optional] - -### Return type - -[**User**](User.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersPathsRetrieve** -```swift - open class func coreUsersPathsRetrieve(search: String? = nil, completion: @escaping (_ data: UserPath?, _ error: Error?) -> Void) -``` - - - -Get all user paths - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let search = "search_example" // String | (optional) - -CoreAPI.coreUsersPathsRetrieve(search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **String** | | [optional] - -### Return type - -[**UserPath**](UserPath.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersRecoveryEmailRetrieve** -```swift - open class func coreUsersRecoveryEmailRetrieve(emailStage: String, id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Create a temporary link that a user can use to recover their accounts - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let emailStage = "emailStage_example" // String | -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersRecoveryEmailRetrieve(emailStage: emailStage, id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **emailStage** | **String** | | - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersRecoveryRetrieve** -```swift - open class func coreUsersRecoveryRetrieve(id: Int, completion: @escaping (_ data: Link?, _ error: Error?) -> Void) -``` - - - -Create a temporary link that a user can use to recover their accounts - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersRecoveryRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -[**Link**](Link.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersRetrieve** -```swift - open class func coreUsersRetrieve(id: Int, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -[**User**](User.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersServiceAccountCreate** -```swift - open class func coreUsersServiceAccountCreate(userServiceAccountRequest: UserServiceAccountRequest, completion: @escaping (_ data: UserServiceAccountResponse?, _ error: Error?) -> Void) -``` - - - -Create a new user account that is marked as a service account - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userServiceAccountRequest = UserServiceAccountRequest(name: "name_example", createGroup: false, expiring: false, expires: Date()) // UserServiceAccountRequest | - -CoreAPI.coreUsersServiceAccountCreate(userServiceAccountRequest: userServiceAccountRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userServiceAccountRequest** | [**UserServiceAccountRequest**](UserServiceAccountRequest.md) | | - -### Return type - -[**UserServiceAccountResponse**](UserServiceAccountResponse.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersSetPasswordCreate** -```swift - open class func coreUsersSetPasswordCreate(id: Int, userPasswordSetRequest: UserPasswordSetRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set password for user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. -let userPasswordSetRequest = UserPasswordSetRequest(password: "password_example") // UserPasswordSetRequest | - -CoreAPI.coreUsersSetPasswordCreate(id: id, userPasswordSetRequest: userPasswordSetRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - **userPasswordSetRequest** | [**UserPasswordSetRequest**](UserPasswordSetRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersUpdate** -```swift - open class func coreUsersUpdate(id: Int, userRequest: UserRequest, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - - - -User Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. -let userRequest = UserRequest(username: "username_example", name: "name_example", isActive: false, lastLogin: Date(), groups: [123], email: "email_example", attributes: "TODO", path: "path_example", type: UserTypeEnum()) // UserRequest | - -CoreAPI.coreUsersUpdate(id: id, userRequest: userRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - **userRequest** | [**UserRequest**](UserRequest.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **coreUsersUsedByList** -```swift - open class func coreUsersUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. - -CoreAPI.coreUsersUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/CryptoAPI.md b/docs/CryptoAPI.md deleted file mode 100644 index f7f2306..0000000 --- a/docs/CryptoAPI.md +++ /dev/null @@ -1,530 +0,0 @@ -# CryptoAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**cryptoCertificatekeypairsCreate**](CryptoAPI.md#cryptocertificatekeypairscreate) | **POST** /crypto/certificatekeypairs/ | -[**cryptoCertificatekeypairsDestroy**](CryptoAPI.md#cryptocertificatekeypairsdestroy) | **DELETE** /crypto/certificatekeypairs/{kp_uuid}/ | -[**cryptoCertificatekeypairsGenerateCreate**](CryptoAPI.md#cryptocertificatekeypairsgeneratecreate) | **POST** /crypto/certificatekeypairs/generate/ | -[**cryptoCertificatekeypairsList**](CryptoAPI.md#cryptocertificatekeypairslist) | **GET** /crypto/certificatekeypairs/ | -[**cryptoCertificatekeypairsPartialUpdate**](CryptoAPI.md#cryptocertificatekeypairspartialupdate) | **PATCH** /crypto/certificatekeypairs/{kp_uuid}/ | -[**cryptoCertificatekeypairsRetrieve**](CryptoAPI.md#cryptocertificatekeypairsretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/ | -[**cryptoCertificatekeypairsUpdate**](CryptoAPI.md#cryptocertificatekeypairsupdate) | **PUT** /crypto/certificatekeypairs/{kp_uuid}/ | -[**cryptoCertificatekeypairsUsedByList**](CryptoAPI.md#cryptocertificatekeypairsusedbylist) | **GET** /crypto/certificatekeypairs/{kp_uuid}/used_by/ | -[**cryptoCertificatekeypairsViewCertificateRetrieve**](CryptoAPI.md#cryptocertificatekeypairsviewcertificateretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_certificate/ | -[**cryptoCertificatekeypairsViewPrivateKeyRetrieve**](CryptoAPI.md#cryptocertificatekeypairsviewprivatekeyretrieve) | **GET** /crypto/certificatekeypairs/{kp_uuid}/view_private_key/ | - - -# **cryptoCertificatekeypairsCreate** -```swift - open class func cryptoCertificatekeypairsCreate(certificateKeyPairRequest: CertificateKeyPairRequest, completion: @escaping (_ data: CertificateKeyPair?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let certificateKeyPairRequest = CertificateKeyPairRequest(name: "name_example", certificateData: "certificateData_example", keyData: "keyData_example") // CertificateKeyPairRequest | - -CryptoAPI.cryptoCertificatekeypairsCreate(certificateKeyPairRequest: certificateKeyPairRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **certificateKeyPairRequest** | [**CertificateKeyPairRequest**](CertificateKeyPairRequest.md) | | - -### Return type - -[**CertificateKeyPair**](CertificateKeyPair.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsDestroy** -```swift - open class func cryptoCertificatekeypairsDestroy(kpUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. - -CryptoAPI.cryptoCertificatekeypairsDestroy(kpUuid: kpUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsGenerateCreate** -```swift - open class func cryptoCertificatekeypairsGenerateCreate(certificateGenerationRequest: CertificateGenerationRequest, completion: @escaping (_ data: CertificateKeyPair?, _ error: Error?) -> Void) -``` - - - -Generate a new, self-signed certificate-key pair - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let certificateGenerationRequest = CertificateGenerationRequest(commonName: "commonName_example", subjectAltName: "subjectAltName_example", validityDays: 123) // CertificateGenerationRequest | - -CryptoAPI.cryptoCertificatekeypairsGenerateCreate(certificateGenerationRequest: certificateGenerationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **certificateGenerationRequest** | [**CertificateGenerationRequest**](CertificateGenerationRequest.md) | | - -### Return type - -[**CertificateKeyPair**](CertificateKeyPair.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsList** -```swift - open class func cryptoCertificatekeypairsList(hasKey: Bool? = nil, includeDetails: Bool? = nil, managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedCertificateKeyPairList?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let hasKey = true // Bool | Only return certificate-key pairs with keys (optional) -let includeDetails = true // Bool | (optional) (default to true) -let managed = "managed_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -CryptoAPI.cryptoCertificatekeypairsList(hasKey: hasKey, includeDetails: includeDetails, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hasKey** | **Bool** | Only return certificate-key pairs with keys | [optional] - **includeDetails** | **Bool** | | [optional] [default to true] - **managed** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedCertificateKeyPairList**](PaginatedCertificateKeyPairList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsPartialUpdate** -```swift - open class func cryptoCertificatekeypairsPartialUpdate(kpUuid: UUID, patchedCertificateKeyPairRequest: PatchedCertificateKeyPairRequest? = nil, completion: @escaping (_ data: CertificateKeyPair?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. -let patchedCertificateKeyPairRequest = PatchedCertificateKeyPairRequest(name: "name_example", certificateData: "certificateData_example", keyData: "keyData_example") // PatchedCertificateKeyPairRequest | (optional) - -CryptoAPI.cryptoCertificatekeypairsPartialUpdate(kpUuid: kpUuid, patchedCertificateKeyPairRequest: patchedCertificateKeyPairRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - **patchedCertificateKeyPairRequest** | [**PatchedCertificateKeyPairRequest**](PatchedCertificateKeyPairRequest.md) | | [optional] - -### Return type - -[**CertificateKeyPair**](CertificateKeyPair.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsRetrieve** -```swift - open class func cryptoCertificatekeypairsRetrieve(kpUuid: UUID, completion: @escaping (_ data: CertificateKeyPair?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. - -CryptoAPI.cryptoCertificatekeypairsRetrieve(kpUuid: kpUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - -### Return type - -[**CertificateKeyPair**](CertificateKeyPair.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsUpdate** -```swift - open class func cryptoCertificatekeypairsUpdate(kpUuid: UUID, certificateKeyPairRequest: CertificateKeyPairRequest, completion: @escaping (_ data: CertificateKeyPair?, _ error: Error?) -> Void) -``` - - - -CertificateKeyPair Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. -let certificateKeyPairRequest = CertificateKeyPairRequest(name: "name_example", certificateData: "certificateData_example", keyData: "keyData_example") // CertificateKeyPairRequest | - -CryptoAPI.cryptoCertificatekeypairsUpdate(kpUuid: kpUuid, certificateKeyPairRequest: certificateKeyPairRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - **certificateKeyPairRequest** | [**CertificateKeyPairRequest**](CertificateKeyPairRequest.md) | | - -### Return type - -[**CertificateKeyPair**](CertificateKeyPair.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsUsedByList** -```swift - open class func cryptoCertificatekeypairsUsedByList(kpUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. - -CryptoAPI.cryptoCertificatekeypairsUsedByList(kpUuid: kpUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsViewCertificateRetrieve** -```swift - open class func cryptoCertificatekeypairsViewCertificateRetrieve(kpUuid: UUID, download: Bool? = nil, completion: @escaping (_ data: CertificateData?, _ error: Error?) -> Void) -``` - - - -Return certificate-key pairs certificate and log access - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. -let download = true // Bool | (optional) - -CryptoAPI.cryptoCertificatekeypairsViewCertificateRetrieve(kpUuid: kpUuid, download: download) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - **download** | **Bool** | | [optional] - -### Return type - -[**CertificateData**](CertificateData.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cryptoCertificatekeypairsViewPrivateKeyRetrieve** -```swift - open class func cryptoCertificatekeypairsViewPrivateKeyRetrieve(kpUuid: UUID, download: Bool? = nil, completion: @escaping (_ data: CertificateData?, _ error: Error?) -> Void) -``` - - - -Return certificate-key pairs private key and log access - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kpUuid = 987 // UUID | A UUID string identifying this Certificate-Key Pair. -let download = true // Bool | (optional) - -CryptoAPI.cryptoCertificatekeypairsViewPrivateKeyRetrieve(kpUuid: kpUuid, download: download) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kpUuid** | **UUID** | A UUID string identifying this Certificate-Key Pair. | - **download** | **Bool** | | [optional] - -### Return type - -[**CertificateData**](CertificateData.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/CurrentTenant.md b/docs/CurrentTenant.md deleted file mode 100644 index e661875..0000000 --- a/docs/CurrentTenant.md +++ /dev/null @@ -1,22 +0,0 @@ -# CurrentTenant - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**matchedDomain** | **String** | | -**brandingTitle** | **String** | | -**brandingLogo** | **String** | | -**brandingFavicon** | **String** | | -**uiFooterLinks** | [FooterLink] | | [readonly] -**uiTheme** | [**UiThemeEnum**](UiThemeEnum.md) | | [readonly] -**flowAuthentication** | **String** | | [optional] -**flowInvalidation** | **String** | | [optional] -**flowRecovery** | **String** | | [optional] -**flowUnenrollment** | **String** | | [optional] -**flowUserSettings** | **String** | | [optional] -**flowDeviceCode** | **String** | | [optional] -**defaultLocale** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeniedActionEnum.md b/docs/DeniedActionEnum.md deleted file mode 100644 index e8b7666..0000000 --- a/docs/DeniedActionEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# DeniedActionEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DenyStage.md b/docs/DenyStage.md deleted file mode 100644 index 1bc1461..0000000 --- a/docs/DenyStage.md +++ /dev/null @@ -1,17 +0,0 @@ -# DenyStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**denyMessage** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DenyStageRequest.md b/docs/DenyStageRequest.md deleted file mode 100644 index 5fc256f..0000000 --- a/docs/DenyStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DenyStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**denyMessage** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Device.md b/docs/Device.md deleted file mode 100644 index b7957a1..0000000 --- a/docs/Device.md +++ /dev/null @@ -1,16 +0,0 @@ -# Device - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**pk** | **Int** | | -**name** | **String** | | -**type** | **String** | Get type of device | [readonly] -**confirmed** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeviceChallenge.md b/docs/DeviceChallenge.md deleted file mode 100644 index 7a9b2ac..0000000 --- a/docs/DeviceChallenge.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeviceChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deviceClass** | **String** | | -**deviceUid** | **String** | | -**challenge** | [String: AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeviceChallengeRequest.md b/docs/DeviceChallengeRequest.md deleted file mode 100644 index c6c756e..0000000 --- a/docs/DeviceChallengeRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeviceChallengeRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deviceClass** | **String** | | -**deviceUid** | **String** | | -**challenge** | [String: AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeviceClassesEnum.md b/docs/DeviceClassesEnum.md deleted file mode 100644 index 0d23ee7..0000000 --- a/docs/DeviceClassesEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# DeviceClassesEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DigestAlgorithmEnum.md b/docs/DigestAlgorithmEnum.md deleted file mode 100644 index e742b76..0000000 --- a/docs/DigestAlgorithmEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# DigestAlgorithmEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DigitsEnum.md b/docs/DigitsEnum.md deleted file mode 100644 index dd4190d..0000000 --- a/docs/DigitsEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# DigitsEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DockerServiceConnection.md b/docs/DockerServiceConnection.md deleted file mode 100644 index 4120ae7..0000000 --- a/docs/DockerServiceConnection.md +++ /dev/null @@ -1,19 +0,0 @@ -# DockerServiceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**component** | **String** | | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**url** | **String** | Can be in the format of 'unix://<path>' when connecting to a local docker daemon, or 'https://<hostname>:2376' when connecting to a remote system. | -**tlsVerification** | **UUID** | CA which the endpoint's Certificate is verified against. Can be left empty for no validation. | [optional] -**tlsAuthentication** | **UUID** | Certificate/Key used for authentication. Can be left empty for no authentication. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DockerServiceConnectionRequest.md b/docs/DockerServiceConnectionRequest.md deleted file mode 100644 index dcf722a..0000000 --- a/docs/DockerServiceConnectionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# DockerServiceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**url** | **String** | Can be in the format of 'unix://<path>' when connecting to a local docker daemon, or 'https://<hostname>:2376' when connecting to a remote system. | -**tlsVerification** | **UUID** | CA which the endpoint's Certificate is verified against. Can be left empty for no validation. | [optional] -**tlsAuthentication** | **UUID** | Certificate/Key used for authentication. Can be left empty for no authentication. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyChallenge.md b/docs/DummyChallenge.md deleted file mode 100644 index 21c14d3..0000000 --- a/docs/DummyChallenge.md +++ /dev/null @@ -1,13 +0,0 @@ -# DummyChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-dummy"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyChallengeResponseRequest.md b/docs/DummyChallengeResponseRequest.md deleted file mode 100644 index 2d51d93..0000000 --- a/docs/DummyChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# DummyChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-dummy"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyPolicy.md b/docs/DummyPolicy.md deleted file mode 100644 index 65d6f3b..0000000 --- a/docs/DummyPolicy.md +++ /dev/null @@ -1,20 +0,0 @@ -# DummyPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**result** | **Bool** | | [optional] -**waitMin** | **Int** | | [optional] -**waitMax** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyPolicyRequest.md b/docs/DummyPolicyRequest.md deleted file mode 100644 index 7f0da97..0000000 --- a/docs/DummyPolicyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# DummyPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**result** | **Bool** | | [optional] -**waitMin** | **Int** | | [optional] -**waitMax** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyStage.md b/docs/DummyStage.md deleted file mode 100644 index b5b0775..0000000 --- a/docs/DummyStage.md +++ /dev/null @@ -1,17 +0,0 @@ -# DummyStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**throwError** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DummyStageRequest.md b/docs/DummyStageRequest.md deleted file mode 100644 index b769aab..0000000 --- a/docs/DummyStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DummyStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**throwError** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DuoDevice.md b/docs/DuoDevice.md deleted file mode 100644 index e857715..0000000 --- a/docs/DuoDevice.md +++ /dev/null @@ -1,11 +0,0 @@ -# DuoDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | The human-readable name of this device. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DuoDeviceEnrollmentStatus.md b/docs/DuoDeviceEnrollmentStatus.md deleted file mode 100644 index 05be8d9..0000000 --- a/docs/DuoDeviceEnrollmentStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# DuoDeviceEnrollmentStatus - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**duoResponse** | [**DuoResponseEnum**](DuoResponseEnum.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DuoDeviceRequest.md b/docs/DuoDeviceRequest.md deleted file mode 100644 index 524210a..0000000 --- a/docs/DuoDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# DuoDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DuoResponseEnum.md b/docs/DuoResponseEnum.md deleted file mode 100644 index e31d6e0..0000000 --- a/docs/DuoResponseEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# DuoResponseEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EmailChallenge.md b/docs/EmailChallenge.md deleted file mode 100644 index 7332912..0000000 --- a/docs/EmailChallenge.md +++ /dev/null @@ -1,13 +0,0 @@ -# EmailChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-email"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EmailChallengeResponseRequest.md b/docs/EmailChallengeResponseRequest.md deleted file mode 100644 index 3d18908..0000000 --- a/docs/EmailChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# EmailChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-email"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EmailStage.md b/docs/EmailStage.md deleted file mode 100644 index ac67f1c..0000000 --- a/docs/EmailStage.md +++ /dev/null @@ -1,28 +0,0 @@ -# EmailStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**useGlobalSettings** | **Bool** | When enabled, global Email connection settings will be used and connection settings below will be ignored. | [optional] -**host** | **String** | | [optional] -**port** | **Int** | | [optional] -**username** | **String** | | [optional] -**useTls** | **Bool** | | [optional] -**useSsl** | **Bool** | | [optional] -**timeout** | **Int** | | [optional] -**fromAddress** | **String** | | [optional] -**tokenExpiry** | **Int** | Time in minutes the token sent is valid. | [optional] -**subject** | **String** | | [optional] -**template** | **String** | | [optional] -**activateUserOnSuccess** | **Bool** | Activate users upon completion of stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EmailStageRequest.md b/docs/EmailStageRequest.md deleted file mode 100644 index 0b71505..0000000 --- a/docs/EmailStageRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# EmailStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**useGlobalSettings** | **Bool** | When enabled, global Email connection settings will be used and connection settings below will be ignored. | [optional] -**host** | **String** | | [optional] -**port** | **Int** | | [optional] -**username** | **String** | | [optional] -**password** | **String** | | [optional] -**useTls** | **Bool** | | [optional] -**useSsl** | **Bool** | | [optional] -**timeout** | **Int** | | [optional] -**fromAddress** | **String** | | [optional] -**tokenExpiry** | **Int** | Time in minutes the token sent is valid. | [optional] -**subject** | **String** | | [optional] -**template** | **String** | | [optional] -**activateUserOnSuccess** | **Bool** | Activate users upon completion of stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EnterpriseAPI.md b/docs/EnterpriseAPI.md deleted file mode 100644 index daace43..0000000 --- a/docs/EnterpriseAPI.md +++ /dev/null @@ -1,508 +0,0 @@ -# EnterpriseAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**enterpriseLicenseCreate**](EnterpriseAPI.md#enterpriselicensecreate) | **POST** /enterprise/license/ | -[**enterpriseLicenseDestroy**](EnterpriseAPI.md#enterpriselicensedestroy) | **DELETE** /enterprise/license/{license_uuid}/ | -[**enterpriseLicenseForecastRetrieve**](EnterpriseAPI.md#enterpriselicenseforecastretrieve) | **GET** /enterprise/license/forecast/ | -[**enterpriseLicenseGetInstallIdRetrieve**](EnterpriseAPI.md#enterpriselicensegetinstallidretrieve) | **GET** /enterprise/license/get_install_id/ | -[**enterpriseLicenseList**](EnterpriseAPI.md#enterpriselicenselist) | **GET** /enterprise/license/ | -[**enterpriseLicensePartialUpdate**](EnterpriseAPI.md#enterpriselicensepartialupdate) | **PATCH** /enterprise/license/{license_uuid}/ | -[**enterpriseLicenseRetrieve**](EnterpriseAPI.md#enterpriselicenseretrieve) | **GET** /enterprise/license/{license_uuid}/ | -[**enterpriseLicenseSummaryRetrieve**](EnterpriseAPI.md#enterpriselicensesummaryretrieve) | **GET** /enterprise/license/summary/ | -[**enterpriseLicenseUpdate**](EnterpriseAPI.md#enterpriselicenseupdate) | **PUT** /enterprise/license/{license_uuid}/ | -[**enterpriseLicenseUsedByList**](EnterpriseAPI.md#enterpriselicenseusedbylist) | **GET** /enterprise/license/{license_uuid}/used_by/ | - - -# **enterpriseLicenseCreate** -```swift - open class func enterpriseLicenseCreate(licenseRequest: LicenseRequest, completion: @escaping (_ data: License?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseRequest = LicenseRequest(key: "key_example") // LicenseRequest | - -EnterpriseAPI.enterpriseLicenseCreate(licenseRequest: licenseRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseRequest** | [**LicenseRequest**](LicenseRequest.md) | | - -### Return type - -[**License**](License.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseDestroy** -```swift - open class func enterpriseLicenseDestroy(licenseUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseUuid = 987 // UUID | A UUID string identifying this License. - -EnterpriseAPI.enterpriseLicenseDestroy(licenseUuid: licenseUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseUuid** | **UUID** | A UUID string identifying this License. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseForecastRetrieve** -```swift - open class func enterpriseLicenseForecastRetrieve(completion: @escaping (_ data: LicenseForecast?, _ error: Error?) -> Void) -``` - - - -Forecast how many users will be required in a year - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -EnterpriseAPI.enterpriseLicenseForecastRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**LicenseForecast**](LicenseForecast.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseGetInstallIdRetrieve** -```swift - open class func enterpriseLicenseGetInstallIdRetrieve(completion: @escaping (_ data: InstallID?, _ error: Error?) -> Void) -``` - - - -Get install_id - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -EnterpriseAPI.enterpriseLicenseGetInstallIdRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InstallID**](InstallID.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseList** -```swift - open class func enterpriseLicenseList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedLicenseList?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -EnterpriseAPI.enterpriseLicenseList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedLicenseList**](PaginatedLicenseList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicensePartialUpdate** -```swift - open class func enterpriseLicensePartialUpdate(licenseUuid: UUID, patchedLicenseRequest: PatchedLicenseRequest? = nil, completion: @escaping (_ data: License?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseUuid = 987 // UUID | A UUID string identifying this License. -let patchedLicenseRequest = PatchedLicenseRequest(key: "key_example") // PatchedLicenseRequest | (optional) - -EnterpriseAPI.enterpriseLicensePartialUpdate(licenseUuid: licenseUuid, patchedLicenseRequest: patchedLicenseRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseUuid** | **UUID** | A UUID string identifying this License. | - **patchedLicenseRequest** | [**PatchedLicenseRequest**](PatchedLicenseRequest.md) | | [optional] - -### Return type - -[**License**](License.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseRetrieve** -```swift - open class func enterpriseLicenseRetrieve(licenseUuid: UUID, completion: @escaping (_ data: License?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseUuid = 987 // UUID | A UUID string identifying this License. - -EnterpriseAPI.enterpriseLicenseRetrieve(licenseUuid: licenseUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseUuid** | **UUID** | A UUID string identifying this License. | - -### Return type - -[**License**](License.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseSummaryRetrieve** -```swift - open class func enterpriseLicenseSummaryRetrieve(completion: @escaping (_ data: LicenseSummary?, _ error: Error?) -> Void) -``` - - - -Get the total license status - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -EnterpriseAPI.enterpriseLicenseSummaryRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**LicenseSummary**](LicenseSummary.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseUpdate** -```swift - open class func enterpriseLicenseUpdate(licenseUuid: UUID, licenseRequest: LicenseRequest, completion: @escaping (_ data: License?, _ error: Error?) -> Void) -``` - - - -License Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseUuid = 987 // UUID | A UUID string identifying this License. -let licenseRequest = LicenseRequest(key: "key_example") // LicenseRequest | - -EnterpriseAPI.enterpriseLicenseUpdate(licenseUuid: licenseUuid, licenseRequest: licenseRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseUuid** | **UUID** | A UUID string identifying this License. | - **licenseRequest** | [**LicenseRequest**](LicenseRequest.md) | | - -### Return type - -[**License**](License.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enterpriseLicenseUsedByList** -```swift - open class func enterpriseLicenseUsedByList(licenseUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let licenseUuid = 987 // UUID | A UUID string identifying this License. - -EnterpriseAPI.enterpriseLicenseUsedByList(licenseUuid: licenseUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseUuid** | **UUID** | A UUID string identifying this License. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ErrorDetail.md b/docs/ErrorDetail.md deleted file mode 100644 index 812d5be..0000000 --- a/docs/ErrorDetail.md +++ /dev/null @@ -1,11 +0,0 @@ -# ErrorDetail - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | **String** | | -**code** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ErrorReportingConfig.md b/docs/ErrorReportingConfig.md deleted file mode 100644 index 6d38690..0000000 --- a/docs/ErrorReportingConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# ErrorReportingConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **Bool** | | [readonly] -**sentryDsn** | **String** | | [readonly] -**environment** | **String** | | [readonly] -**sendPii** | **Bool** | | [readonly] -**tracesSampleRate** | **Double** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Event.md b/docs/Event.md deleted file mode 100644 index f443a61..0000000 --- a/docs/Event.md +++ /dev/null @@ -1,18 +0,0 @@ -# Event - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**user** | [String: AnyCodable] | | [optional] -**action** | [**EventActions**](EventActions.md) | | -**app** | **String** | | -**context** | [String: AnyCodable] | | [optional] -**clientIp** | **String** | | [optional] -**created** | **Date** | | [readonly] -**expires** | **Date** | | [optional] -**tenant** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventActions.md b/docs/EventActions.md deleted file mode 100644 index d07548f..0000000 --- a/docs/EventActions.md +++ /dev/null @@ -1,9 +0,0 @@ -# EventActions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventMatcherPolicy.md b/docs/EventMatcherPolicy.md deleted file mode 100644 index dee8a2b..0000000 --- a/docs/EventMatcherPolicy.md +++ /dev/null @@ -1,21 +0,0 @@ -# EventMatcherPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**action** | [**EventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] -**clientIp** | **String** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**app** | [**AppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise | [optional] -**model** | [**ModelEnum**](ModelEnum.md) | Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventMatcherPolicyRequest.md b/docs/EventMatcherPolicyRequest.md deleted file mode 100644 index ba76788..0000000 --- a/docs/EventMatcherPolicyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# EventMatcherPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**action** | [**EventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] -**clientIp** | **String** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**app** | [**AppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise | [optional] -**model** | [**ModelEnum**](ModelEnum.md) | Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventRequest.md b/docs/EventRequest.md deleted file mode 100644 index bb4cb3a..0000000 --- a/docs/EventRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# EventRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [String: AnyCodable] | | [optional] -**action** | [**EventActions**](EventActions.md) | | -**app** | **String** | | -**context** | [String: AnyCodable] | | [optional] -**clientIp** | **String** | | [optional] -**expires** | **Date** | | [optional] -**tenant** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventTopPerUser.md b/docs/EventTopPerUser.md deleted file mode 100644 index 85d52d4..0000000 --- a/docs/EventTopPerUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# EventTopPerUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**application** | [String: AnyCodable] | | -**countedEvents** | **Int** | | -**uniqueUsers** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventsAPI.md b/docs/EventsAPI.md deleted file mode 100644 index 462af5c..0000000 --- a/docs/EventsAPI.md +++ /dev/null @@ -1,1704 +0,0 @@ -# EventsAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**eventsEventsActionsList**](EventsAPI.md#eventseventsactionslist) | **GET** /events/events/actions/ | -[**eventsEventsCreate**](EventsAPI.md#eventseventscreate) | **POST** /events/events/ | -[**eventsEventsDestroy**](EventsAPI.md#eventseventsdestroy) | **DELETE** /events/events/{event_uuid}/ | -[**eventsEventsList**](EventsAPI.md#eventseventslist) | **GET** /events/events/ | -[**eventsEventsPartialUpdate**](EventsAPI.md#eventseventspartialupdate) | **PATCH** /events/events/{event_uuid}/ | -[**eventsEventsPerMonthList**](EventsAPI.md#eventseventspermonthlist) | **GET** /events/events/per_month/ | -[**eventsEventsRetrieve**](EventsAPI.md#eventseventsretrieve) | **GET** /events/events/{event_uuid}/ | -[**eventsEventsTopPerUserList**](EventsAPI.md#eventseventstopperuserlist) | **GET** /events/events/top_per_user/ | -[**eventsEventsUpdate**](EventsAPI.md#eventseventsupdate) | **PUT** /events/events/{event_uuid}/ | -[**eventsEventsVolumeList**](EventsAPI.md#eventseventsvolumelist) | **GET** /events/events/volume/ | -[**eventsNotificationsDestroy**](EventsAPI.md#eventsnotificationsdestroy) | **DELETE** /events/notifications/{uuid}/ | -[**eventsNotificationsList**](EventsAPI.md#eventsnotificationslist) | **GET** /events/notifications/ | -[**eventsNotificationsMarkAllSeenCreate**](EventsAPI.md#eventsnotificationsmarkallseencreate) | **POST** /events/notifications/mark_all_seen/ | -[**eventsNotificationsPartialUpdate**](EventsAPI.md#eventsnotificationspartialupdate) | **PATCH** /events/notifications/{uuid}/ | -[**eventsNotificationsRetrieve**](EventsAPI.md#eventsnotificationsretrieve) | **GET** /events/notifications/{uuid}/ | -[**eventsNotificationsUpdate**](EventsAPI.md#eventsnotificationsupdate) | **PUT** /events/notifications/{uuid}/ | -[**eventsNotificationsUsedByList**](EventsAPI.md#eventsnotificationsusedbylist) | **GET** /events/notifications/{uuid}/used_by/ | -[**eventsRulesCreate**](EventsAPI.md#eventsrulescreate) | **POST** /events/rules/ | -[**eventsRulesDestroy**](EventsAPI.md#eventsrulesdestroy) | **DELETE** /events/rules/{pbm_uuid}/ | -[**eventsRulesList**](EventsAPI.md#eventsruleslist) | **GET** /events/rules/ | -[**eventsRulesPartialUpdate**](EventsAPI.md#eventsrulespartialupdate) | **PATCH** /events/rules/{pbm_uuid}/ | -[**eventsRulesRetrieve**](EventsAPI.md#eventsrulesretrieve) | **GET** /events/rules/{pbm_uuid}/ | -[**eventsRulesUpdate**](EventsAPI.md#eventsrulesupdate) | **PUT** /events/rules/{pbm_uuid}/ | -[**eventsRulesUsedByList**](EventsAPI.md#eventsrulesusedbylist) | **GET** /events/rules/{pbm_uuid}/used_by/ | -[**eventsTransportsCreate**](EventsAPI.md#eventstransportscreate) | **POST** /events/transports/ | -[**eventsTransportsDestroy**](EventsAPI.md#eventstransportsdestroy) | **DELETE** /events/transports/{uuid}/ | -[**eventsTransportsList**](EventsAPI.md#eventstransportslist) | **GET** /events/transports/ | -[**eventsTransportsPartialUpdate**](EventsAPI.md#eventstransportspartialupdate) | **PATCH** /events/transports/{uuid}/ | -[**eventsTransportsRetrieve**](EventsAPI.md#eventstransportsretrieve) | **GET** /events/transports/{uuid}/ | -[**eventsTransportsTestCreate**](EventsAPI.md#eventstransportstestcreate) | **POST** /events/transports/{uuid}/test/ | -[**eventsTransportsUpdate**](EventsAPI.md#eventstransportsupdate) | **PUT** /events/transports/{uuid}/ | -[**eventsTransportsUsedByList**](EventsAPI.md#eventstransportsusedbylist) | **GET** /events/transports/{uuid}/used_by/ | - - -# **eventsEventsActionsList** -```swift - open class func eventsEventsActionsList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all actions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -EventsAPI.eventsEventsActionsList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsCreate** -```swift - open class func eventsEventsCreate(eventRequest: EventRequest, completion: @escaping (_ data: Event?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventRequest = EventRequest(user: "TODO", action: EventActions(), app: "app_example", context: "TODO", clientIp: "clientIp_example", expires: Date(), tenant: "TODO") // EventRequest | - -EventsAPI.eventsEventsCreate(eventRequest: eventRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventRequest** | [**EventRequest**](EventRequest.md) | | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsDestroy** -```swift - open class func eventsEventsDestroy(eventUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventUuid = 987 // UUID | A UUID string identifying this Event. - -EventsAPI.eventsEventsDestroy(eventUuid: eventUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventUuid** | **UUID** | A UUID string identifying this Event. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsList** -```swift - open class func eventsEventsList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil, completion: @escaping (_ data: PaginatedEventList?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let action = "action_example" // String | (optional) -let clientIp = "clientIp_example" // String | (optional) -let contextAuthorizedApp = "contextAuthorizedApp_example" // String | Context Authorized application (optional) -let contextModelApp = "contextModelApp_example" // String | Context Model App (optional) -let contextModelName = "contextModelName_example" // String | Context Model Name (optional) -let contextModelPk = "contextModelPk_example" // String | Context Model Primary Key (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let tenantName = "tenantName_example" // String | Tenant name (optional) -let username = "username_example" // String | Username (optional) - -EventsAPI.eventsEventsList(action: action, clientIp: clientIp, contextAuthorizedApp: contextAuthorizedApp, contextModelApp: contextModelApp, contextModelName: contextModelName, contextModelPk: contextModelPk, ordering: ordering, page: page, pageSize: pageSize, search: search, tenantName: tenantName, username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **action** | **String** | | [optional] - **clientIp** | **String** | | [optional] - **contextAuthorizedApp** | **String** | Context Authorized application | [optional] - **contextModelApp** | **String** | Context Model App | [optional] - **contextModelName** | **String** | Context Model Name | [optional] - **contextModelPk** | **String** | Context Model Primary Key | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **tenantName** | **String** | Tenant name | [optional] - **username** | **String** | Username | [optional] - -### Return type - -[**PaginatedEventList**](PaginatedEventList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsPartialUpdate** -```swift - open class func eventsEventsPartialUpdate(eventUuid: UUID, patchedEventRequest: PatchedEventRequest? = nil, completion: @escaping (_ data: Event?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventUuid = 987 // UUID | A UUID string identifying this Event. -let patchedEventRequest = PatchedEventRequest(user: "TODO", action: EventActions(), app: "app_example", context: "TODO", clientIp: "clientIp_example", expires: Date(), tenant: "TODO") // PatchedEventRequest | (optional) - -EventsAPI.eventsEventsPartialUpdate(eventUuid: eventUuid, patchedEventRequest: patchedEventRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventUuid** | **UUID** | A UUID string identifying this Event. | - **patchedEventRequest** | [**PatchedEventRequest**](PatchedEventRequest.md) | | [optional] - -### Return type - -[**Event**](Event.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsPerMonthList** -```swift - open class func eventsEventsPerMonthList(action: String? = nil, query: String? = nil, completion: @escaping (_ data: [Coordinate]?, _ error: Error?) -> Void) -``` - - - -Get the count of events per month - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let action = "action_example" // String | (optional) -let query = "query_example" // String | (optional) - -EventsAPI.eventsEventsPerMonthList(action: action, query: query) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **action** | **String** | | [optional] - **query** | **String** | | [optional] - -### Return type - -[**[Coordinate]**](Coordinate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsRetrieve** -```swift - open class func eventsEventsRetrieve(eventUuid: UUID, completion: @escaping (_ data: Event?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventUuid = 987 // UUID | A UUID string identifying this Event. - -EventsAPI.eventsEventsRetrieve(eventUuid: eventUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventUuid** | **UUID** | A UUID string identifying this Event. | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsTopPerUserList** -```swift - open class func eventsEventsTopPerUserList(action: String? = nil, topN: Int? = nil, completion: @escaping (_ data: [EventTopPerUser]?, _ error: Error?) -> Void) -``` - - - -Get the top_n events grouped by user count - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let action = "action_example" // String | (optional) -let topN = 987 // Int | (optional) - -EventsAPI.eventsEventsTopPerUserList(action: action, topN: topN) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **action** | **String** | | [optional] - **topN** | **Int** | | [optional] - -### Return type - -[**[EventTopPerUser]**](EventTopPerUser.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsUpdate** -```swift - open class func eventsEventsUpdate(eventUuid: UUID, eventRequest: EventRequest, completion: @escaping (_ data: Event?, _ error: Error?) -> Void) -``` - - - -Event Read-Only Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventUuid = 987 // UUID | A UUID string identifying this Event. -let eventRequest = EventRequest(user: "TODO", action: EventActions(), app: "app_example", context: "TODO", clientIp: "clientIp_example", expires: Date(), tenant: "TODO") // EventRequest | - -EventsAPI.eventsEventsUpdate(eventUuid: eventUuid, eventRequest: eventRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventUuid** | **UUID** | A UUID string identifying this Event. | - **eventRequest** | [**EventRequest**](EventRequest.md) | | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsEventsVolumeList** -```swift - open class func eventsEventsVolumeList(action: String? = nil, clientIp: String? = nil, contextAuthorizedApp: String? = nil, contextModelApp: String? = nil, contextModelName: String? = nil, contextModelPk: String? = nil, ordering: String? = nil, search: String? = nil, tenantName: String? = nil, username: String? = nil, completion: @escaping (_ data: [Coordinate]?, _ error: Error?) -> Void) -``` - - - -Get event volume for specified filters and timeframe - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let action = "action_example" // String | (optional) -let clientIp = "clientIp_example" // String | (optional) -let contextAuthorizedApp = "contextAuthorizedApp_example" // String | Context Authorized application (optional) -let contextModelApp = "contextModelApp_example" // String | Context Model App (optional) -let contextModelName = "contextModelName_example" // String | Context Model Name (optional) -let contextModelPk = "contextModelPk_example" // String | Context Model Primary Key (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let search = "search_example" // String | A search term. (optional) -let tenantName = "tenantName_example" // String | Tenant name (optional) -let username = "username_example" // String | Username (optional) - -EventsAPI.eventsEventsVolumeList(action: action, clientIp: clientIp, contextAuthorizedApp: contextAuthorizedApp, contextModelApp: contextModelApp, contextModelName: contextModelName, contextModelPk: contextModelPk, ordering: ordering, search: search, tenantName: tenantName, username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **action** | **String** | | [optional] - **clientIp** | **String** | | [optional] - **contextAuthorizedApp** | **String** | Context Authorized application | [optional] - **contextModelApp** | **String** | Context Model App | [optional] - **contextModelName** | **String** | Context Model Name | [optional] - **contextModelPk** | **String** | Context Model Primary Key | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **search** | **String** | A search term. | [optional] - **tenantName** | **String** | Tenant name | [optional] - **username** | **String** | Username | [optional] - -### Return type - -[**[Coordinate]**](Coordinate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsDestroy** -```swift - open class func eventsNotificationsDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Notification Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification. - -EventsAPI.eventsNotificationsDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsList** -```swift - open class func eventsNotificationsList(body: String? = nil, created: Date? = nil, event: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, seen: Bool? = nil, severity: Severity_eventsNotificationsList? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedNotificationList?, _ error: Error?) -> Void) -``` - - - -Notification Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let body = "body_example" // String | (optional) -let created = Date() // Date | (optional) -let event = 987 // UUID | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let seen = true // Bool | (optional) -let severity = "severity_example" // String | * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) -let user = 987 // Int | (optional) - -EventsAPI.eventsNotificationsList(body: body, created: created, event: event, ordering: ordering, page: page, pageSize: pageSize, search: search, seen: seen, severity: severity, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | | [optional] - **created** | **Date** | | [optional] - **event** | **UUID** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **seen** | **Bool** | | [optional] - **severity** | **String** | * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedNotificationList**](PaginatedNotificationList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsMarkAllSeenCreate** -```swift - open class func eventsNotificationsMarkAllSeenCreate(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Mark all the user's notifications as seen - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -EventsAPI.eventsNotificationsMarkAllSeenCreate() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsPartialUpdate** -```swift - open class func eventsNotificationsPartialUpdate(uuid: UUID, patchedNotificationRequest: PatchedNotificationRequest? = nil, completion: @escaping (_ data: Notification?, _ error: Error?) -> Void) -``` - - - -Notification Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification. -let patchedNotificationRequest = PatchedNotificationRequest(event: EventRequest(user: "TODO", action: EventActions(), app: "app_example", context: "TODO", clientIp: "clientIp_example", expires: Date(), tenant: "TODO"), seen: false) // PatchedNotificationRequest | (optional) - -EventsAPI.eventsNotificationsPartialUpdate(uuid: uuid, patchedNotificationRequest: patchedNotificationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification. | - **patchedNotificationRequest** | [**PatchedNotificationRequest**](PatchedNotificationRequest.md) | | [optional] - -### Return type - -[**Notification**](Notification.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsRetrieve** -```swift - open class func eventsNotificationsRetrieve(uuid: UUID, completion: @escaping (_ data: Notification?, _ error: Error?) -> Void) -``` - - - -Notification Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification. - -EventsAPI.eventsNotificationsRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification. | - -### Return type - -[**Notification**](Notification.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsUpdate** -```swift - open class func eventsNotificationsUpdate(uuid: UUID, notificationRequest: NotificationRequest? = nil, completion: @escaping (_ data: Notification?, _ error: Error?) -> Void) -``` - - - -Notification Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification. -let notificationRequest = NotificationRequest(event: EventRequest(user: "TODO", action: EventActions(), app: "app_example", context: "TODO", clientIp: "clientIp_example", expires: Date(), tenant: "TODO"), seen: false) // NotificationRequest | (optional) - -EventsAPI.eventsNotificationsUpdate(uuid: uuid, notificationRequest: notificationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification. | - **notificationRequest** | [**NotificationRequest**](NotificationRequest.md) | | [optional] - -### Return type - -[**Notification**](Notification.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsNotificationsUsedByList** -```swift - open class func eventsNotificationsUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification. - -EventsAPI.eventsNotificationsUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesCreate** -```swift - open class func eventsRulesCreate(notificationRuleRequest: NotificationRuleRequest, completion: @escaping (_ data: NotificationRule?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let notificationRuleRequest = NotificationRuleRequest(name: "name_example", transports: [123], severity: SeverityEnum(), group: 123) // NotificationRuleRequest | - -EventsAPI.eventsRulesCreate(notificationRuleRequest: notificationRuleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationRuleRequest** | [**NotificationRuleRequest**](NotificationRuleRequest.md) | | - -### Return type - -[**NotificationRule**](NotificationRule.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesDestroy** -```swift - open class func eventsRulesDestroy(pbmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pbmUuid = 987 // UUID | A UUID string identifying this Notification Rule. - -EventsAPI.eventsRulesDestroy(pbmUuid: pbmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pbmUuid** | **UUID** | A UUID string identifying this Notification Rule. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesList** -```swift - open class func eventsRulesList(groupName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, severity: Severity_eventsRulesList? = nil, completion: @escaping (_ data: PaginatedNotificationRuleList?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupName = "groupName_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let severity = "severity_example" // String | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert (optional) - -EventsAPI.eventsRulesList(groupName: groupName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, severity: severity) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupName** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **severity** | **String** | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] - -### Return type - -[**PaginatedNotificationRuleList**](PaginatedNotificationRuleList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesPartialUpdate** -```swift - open class func eventsRulesPartialUpdate(pbmUuid: UUID, patchedNotificationRuleRequest: PatchedNotificationRuleRequest? = nil, completion: @escaping (_ data: NotificationRule?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pbmUuid = 987 // UUID | A UUID string identifying this Notification Rule. -let patchedNotificationRuleRequest = PatchedNotificationRuleRequest(name: "name_example", transports: [123], severity: SeverityEnum(), group: 123) // PatchedNotificationRuleRequest | (optional) - -EventsAPI.eventsRulesPartialUpdate(pbmUuid: pbmUuid, patchedNotificationRuleRequest: patchedNotificationRuleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pbmUuid** | **UUID** | A UUID string identifying this Notification Rule. | - **patchedNotificationRuleRequest** | [**PatchedNotificationRuleRequest**](PatchedNotificationRuleRequest.md) | | [optional] - -### Return type - -[**NotificationRule**](NotificationRule.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesRetrieve** -```swift - open class func eventsRulesRetrieve(pbmUuid: UUID, completion: @escaping (_ data: NotificationRule?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pbmUuid = 987 // UUID | A UUID string identifying this Notification Rule. - -EventsAPI.eventsRulesRetrieve(pbmUuid: pbmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pbmUuid** | **UUID** | A UUID string identifying this Notification Rule. | - -### Return type - -[**NotificationRule**](NotificationRule.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesUpdate** -```swift - open class func eventsRulesUpdate(pbmUuid: UUID, notificationRuleRequest: NotificationRuleRequest, completion: @escaping (_ data: NotificationRule?, _ error: Error?) -> Void) -``` - - - -NotificationRule Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pbmUuid = 987 // UUID | A UUID string identifying this Notification Rule. -let notificationRuleRequest = NotificationRuleRequest(name: "name_example", transports: [123], severity: SeverityEnum(), group: 123) // NotificationRuleRequest | - -EventsAPI.eventsRulesUpdate(pbmUuid: pbmUuid, notificationRuleRequest: notificationRuleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pbmUuid** | **UUID** | A UUID string identifying this Notification Rule. | - **notificationRuleRequest** | [**NotificationRuleRequest**](NotificationRuleRequest.md) | | - -### Return type - -[**NotificationRule**](NotificationRule.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsRulesUsedByList** -```swift - open class func eventsRulesUsedByList(pbmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pbmUuid = 987 // UUID | A UUID string identifying this Notification Rule. - -EventsAPI.eventsRulesUsedByList(pbmUuid: pbmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pbmUuid** | **UUID** | A UUID string identifying this Notification Rule. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsCreate** -```swift - open class func eventsTransportsCreate(notificationTransportRequest: NotificationTransportRequest, completion: @escaping (_ data: NotificationTransport?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMapping: 123, sendOnce: false) // NotificationTransportRequest | - -EventsAPI.eventsTransportsCreate(notificationTransportRequest: notificationTransportRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationTransportRequest** | [**NotificationTransportRequest**](NotificationTransportRequest.md) | | - -### Return type - -[**NotificationTransport**](NotificationTransport.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsDestroy** -```swift - open class func eventsTransportsDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. - -EventsAPI.eventsTransportsDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsList** -```swift - open class func eventsTransportsList(mode: Mode_eventsTransportsList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sendOnce: Bool? = nil, webhookUrl: String? = nil, completion: @escaping (_ data: PaginatedNotificationTransportList?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let mode = "mode_example" // String | * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let sendOnce = true // Bool | (optional) -let webhookUrl = "webhookUrl_example" // String | (optional) - -EventsAPI.eventsTransportsList(mode: mode, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, sendOnce: sendOnce, webhookUrl: webhookUrl) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mode** | **String** | * `local` - authentik inbuilt notifications * `webhook` - Generic Webhook * `webhook_slack` - Slack Webhook (Slack/Discord) * `email` - Email | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **sendOnce** | **Bool** | | [optional] - **webhookUrl** | **String** | | [optional] - -### Return type - -[**PaginatedNotificationTransportList**](PaginatedNotificationTransportList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsPartialUpdate** -```swift - open class func eventsTransportsPartialUpdate(uuid: UUID, patchedNotificationTransportRequest: PatchedNotificationTransportRequest? = nil, completion: @escaping (_ data: NotificationTransport?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. -let patchedNotificationTransportRequest = PatchedNotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMapping: 123, sendOnce: false) // PatchedNotificationTransportRequest | (optional) - -EventsAPI.eventsTransportsPartialUpdate(uuid: uuid, patchedNotificationTransportRequest: patchedNotificationTransportRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - **patchedNotificationTransportRequest** | [**PatchedNotificationTransportRequest**](PatchedNotificationTransportRequest.md) | | [optional] - -### Return type - -[**NotificationTransport**](NotificationTransport.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsRetrieve** -```swift - open class func eventsTransportsRetrieve(uuid: UUID, completion: @escaping (_ data: NotificationTransport?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. - -EventsAPI.eventsTransportsRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - -### Return type - -[**NotificationTransport**](NotificationTransport.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsTestCreate** -```swift - open class func eventsTransportsTestCreate(uuid: UUID, completion: @escaping (_ data: NotificationTransportTest?, _ error: Error?) -> Void) -``` - - - -Send example notification using selected transport. Requires Modify permissions. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. - -EventsAPI.eventsTransportsTestCreate(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - -### Return type - -[**NotificationTransportTest**](NotificationTransportTest.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsUpdate** -```swift - open class func eventsTransportsUpdate(uuid: UUID, notificationTransportRequest: NotificationTransportRequest, completion: @escaping (_ data: NotificationTransport?, _ error: Error?) -> Void) -``` - - - -NotificationTransport Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. -let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMapping: 123, sendOnce: false) // NotificationTransportRequest | - -EventsAPI.eventsTransportsUpdate(uuid: uuid, notificationTransportRequest: notificationTransportRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - **notificationTransportRequest** | [**NotificationTransportRequest**](NotificationTransportRequest.md) | | - -### Return type - -[**NotificationTransport**](NotificationTransport.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **eventsTransportsUsedByList** -```swift - open class func eventsTransportsUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Notification Transport. - -EventsAPI.eventsTransportsUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Notification Transport. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ExpiringBaseGrantModel.md b/docs/ExpiringBaseGrantModel.md deleted file mode 100644 index 107a818..0000000 --- a/docs/ExpiringBaseGrantModel.md +++ /dev/null @@ -1,15 +0,0 @@ -# ExpiringBaseGrantModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**provider** | [**OAuth2Provider**](OAuth2Provider.md) | | -**user** | [**User**](User.md) | | -**isExpired** | **Bool** | Check if token is expired yet. | [readonly] -**expires** | **Date** | | [optional] -**scope** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExpressionPolicy.md b/docs/ExpressionPolicy.md deleted file mode 100644 index 730ceec..0000000 --- a/docs/ExpressionPolicy.md +++ /dev/null @@ -1,18 +0,0 @@ -# ExpressionPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**expression** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExpressionPolicyRequest.md b/docs/ExpressionPolicyRequest.md deleted file mode 100644 index 06d5ead..0000000 --- a/docs/ExpressionPolicyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExpressionPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**expression** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExtraRoleObjectPermission.md b/docs/ExtraRoleObjectPermission.md deleted file mode 100644 index f6fa4ac..0000000 --- a/docs/ExtraRoleObjectPermission.md +++ /dev/null @@ -1,18 +0,0 @@ -# ExtraRoleObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int** | | [readonly] -**codename** | **String** | | [readonly] -**model** | **String** | | [readonly] -**appLabel** | **String** | | [readonly] -**objectPk** | **String** | | [readonly] -**name** | **String** | | [readonly] -**appLabelVerbose** | **String** | Get app label from permission's model | [readonly] -**modelVerbose** | **String** | Get model label from permission's model | [readonly] -**objectDescription** | **String** | Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExtraUserObjectPermission.md b/docs/ExtraUserObjectPermission.md deleted file mode 100644 index bad674c..0000000 --- a/docs/ExtraUserObjectPermission.md +++ /dev/null @@ -1,18 +0,0 @@ -# ExtraUserObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int** | | [readonly] -**codename** | **String** | | [readonly] -**model** | **String** | | [readonly] -**appLabel** | **String** | | [readonly] -**objectPk** | **String** | | [readonly] -**name** | **String** | | [readonly] -**appLabelVerbose** | **String** | Get app label from permission's model | [readonly] -**modelVerbose** | **String** | Get model label from permission's model | [readonly] -**objectDescription** | **String** | Get model description from attached model. This operation takes at least one additional query, and the description is only shown if the user/role has the view_ permission on the object | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FilePathRequest.md b/docs/FilePathRequest.md deleted file mode 100644 index 48f7014..0000000 --- a/docs/FilePathRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# FilePathRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Flow.md b/docs/Flow.md deleted file mode 100644 index 7f0841a..0000000 --- a/docs/Flow.md +++ /dev/null @@ -1,25 +0,0 @@ -# Flow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**policybindingmodelPtrId** | **UUID** | | [readonly] -**name** | **String** | | -**slug** | **String** | Visible in the URL. | -**title** | **String** | Shown as the Title in Flow pages. | -**designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | -**background** | **String** | Get the URL to the background image. If the name is /static or starts with http it is returned as-is | [readonly] -**stages** | **[UUID]** | | [readonly] -**policies** | **[UUID]** | | [readonly] -**cacheCount** | **Int** | Get count of cached flows | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**compatibilityMode** | **Bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**exportUrl** | **String** | Get export URL for flow | [readonly] -**layout** | [**LayoutEnum**](LayoutEnum.md) | | [optional] -**deniedAction** | [**DeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**authentication** | [**AuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowChallengeResponseRequest.md b/docs/FlowChallengeResponseRequest.md deleted file mode 100644 index 5a7f688..0000000 --- a/docs/FlowChallengeResponseRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# FlowChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-user-login"] -**code** | **Int** | | -**phoneNumber** | **String** | | [optional] -**selectedChallenge** | [**DeviceChallengeRequest**](DeviceChallengeRequest.md) | | [optional] -**selectedStage** | **String** | | [optional] -**webauthn** | [String: AnyCodable] | | [optional] -**duo** | **Int** | | [optional] -**response** | [String: AnyCodable] | | -**token** | **String** | | -**uidField** | **String** | | -**password** | **String** | | -**rememberMe** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowDesignationEnum.md b/docs/FlowDesignationEnum.md deleted file mode 100644 index c6ff696..0000000 --- a/docs/FlowDesignationEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# FlowDesignationEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowDiagram.md b/docs/FlowDiagram.md deleted file mode 100644 index 743d77f..0000000 --- a/docs/FlowDiagram.md +++ /dev/null @@ -1,10 +0,0 @@ -# FlowDiagram - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**diagram** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowErrorChallenge.md b/docs/FlowErrorChallenge.md deleted file mode 100644 index 5a8f33e..0000000 --- a/docs/FlowErrorChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# FlowErrorChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | | [optional] [default to "native"] -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-flow-error"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**requestId** | **String** | | -**error** | **String** | | [optional] -**traceback** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowImportResult.md b/docs/FlowImportResult.md deleted file mode 100644 index 36af7f7..0000000 --- a/docs/FlowImportResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# FlowImportResult - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**logs** | [[String: AnyCodable]] | | [readonly] -**success** | **Bool** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowInspection.md b/docs/FlowInspection.md deleted file mode 100644 index 1546ddc..0000000 --- a/docs/FlowInspection.md +++ /dev/null @@ -1,12 +0,0 @@ -# FlowInspection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plans** | [FlowInspectorPlan] | | -**currentPlan** | [**FlowInspectorPlan**](FlowInspectorPlan.md) | | [optional] -**isCompleted** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowInspectorPlan.md b/docs/FlowInspectorPlan.md deleted file mode 100644 index 6b9e3ef..0000000 --- a/docs/FlowInspectorPlan.md +++ /dev/null @@ -1,13 +0,0 @@ -# FlowInspectorPlan - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currentStage** | [**FlowStageBinding**](FlowStageBinding.md) | | [readonly] -**nextPlannedStage** | [**FlowStageBinding**](FlowStageBinding.md) | | [readonly] -**planContext** | [String: AnyCodable] | Get the plan's context, sanitized | [readonly] -**sessionId** | **String** | Get a unique session ID | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowRequest.md b/docs/FlowRequest.md deleted file mode 100644 index abf1ab8..0000000 --- a/docs/FlowRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# FlowRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**slug** | **String** | Visible in the URL. | -**title** | **String** | Shown as the Title in Flow pages. | -**designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**compatibilityMode** | **Bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**layout** | [**LayoutEnum**](LayoutEnum.md) | | [optional] -**deniedAction** | [**DeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**authentication** | [**AuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowSet.md b/docs/FlowSet.md deleted file mode 100644 index 4c382a0..0000000 --- a/docs/FlowSet.md +++ /dev/null @@ -1,21 +0,0 @@ -# FlowSet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**policybindingmodelPtrId** | **UUID** | | [readonly] -**name** | **String** | | -**slug** | **String** | Visible in the URL. | -**title** | **String** | Shown as the Title in Flow pages. | -**designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | -**background** | **String** | Get the URL to the background image. If the name is /static or starts with http it is returned as-is | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**compatibilityMode** | **Bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**exportUrl** | **String** | Get export URL for flow | [readonly] -**layout** | [**LayoutEnum**](LayoutEnum.md) | | [optional] -**deniedAction** | [**DeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowSetRequest.md b/docs/FlowSetRequest.md deleted file mode 100644 index d24e70e..0000000 --- a/docs/FlowSetRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# FlowSetRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**slug** | **String** | Visible in the URL. | -**title** | **String** | Shown as the Title in Flow pages. | -**designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**compatibilityMode** | **Bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**layout** | [**LayoutEnum**](LayoutEnum.md) | | [optional] -**deniedAction** | [**DeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowStageBinding.md b/docs/FlowStageBinding.md deleted file mode 100644 index 7d6ffce..0000000 --- a/docs/FlowStageBinding.md +++ /dev/null @@ -1,19 +0,0 @@ -# FlowStageBinding - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**policybindingmodelPtrId** | **UUID** | | [readonly] -**target** | **UUID** | | -**stage** | **UUID** | | -**stageObj** | [**Stage**](Stage.md) | | [readonly] -**evaluateOnPlan** | **Bool** | Evaluate policies during the Flow planning process. | [optional] -**reEvaluatePolicies** | **Bool** | Evaluate policies when the Stage is present to the user. | [optional] -**order** | **Int** | | -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**invalidResponseAction** | [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowStageBindingRequest.md b/docs/FlowStageBindingRequest.md deleted file mode 100644 index 8adc096..0000000 --- a/docs/FlowStageBindingRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# FlowStageBindingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**target** | **UUID** | | -**stage** | **UUID** | | -**evaluateOnPlan** | **Bool** | Evaluate policies during the Flow planning process. | [optional] -**reEvaluatePolicies** | **Bool** | Evaluate policies when the Stage is present to the user. | [optional] -**order** | **Int** | | -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**invalidResponseAction** | [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowsAPI.md b/docs/FlowsAPI.md deleted file mode 100644 index 72f3d33..0000000 --- a/docs/FlowsAPI.md +++ /dev/null @@ -1,1314 +0,0 @@ -# FlowsAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**flowsBindingsCreate**](FlowsAPI.md#flowsbindingscreate) | **POST** /flows/bindings/ | -[**flowsBindingsDestroy**](FlowsAPI.md#flowsbindingsdestroy) | **DELETE** /flows/bindings/{fsb_uuid}/ | -[**flowsBindingsList**](FlowsAPI.md#flowsbindingslist) | **GET** /flows/bindings/ | -[**flowsBindingsPartialUpdate**](FlowsAPI.md#flowsbindingspartialupdate) | **PATCH** /flows/bindings/{fsb_uuid}/ | -[**flowsBindingsRetrieve**](FlowsAPI.md#flowsbindingsretrieve) | **GET** /flows/bindings/{fsb_uuid}/ | -[**flowsBindingsUpdate**](FlowsAPI.md#flowsbindingsupdate) | **PUT** /flows/bindings/{fsb_uuid}/ | -[**flowsBindingsUsedByList**](FlowsAPI.md#flowsbindingsusedbylist) | **GET** /flows/bindings/{fsb_uuid}/used_by/ | -[**flowsExecutorGet**](FlowsAPI.md#flowsexecutorget) | **GET** /flows/executor/{flow_slug}/ | -[**flowsExecutorSolve**](FlowsAPI.md#flowsexecutorsolve) | **POST** /flows/executor/{flow_slug}/ | -[**flowsInspectorGet**](FlowsAPI.md#flowsinspectorget) | **GET** /flows/inspector/{flow_slug}/ | -[**flowsInstancesCacheClearCreate**](FlowsAPI.md#flowsinstancescacheclearcreate) | **POST** /flows/instances/cache_clear/ | -[**flowsInstancesCacheInfoRetrieve**](FlowsAPI.md#flowsinstancescacheinforetrieve) | **GET** /flows/instances/cache_info/ | -[**flowsInstancesCreate**](FlowsAPI.md#flowsinstancescreate) | **POST** /flows/instances/ | -[**flowsInstancesDestroy**](FlowsAPI.md#flowsinstancesdestroy) | **DELETE** /flows/instances/{slug}/ | -[**flowsInstancesDiagramRetrieve**](FlowsAPI.md#flowsinstancesdiagramretrieve) | **GET** /flows/instances/{slug}/diagram/ | -[**flowsInstancesExecuteRetrieve**](FlowsAPI.md#flowsinstancesexecuteretrieve) | **GET** /flows/instances/{slug}/execute/ | -[**flowsInstancesExportRetrieve**](FlowsAPI.md#flowsinstancesexportretrieve) | **GET** /flows/instances/{slug}/export/ | -[**flowsInstancesImportCreate**](FlowsAPI.md#flowsinstancesimportcreate) | **POST** /flows/instances/import/ | -[**flowsInstancesList**](FlowsAPI.md#flowsinstanceslist) | **GET** /flows/instances/ | -[**flowsInstancesPartialUpdate**](FlowsAPI.md#flowsinstancespartialupdate) | **PATCH** /flows/instances/{slug}/ | -[**flowsInstancesRetrieve**](FlowsAPI.md#flowsinstancesretrieve) | **GET** /flows/instances/{slug}/ | -[**flowsInstancesSetBackgroundCreate**](FlowsAPI.md#flowsinstancessetbackgroundcreate) | **POST** /flows/instances/{slug}/set_background/ | -[**flowsInstancesSetBackgroundUrlCreate**](FlowsAPI.md#flowsinstancessetbackgroundurlcreate) | **POST** /flows/instances/{slug}/set_background_url/ | -[**flowsInstancesUpdate**](FlowsAPI.md#flowsinstancesupdate) | **PUT** /flows/instances/{slug}/ | -[**flowsInstancesUsedByList**](FlowsAPI.md#flowsinstancesusedbylist) | **GET** /flows/instances/{slug}/used_by/ | - - -# **flowsBindingsCreate** -```swift - open class func flowsBindingsCreate(flowStageBindingRequest: FlowStageBindingRequest, completion: @escaping (_ data: FlowStageBinding?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let flowStageBindingRequest = FlowStageBindingRequest(target: 123, stage: 123, evaluateOnPlan: false, reEvaluatePolicies: false, order: 123, policyEngineMode: PolicyEngineMode(), invalidResponseAction: InvalidResponseActionEnum()) // FlowStageBindingRequest | - -FlowsAPI.flowsBindingsCreate(flowStageBindingRequest: flowStageBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flowStageBindingRequest** | [**FlowStageBindingRequest**](FlowStageBindingRequest.md) | | - -### Return type - -[**FlowStageBinding**](FlowStageBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsDestroy** -```swift - open class func flowsBindingsDestroy(fsbUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fsbUuid = 987 // UUID | A UUID string identifying this Flow Stage Binding. - -FlowsAPI.flowsBindingsDestroy(fsbUuid: fsbUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fsbUuid** | **UUID** | A UUID string identifying this Flow Stage Binding. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsList** -```swift - open class func flowsBindingsList(evaluateOnPlan: Bool? = nil, fsbUuid: UUID? = nil, invalidResponseAction: InvalidResponseAction_flowsBindingsList? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pbmUuid: UUID? = nil, policies: [UUID]? = nil, policyEngineMode: PolicyEngineMode_flowsBindingsList? = nil, reEvaluatePolicies: Bool? = nil, search: String? = nil, stage: UUID? = nil, target: UUID? = nil, completion: @escaping (_ data: PaginatedFlowStageBindingList?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let evaluateOnPlan = true // Bool | (optional) -let fsbUuid = 987 // UUID | (optional) -let invalidResponseAction = "invalidResponseAction_example" // String | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context (optional) -let order = 987 // Int | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let pbmUuid = 987 // UUID | (optional) -let policies = [123] // [UUID] | (optional) -let policyEngineMode = "policyEngineMode_example" // String | * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) -let reEvaluatePolicies = true // Bool | (optional) -let search = "search_example" // String | A search term. (optional) -let stage = 987 // UUID | (optional) -let target = 987 // UUID | (optional) - -FlowsAPI.flowsBindingsList(evaluateOnPlan: evaluateOnPlan, fsbUuid: fsbUuid, invalidResponseAction: invalidResponseAction, order: order, ordering: ordering, page: page, pageSize: pageSize, pbmUuid: pbmUuid, policies: policies, policyEngineMode: policyEngineMode, reEvaluatePolicies: reEvaluatePolicies, search: search, stage: stage, target: target) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **evaluateOnPlan** | **Bool** | | [optional] - **fsbUuid** | **UUID** | | [optional] - **invalidResponseAction** | **String** | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] - **order** | **Int** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **pbmUuid** | **UUID** | | [optional] - **policies** | [**[UUID]**](UUID.md) | | [optional] - **policyEngineMode** | **String** | * `all` - all, all policies must pass * `any` - any, any policy must pass | [optional] - **reEvaluatePolicies** | **Bool** | | [optional] - **search** | **String** | A search term. | [optional] - **stage** | **UUID** | | [optional] - **target** | **UUID** | | [optional] - -### Return type - -[**PaginatedFlowStageBindingList**](PaginatedFlowStageBindingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsPartialUpdate** -```swift - open class func flowsBindingsPartialUpdate(fsbUuid: UUID, patchedFlowStageBindingRequest: PatchedFlowStageBindingRequest? = nil, completion: @escaping (_ data: FlowStageBinding?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fsbUuid = 987 // UUID | A UUID string identifying this Flow Stage Binding. -let patchedFlowStageBindingRequest = PatchedFlowStageBindingRequest(target: 123, stage: 123, evaluateOnPlan: false, reEvaluatePolicies: false, order: 123, policyEngineMode: PolicyEngineMode(), invalidResponseAction: InvalidResponseActionEnum()) // PatchedFlowStageBindingRequest | (optional) - -FlowsAPI.flowsBindingsPartialUpdate(fsbUuid: fsbUuid, patchedFlowStageBindingRequest: patchedFlowStageBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fsbUuid** | **UUID** | A UUID string identifying this Flow Stage Binding. | - **patchedFlowStageBindingRequest** | [**PatchedFlowStageBindingRequest**](PatchedFlowStageBindingRequest.md) | | [optional] - -### Return type - -[**FlowStageBinding**](FlowStageBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsRetrieve** -```swift - open class func flowsBindingsRetrieve(fsbUuid: UUID, completion: @escaping (_ data: FlowStageBinding?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fsbUuid = 987 // UUID | A UUID string identifying this Flow Stage Binding. - -FlowsAPI.flowsBindingsRetrieve(fsbUuid: fsbUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fsbUuid** | **UUID** | A UUID string identifying this Flow Stage Binding. | - -### Return type - -[**FlowStageBinding**](FlowStageBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsUpdate** -```swift - open class func flowsBindingsUpdate(fsbUuid: UUID, flowStageBindingRequest: FlowStageBindingRequest, completion: @escaping (_ data: FlowStageBinding?, _ error: Error?) -> Void) -``` - - - -FlowStageBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fsbUuid = 987 // UUID | A UUID string identifying this Flow Stage Binding. -let flowStageBindingRequest = FlowStageBindingRequest(target: 123, stage: 123, evaluateOnPlan: false, reEvaluatePolicies: false, order: 123, policyEngineMode: PolicyEngineMode(), invalidResponseAction: InvalidResponseActionEnum()) // FlowStageBindingRequest | - -FlowsAPI.flowsBindingsUpdate(fsbUuid: fsbUuid, flowStageBindingRequest: flowStageBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fsbUuid** | **UUID** | A UUID string identifying this Flow Stage Binding. | - **flowStageBindingRequest** | [**FlowStageBindingRequest**](FlowStageBindingRequest.md) | | - -### Return type - -[**FlowStageBinding**](FlowStageBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsBindingsUsedByList** -```swift - open class func flowsBindingsUsedByList(fsbUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fsbUuid = 987 // UUID | A UUID string identifying this Flow Stage Binding. - -FlowsAPI.flowsBindingsUsedByList(fsbUuid: fsbUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fsbUuid** | **UUID** | A UUID string identifying this Flow Stage Binding. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsExecutorGet** -```swift - open class func flowsExecutorGet(flowSlug: String, query: String, completion: @escaping (_ data: ChallengeTypes?, _ error: Error?) -> Void) -``` - - - -Get the next pending challenge from the currently active flow. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let flowSlug = "flowSlug_example" // String | -let query = "query_example" // String | Querystring as received - -FlowsAPI.flowsExecutorGet(flowSlug: flowSlug, query: query) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flowSlug** | **String** | | - **query** | **String** | Querystring as received | - -### Return type - -[**ChallengeTypes**](ChallengeTypes.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsExecutorSolve** -```swift - open class func flowsExecutorSolve(flowSlug: String, query: String, flowChallengeResponseRequest: FlowChallengeResponseRequest? = nil, completion: @escaping (_ data: ChallengeTypes?, _ error: Error?) -> Void) -``` - - - -Solve the previously retrieved challenge and advanced to the next stage. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let flowSlug = "flowSlug_example" // String | -let query = "query_example" // String | Querystring as received -let flowChallengeResponseRequest = FlowChallengeResponseRequest(component: "component_example", code: 123, phoneNumber: "phoneNumber_example", selectedChallenge: DeviceChallengeRequest(deviceClass: "deviceClass_example", deviceUid: "deviceUid_example", challenge: "TODO"), selectedStage: "selectedStage_example", webauthn: "TODO", duo: 123, response: "TODO", token: "token_example", uidField: "uidField_example", password: "password_example", rememberMe: false) // FlowChallengeResponseRequest | (optional) - -FlowsAPI.flowsExecutorSolve(flowSlug: flowSlug, query: query, flowChallengeResponseRequest: flowChallengeResponseRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flowSlug** | **String** | | - **query** | **String** | Querystring as received | - **flowChallengeResponseRequest** | [**FlowChallengeResponseRequest**](FlowChallengeResponseRequest.md) | | [optional] - -### Return type - -[**ChallengeTypes**](ChallengeTypes.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInspectorGet** -```swift - open class func flowsInspectorGet(flowSlug: String, completion: @escaping (_ data: FlowInspection?, _ error: Error?) -> Void) -``` - - - -Get current flow state and record it - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let flowSlug = "flowSlug_example" // String | - -FlowsAPI.flowsInspectorGet(flowSlug: flowSlug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flowSlug** | **String** | | - -### Return type - -[**FlowInspection**](FlowInspection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesCacheClearCreate** -```swift - open class func flowsInstancesCacheClearCreate(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Clear flow cache - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -FlowsAPI.flowsInstancesCacheClearCreate() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesCacheInfoRetrieve** -```swift - open class func flowsInstancesCacheInfoRetrieve(completion: @escaping (_ data: Cache?, _ error: Error?) -> Void) -``` - - - -Info about cached flows - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -FlowsAPI.flowsInstancesCacheInfoRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Cache**](Cache.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesCreate** -```swift - open class func flowsInstancesCreate(flowRequest: FlowRequest, completion: @escaping (_ data: Flow?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let flowRequest = FlowRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum(), authentication: AuthenticationEnum()) // FlowRequest | - -FlowsAPI.flowsInstancesCreate(flowRequest: flowRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flowRequest** | [**FlowRequest**](FlowRequest.md) | | - -### Return type - -[**Flow**](Flow.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesDestroy** -```swift - open class func flowsInstancesDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesDiagramRetrieve** -```swift - open class func flowsInstancesDiagramRetrieve(slug: String, completion: @escaping (_ data: FlowDiagram?, _ error: Error?) -> Void) -``` - - - -Return diagram for flow with slug `slug`, in the format used by flowchart.js - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesDiagramRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**FlowDiagram**](FlowDiagram.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesExecuteRetrieve** -```swift - open class func flowsInstancesExecuteRetrieve(slug: String, completion: @escaping (_ data: Link?, _ error: Error?) -> Void) -``` - - - -Execute flow for current user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesExecuteRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**Link**](Link.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesExportRetrieve** -```swift - open class func flowsInstancesExportRetrieve(slug: String, completion: @escaping (_ data: URL?, _ error: Error?) -> Void) -``` - - - -Export flow to .yaml file - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesExportRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -**URL** - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesImportCreate** -```swift - open class func flowsInstancesImportCreate(file: URL? = nil, clear: Bool? = nil, completion: @escaping (_ data: FlowImportResult?, _ error: Error?) -> Void) -``` - - - -Import flow from .yaml file - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let file = URL(string: "https://example.com")! // URL | (optional) -let clear = true // Bool | (optional) (default to false) - -FlowsAPI.flowsInstancesImportCreate(file: file, clear: clear) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **file** | **URL** | | [optional] - **clear** | **Bool** | | [optional] [default to false] - -### Return type - -[**FlowImportResult**](FlowImportResult.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesList** -```swift - open class func flowsInstancesList(deniedAction: DeniedAction_flowsInstancesList? = nil, designation: Designation_flowsInstancesList? = nil, flowUuid: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, completion: @escaping (_ data: PaginatedFlowList?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let deniedAction = "deniedAction_example" // String | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue (optional) -let designation = "designation_example" // String | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration (optional) -let flowUuid = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let slug = "slug_example" // String | (optional) - -FlowsAPI.flowsInstancesList(deniedAction: deniedAction, designation: designation, flowUuid: flowUuid, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **deniedAction** | **String** | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] - **designation** | **String** | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | [optional] - **flowUuid** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **slug** | **String** | | [optional] - -### Return type - -[**PaginatedFlowList**](PaginatedFlowList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesPartialUpdate** -```swift - open class func flowsInstancesPartialUpdate(slug: String, patchedFlowRequest: PatchedFlowRequest? = nil, completion: @escaping (_ data: Flow?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedFlowRequest = PatchedFlowRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum(), authentication: AuthenticationEnum()) // PatchedFlowRequest | (optional) - -FlowsAPI.flowsInstancesPartialUpdate(slug: slug, patchedFlowRequest: patchedFlowRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedFlowRequest** | [**PatchedFlowRequest**](PatchedFlowRequest.md) | | [optional] - -### Return type - -[**Flow**](Flow.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesRetrieve** -```swift - open class func flowsInstancesRetrieve(slug: String, completion: @escaping (_ data: Flow?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**Flow**](Flow.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesSetBackgroundCreate** -```swift - open class func flowsInstancesSetBackgroundCreate(slug: String, file: URL? = nil, clear: Bool? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set Flow background - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let file = URL(string: "https://example.com")! // URL | (optional) -let clear = true // Bool | (optional) (default to false) - -FlowsAPI.flowsInstancesSetBackgroundCreate(slug: slug, file: file, clear: clear) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **file** | **URL** | | [optional] - **clear** | **Bool** | | [optional] [default to false] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesSetBackgroundUrlCreate** -```swift - open class func flowsInstancesSetBackgroundUrlCreate(slug: String, filePathRequest: FilePathRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set Flow background (as URL) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let filePathRequest = FilePathRequest(url: "url_example") // FilePathRequest | - -FlowsAPI.flowsInstancesSetBackgroundUrlCreate(slug: slug, filePathRequest: filePathRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **filePathRequest** | [**FilePathRequest**](FilePathRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesUpdate** -```swift - open class func flowsInstancesUpdate(slug: String, flowRequest: FlowRequest, completion: @escaping (_ data: Flow?, _ error: Error?) -> Void) -``` - - - -Flow Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let flowRequest = FlowRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum(), authentication: AuthenticationEnum()) // FlowRequest | - -FlowsAPI.flowsInstancesUpdate(slug: slug, flowRequest: flowRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **flowRequest** | [**FlowRequest**](FlowRequest.md) | | - -### Return type - -[**Flow**](Flow.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **flowsInstancesUsedByList** -```swift - open class func flowsInstancesUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -FlowsAPI.flowsInstancesUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/FooterLink.md b/docs/FooterLink.md deleted file mode 100644 index 4757719..0000000 --- a/docs/FooterLink.md +++ /dev/null @@ -1,11 +0,0 @@ -# FooterLink - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **String** | | [readonly] -**name** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GenericError.md b/docs/GenericError.md deleted file mode 100644 index e9e0d6f..0000000 --- a/docs/GenericError.md +++ /dev/null @@ -1,11 +0,0 @@ -# GenericError - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detail** | **String** | | -**code** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Group.md b/docs/Group.md deleted file mode 100644 index 0371d88..0000000 --- a/docs/Group.md +++ /dev/null @@ -1,20 +0,0 @@ -# Group - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**numPk** | **Int** | | [readonly] -**name** | **String** | | -**isSuperuser** | **Bool** | Users added to this group will be superusers. | [optional] -**parent** | **UUID** | | [optional] -**parentName** | **String** | | [readonly] -**users** | **[Int]** | | [optional] -**usersObj** | [GroupMember] | | [readonly] -**attributes** | [String: AnyCodable] | | [optional] -**roles** | **[UUID]** | | [optional] -**rolesObj** | [Role] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupMember.md b/docs/GroupMember.md deleted file mode 100644 index d4581f8..0000000 --- a/docs/GroupMember.md +++ /dev/null @@ -1,17 +0,0 @@ -# GroupMember - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**username** | **String** | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**email** | **String** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**uid** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupMemberRequest.md b/docs/GroupMemberRequest.md deleted file mode 100644 index ff2750c..0000000 --- a/docs/GroupMemberRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# GroupMemberRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **String** | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**email** | **String** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupRequest.md b/docs/GroupRequest.md deleted file mode 100644 index 4a22690..0000000 --- a/docs/GroupRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# GroupRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**isSuperuser** | **Bool** | Users added to this group will be superusers. | [optional] -**parent** | **UUID** | | [optional] -**users** | **[Int]** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**roles** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IdentificationChallenge.md b/docs/IdentificationChallenge.md deleted file mode 100644 index 03fe8d6..0000000 --- a/docs/IdentificationChallenge.md +++ /dev/null @@ -1,22 +0,0 @@ -# IdentificationChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-identification"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**userFields** | **[String]** | | -**passwordFields** | **Bool** | | -**applicationPre** | **String** | | [optional] -**enrollUrl** | **String** | | [optional] -**recoveryUrl** | **String** | | [optional] -**passwordlessUrl** | **String** | | [optional] -**primaryAction** | **String** | | -**sources** | [LoginSource] | | [optional] -**showSourceLabels** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IdentificationChallengeResponseRequest.md b/docs/IdentificationChallengeResponseRequest.md deleted file mode 100644 index aa16313..0000000 --- a/docs/IdentificationChallengeResponseRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# IdentificationChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-identification"] -**uidField** | **String** | | -**password** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IdentificationStage.md b/docs/IdentificationStage.md deleted file mode 100644 index 71855ae..0000000 --- a/docs/IdentificationStage.md +++ /dev/null @@ -1,26 +0,0 @@ -# IdentificationStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**userFields** | [UserFieldsEnum] | Fields of the user object to match against. (Hold shift to select multiple options) | [optional] -**passwordStage** | **UUID** | When set, shows a password field, instead of showing the password field as seaprate step. | [optional] -**caseInsensitiveMatching** | **Bool** | When enabled, user fields are matched regardless of their casing. | [optional] -**showMatchedUser** | **Bool** | When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown | [optional] -**enrollmentFlow** | **UUID** | Optional enrollment flow, which is linked at the bottom of the page. | [optional] -**recoveryFlow** | **UUID** | Optional recovery flow, which is linked at the bottom of the page. | [optional] -**passwordlessFlow** | **UUID** | Optional passwordless flow, which is linked at the bottom of the page. | [optional] -**sources** | **[UUID]** | Specify which sources should be shown. | [optional] -**showSourceLabels** | **Bool** | | [optional] -**pretendUserExists** | **Bool** | When enabled, the stage will succeed and continue even when incorrect user info is entered. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IdentificationStageRequest.md b/docs/IdentificationStageRequest.md deleted file mode 100644 index d00b7b5..0000000 --- a/docs/IdentificationStageRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# IdentificationStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**userFields** | [UserFieldsEnum] | Fields of the user object to match against. (Hold shift to select multiple options) | [optional] -**passwordStage** | **UUID** | When set, shows a password field, instead of showing the password field as seaprate step. | [optional] -**caseInsensitiveMatching** | **Bool** | When enabled, user fields are matched regardless of their casing. | [optional] -**showMatchedUser** | **Bool** | When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown | [optional] -**enrollmentFlow** | **UUID** | Optional enrollment flow, which is linked at the bottom of the page. | [optional] -**recoveryFlow** | **UUID** | Optional recovery flow, which is linked at the bottom of the page. | [optional] -**passwordlessFlow** | **UUID** | Optional passwordless flow, which is linked at the bottom of the page. | [optional] -**sources** | **[UUID]** | Specify which sources should be shown. | [optional] -**showSourceLabels** | **Bool** | | [optional] -**pretendUserExists** | **Bool** | When enabled, the stage will succeed and continue even when incorrect user info is entered. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InstallID.md b/docs/InstallID.md deleted file mode 100644 index 8481e8e..0000000 --- a/docs/InstallID.md +++ /dev/null @@ -1,10 +0,0 @@ -# InstallID - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**installId** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IntentEnum.md b/docs/IntentEnum.md deleted file mode 100644 index 609107b..0000000 --- a/docs/IntentEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# IntentEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvalidResponseActionEnum.md b/docs/InvalidResponseActionEnum.md deleted file mode 100644 index d1979af..0000000 --- a/docs/InvalidResponseActionEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# InvalidResponseActionEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Invitation.md b/docs/Invitation.md deleted file mode 100644 index 245e521..0000000 --- a/docs/Invitation.md +++ /dev/null @@ -1,17 +0,0 @@ -# Invitation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**expires** | **Date** | | [optional] -**fixedData** | [String: AnyCodable] | | [optional] -**createdBy** | [**GroupMember**](GroupMember.md) | | [readonly] -**singleUse** | **Bool** | When enabled, the invitation will be deleted after usage. | [optional] -**flow** | **UUID** | When set, only the configured flow can use this invitation. | [optional] -**flowObj** | [**Flow**](Flow.md) | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvitationRequest.md b/docs/InvitationRequest.md deleted file mode 100644 index 0a9866a..0000000 --- a/docs/InvitationRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# InvitationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**expires** | **Date** | | [optional] -**fixedData** | [String: AnyCodable] | | [optional] -**singleUse** | **Bool** | When enabled, the invitation will be deleted after usage. | [optional] -**flow** | **UUID** | When set, only the configured flow can use this invitation. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvitationStage.md b/docs/InvitationStage.md deleted file mode 100644 index 9391bbf..0000000 --- a/docs/InvitationStage.md +++ /dev/null @@ -1,17 +0,0 @@ -# InvitationStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**continueFlowWithoutInvitation** | **Bool** | If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvitationStageRequest.md b/docs/InvitationStageRequest.md deleted file mode 100644 index 69d574c..0000000 --- a/docs/InvitationStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# InvitationStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**continueFlowWithoutInvitation** | **Bool** | If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IssuerModeEnum.md b/docs/IssuerModeEnum.md deleted file mode 100644 index d963e30..0000000 --- a/docs/IssuerModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# IssuerModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/KubernetesServiceConnection.md b/docs/KubernetesServiceConnection.md deleted file mode 100644 index 1721199..0000000 --- a/docs/KubernetesServiceConnection.md +++ /dev/null @@ -1,18 +0,0 @@ -# KubernetesServiceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**component** | **String** | | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**kubeconfig** | [String: AnyCodable] | Paste your kubeconfig here. authentik will automatically use the currently selected context. | [optional] -**verifySsl** | **Bool** | Verify SSL Certificates of the Kubernetes API endpoint | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/KubernetesServiceConnectionRequest.md b/docs/KubernetesServiceConnectionRequest.md deleted file mode 100644 index db860db..0000000 --- a/docs/KubernetesServiceConnectionRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubernetesServiceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**kubeconfig** | [String: AnyCodable] | Paste your kubeconfig here. authentik will automatically use the currently selected context. | [optional] -**verifySsl** | **Bool** | Verify SSL Certificates of the Kubernetes API endpoint | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPAPIAccessMode.md b/docs/LDAPAPIAccessMode.md deleted file mode 100644 index d8d1e1d..0000000 --- a/docs/LDAPAPIAccessMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# LDAPAPIAccessMode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPDebug.md b/docs/LDAPDebug.md deleted file mode 100644 index ab350f1..0000000 --- a/docs/LDAPDebug.md +++ /dev/null @@ -1,12 +0,0 @@ -# LDAPDebug - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [[String: AnyCodable]] | | [readonly] -**group** | [[String: AnyCodable]] | | [readonly] -**membership** | [[String: AnyCodable]] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPOutpostConfig.md b/docs/LDAPOutpostConfig.md deleted file mode 100644 index 3e34893..0000000 --- a/docs/LDAPOutpostConfig.md +++ /dev/null @@ -1,22 +0,0 @@ -# LDAPOutpostConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**baseDn** | **String** | DN under which objects are accessible. | [optional] -**bindFlowSlug** | **String** | | -**applicationSlug** | **String** | Prioritise backchannel slug over direct application slug | [readonly] -**searchGroup** | **UUID** | Users in this group can do search queries. If not set, every user can execute search queries. | [optional] -**certificate** | **UUID** | | [optional] -**tlsServerName** | **String** | | [optional] -**uidStartNumber** | **Int** | The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber | [optional] -**gidStartNumber** | **Int** | The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber | [optional] -**searchMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**bindMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPPropertyMapping.md b/docs/LDAPPropertyMapping.md deleted file mode 100644 index 5caf5ab..0000000 --- a/docs/LDAPPropertyMapping.md +++ /dev/null @@ -1,18 +0,0 @@ -# LDAPPropertyMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**component** | **String** | Get object's component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**objectField** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPPropertyMappingRequest.md b/docs/LDAPPropertyMappingRequest.md deleted file mode 100644 index a711cb3..0000000 --- a/docs/LDAPPropertyMappingRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# LDAPPropertyMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**objectField** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPProvider.md b/docs/LDAPProvider.md deleted file mode 100644 index e69f011..0000000 --- a/docs/LDAPProvider.md +++ /dev/null @@ -1,32 +0,0 @@ -# LDAPProvider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**baseDn** | **String** | DN under which objects are accessible. | [optional] -**searchGroup** | **UUID** | Users in this group can do search queries. If not set, every user can execute search queries. | [optional] -**certificate** | **UUID** | | [optional] -**tlsServerName** | **String** | | [optional] -**uidStartNumber** | **Int** | The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber | [optional] -**gidStartNumber** | **Int** | The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber | [optional] -**outpostSet** | **[String]** | | [readonly] -**searchMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**bindMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPProviderRequest.md b/docs/LDAPProviderRequest.md deleted file mode 100644 index 65541ce..0000000 --- a/docs/LDAPProviderRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# LDAPProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**baseDn** | **String** | DN under which objects are accessible. | [optional] -**searchGroup** | **UUID** | Users in this group can do search queries. If not set, every user can execute search queries. | [optional] -**certificate** | **UUID** | | [optional] -**tlsServerName** | **String** | | [optional] -**uidStartNumber** | **Int** | The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber | [optional] -**gidStartNumber** | **Int** | The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber | [optional] -**searchMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**bindMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPSource.md b/docs/LDAPSource.md deleted file mode 100644 index 0e1c7c5..0000000 --- a/docs/LDAPSource.md +++ /dev/null @@ -1,44 +0,0 @@ -# LDAPSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**userPathTemplate** | **String** | | [optional] -**icon** | **String** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] -**serverUri** | **String** | | -**peerCertificate** | **UUID** | Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. | [optional] -**clientCertificate** | **UUID** | Client certificate to authenticate against the LDAP Server's Certificate. | [optional] -**bindCn** | **String** | | [optional] -**startTls** | **Bool** | | [optional] -**sni** | **Bool** | | [optional] -**baseDn** | **String** | | -**additionalUserDn** | **String** | Prepended to Base DN for User-queries. | [optional] -**additionalGroupDn** | **String** | Prepended to Base DN for Group-queries. | [optional] -**userObjectFilter** | **String** | Consider Objects matching this filter to be Users. | [optional] -**groupObjectFilter** | **String** | Consider Objects matching this filter to be Groups. | [optional] -**groupMembershipField** | **String** | Field which contains members of a group. | [optional] -**objectUniquenessField** | **String** | Field which contains a unique Identifier. | [optional] -**syncUsers** | **Bool** | | [optional] -**syncUsersPassword** | **Bool** | When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. | [optional] -**syncGroups** | **Bool** | | [optional] -**syncParentGroup** | **UUID** | | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] -**connectivity** | [String: [String: String]] | Get cached source connectivity | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPSourceRequest.md b/docs/LDAPSourceRequest.md deleted file mode 100644 index c608fe9..0000000 --- a/docs/LDAPSourceRequest.md +++ /dev/null @@ -1,37 +0,0 @@ -# LDAPSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**serverUri** | **String** | | -**peerCertificate** | **UUID** | Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. | [optional] -**clientCertificate** | **UUID** | Client certificate to authenticate against the LDAP Server's Certificate. | [optional] -**bindCn** | **String** | | [optional] -**bindPassword** | **String** | | [optional] -**startTls** | **Bool** | | [optional] -**sni** | **Bool** | | [optional] -**baseDn** | **String** | | -**additionalUserDn** | **String** | Prepended to Base DN for User-queries. | [optional] -**additionalGroupDn** | **String** | Prepended to Base DN for Group-queries. | [optional] -**userObjectFilter** | **String** | Consider Objects matching this filter to be Users. | [optional] -**groupObjectFilter** | **String** | Consider Objects matching this filter to be Groups. | [optional] -**groupMembershipField** | **String** | Field which contains members of a group. | [optional] -**objectUniquenessField** | **String** | Field which contains a unique Identifier. | [optional] -**syncUsers** | **Bool** | | [optional] -**syncUsersPassword** | **Bool** | When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. | [optional] -**syncGroups** | **Bool** | | [optional] -**syncParentGroup** | **UUID** | | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPSyncStatus.md b/docs/LDAPSyncStatus.md deleted file mode 100644 index c237be8..0000000 --- a/docs/LDAPSyncStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# LDAPSyncStatus - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**isRunning** | **Bool** | | [readonly] -**tasks** | [Task] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LayoutEnum.md b/docs/LayoutEnum.md deleted file mode 100644 index 6493f59..0000000 --- a/docs/LayoutEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# LayoutEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/License.md b/docs/License.md deleted file mode 100644 index 48fb65a..0000000 --- a/docs/License.md +++ /dev/null @@ -1,15 +0,0 @@ -# License - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**licenseUuid** | **UUID** | | [readonly] -**name** | **String** | | [readonly] -**key** | **String** | | -**expiry** | **Date** | | [readonly] -**internalUsers** | **Int** | | [readonly] -**externalUsers** | **Int** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseForecast.md b/docs/LicenseForecast.md deleted file mode 100644 index e7beedb..0000000 --- a/docs/LicenseForecast.md +++ /dev/null @@ -1,13 +0,0 @@ -# LicenseForecast - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**internalUsers** | **Int** | | -**externalUsers** | **Int** | | -**forecastedInternalUsers** | **Int** | | -**forecastedExternalUsers** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseRequest.md b/docs/LicenseRequest.md deleted file mode 100644 index f532a2d..0000000 --- a/docs/LicenseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# LicenseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseSummary.md b/docs/LicenseSummary.md deleted file mode 100644 index 8027118..0000000 --- a/docs/LicenseSummary.md +++ /dev/null @@ -1,17 +0,0 @@ -# LicenseSummary - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**internalUsers** | **Int** | | -**externalUsers** | **Int** | | -**valid** | **Bool** | | -**showAdminWarning** | **Bool** | | -**showUserWarning** | **Bool** | | -**readOnly** | **Bool** | | -**latestValid** | **Date** | | -**hasLicense** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Link.md b/docs/Link.md deleted file mode 100644 index a2dd721..0000000 --- a/docs/Link.md +++ /dev/null @@ -1,10 +0,0 @@ -# Link - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**link** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LoginChallengeTypes.md b/docs/LoginChallengeTypes.md deleted file mode 100644 index c1583af..0000000 --- a/docs/LoginChallengeTypes.md +++ /dev/null @@ -1,19 +0,0 @@ -# LoginChallengeTypes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-source-oauth-apple"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**to** | **String** | | -**clientId** | **String** | | -**slug** | **String** | | -**scope** | **String** | | -**redirectUri** | **String** | | -**state** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LoginMetrics.md b/docs/LoginMetrics.md deleted file mode 100644 index c61126a..0000000 --- a/docs/LoginMetrics.md +++ /dev/null @@ -1,12 +0,0 @@ -# LoginMetrics - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**logins** | [Coordinate] | | [readonly] -**loginsFailed** | [Coordinate] | | [readonly] -**authorizations** | [Coordinate] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LoginSource.md b/docs/LoginSource.md deleted file mode 100644 index ad6d457..0000000 --- a/docs/LoginSource.md +++ /dev/null @@ -1,12 +0,0 @@ -# LoginSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**iconUrl** | **String** | | [optional] -**challenge** | [**LoginChallengeTypes**](LoginChallengeTypes.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ManagedAPI.md b/docs/ManagedAPI.md deleted file mode 100644 index b00420e..0000000 --- a/docs/ManagedAPI.md +++ /dev/null @@ -1,468 +0,0 @@ -# ManagedAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**managedBlueprintsApplyCreate**](ManagedAPI.md#managedblueprintsapplycreate) | **POST** /managed/blueprints/{instance_uuid}/apply/ | -[**managedBlueprintsAvailableList**](ManagedAPI.md#managedblueprintsavailablelist) | **GET** /managed/blueprints/available/ | -[**managedBlueprintsCreate**](ManagedAPI.md#managedblueprintscreate) | **POST** /managed/blueprints/ | -[**managedBlueprintsDestroy**](ManagedAPI.md#managedblueprintsdestroy) | **DELETE** /managed/blueprints/{instance_uuid}/ | -[**managedBlueprintsList**](ManagedAPI.md#managedblueprintslist) | **GET** /managed/blueprints/ | -[**managedBlueprintsPartialUpdate**](ManagedAPI.md#managedblueprintspartialupdate) | **PATCH** /managed/blueprints/{instance_uuid}/ | -[**managedBlueprintsRetrieve**](ManagedAPI.md#managedblueprintsretrieve) | **GET** /managed/blueprints/{instance_uuid}/ | -[**managedBlueprintsUpdate**](ManagedAPI.md#managedblueprintsupdate) | **PUT** /managed/blueprints/{instance_uuid}/ | -[**managedBlueprintsUsedByList**](ManagedAPI.md#managedblueprintsusedbylist) | **GET** /managed/blueprints/{instance_uuid}/used_by/ | - - -# **managedBlueprintsApplyCreate** -```swift - open class func managedBlueprintsApplyCreate(instanceUuid: UUID, completion: @escaping (_ data: BlueprintInstance?, _ error: Error?) -> Void) -``` - - - -Apply a blueprint - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. - -ManagedAPI.managedBlueprintsApplyCreate(instanceUuid: instanceUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - -### Return type - -[**BlueprintInstance**](BlueprintInstance.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsAvailableList** -```swift - open class func managedBlueprintsAvailableList(completion: @escaping (_ data: [BlueprintFile]?, _ error: Error?) -> Void) -``` - - - -Get blueprints - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -ManagedAPI.managedBlueprintsAvailableList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[BlueprintFile]**](BlueprintFile.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsCreate** -```swift - open class func managedBlueprintsCreate(blueprintInstanceRequest: BlueprintInstanceRequest, completion: @escaping (_ data: BlueprintInstance?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let blueprintInstanceRequest = BlueprintInstanceRequest(name: "name_example", path: "path_example", context: "TODO", enabled: false, content: "content_example") // BlueprintInstanceRequest | - -ManagedAPI.managedBlueprintsCreate(blueprintInstanceRequest: blueprintInstanceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **blueprintInstanceRequest** | [**BlueprintInstanceRequest**](BlueprintInstanceRequest.md) | | - -### Return type - -[**BlueprintInstance**](BlueprintInstance.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsDestroy** -```swift - open class func managedBlueprintsDestroy(instanceUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. - -ManagedAPI.managedBlueprintsDestroy(instanceUuid: instanceUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsList** -```swift - open class func managedBlueprintsList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, path: String? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedBlueprintInstanceList?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let path = "path_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) - -ManagedAPI.managedBlueprintsList(name: name, ordering: ordering, page: page, pageSize: pageSize, path: path, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **path** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedBlueprintInstanceList**](PaginatedBlueprintInstanceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsPartialUpdate** -```swift - open class func managedBlueprintsPartialUpdate(instanceUuid: UUID, patchedBlueprintInstanceRequest: PatchedBlueprintInstanceRequest? = nil, completion: @escaping (_ data: BlueprintInstance?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. -let patchedBlueprintInstanceRequest = PatchedBlueprintInstanceRequest(name: "name_example", path: "path_example", context: "TODO", enabled: false, content: "content_example") // PatchedBlueprintInstanceRequest | (optional) - -ManagedAPI.managedBlueprintsPartialUpdate(instanceUuid: instanceUuid, patchedBlueprintInstanceRequest: patchedBlueprintInstanceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - **patchedBlueprintInstanceRequest** | [**PatchedBlueprintInstanceRequest**](PatchedBlueprintInstanceRequest.md) | | [optional] - -### Return type - -[**BlueprintInstance**](BlueprintInstance.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsRetrieve** -```swift - open class func managedBlueprintsRetrieve(instanceUuid: UUID, completion: @escaping (_ data: BlueprintInstance?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. - -ManagedAPI.managedBlueprintsRetrieve(instanceUuid: instanceUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - -### Return type - -[**BlueprintInstance**](BlueprintInstance.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsUpdate** -```swift - open class func managedBlueprintsUpdate(instanceUuid: UUID, blueprintInstanceRequest: BlueprintInstanceRequest, completion: @escaping (_ data: BlueprintInstance?, _ error: Error?) -> Void) -``` - - - -Blueprint instances - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. -let blueprintInstanceRequest = BlueprintInstanceRequest(name: "name_example", path: "path_example", context: "TODO", enabled: false, content: "content_example") // BlueprintInstanceRequest | - -ManagedAPI.managedBlueprintsUpdate(instanceUuid: instanceUuid, blueprintInstanceRequest: blueprintInstanceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - **blueprintInstanceRequest** | [**BlueprintInstanceRequest**](BlueprintInstanceRequest.md) | | - -### Return type - -[**BlueprintInstance**](BlueprintInstance.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **managedBlueprintsUsedByList** -```swift - open class func managedBlueprintsUsedByList(instanceUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let instanceUuid = 987 // UUID | A UUID string identifying this Blueprint Instance. - -ManagedAPI.managedBlueprintsUsedByList(instanceUuid: instanceUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instanceUuid** | **UUID** | A UUID string identifying this Blueprint Instance. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Metadata.md b/docs/Metadata.md deleted file mode 100644 index 2181b0e..0000000 --- a/docs/Metadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# Metadata - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**labels** | [String: AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ModelEnum.md b/docs/ModelEnum.md deleted file mode 100644 index c945908..0000000 --- a/docs/ModelEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ModelRequest.md b/docs/ModelRequest.md deleted file mode 100644 index 2aced9c..0000000 --- a/docs/ModelRequest.md +++ /dev/null @@ -1,64 +0,0 @@ -# ModelRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**baseDn** | **String** | DN under which objects are accessible. | [optional] -**searchGroup** | **UUID** | Users in this group can do search queries. If not set, every user can execute search queries. | [optional] -**certificate** | **UUID** | | [optional] -**tlsServerName** | **String** | | [optional] -**uidStartNumber** | **Int** | The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber | [optional] -**gidStartNumber** | **Int** | The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber | [optional] -**searchMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**bindMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] -**clientType** | [**ClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**accessCodeValidity** | **String** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**includeClaimsInIdToken** | **Bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] -**signingKey** | **UUID** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] -**redirectUris** | **String** | Enter each URI on a new line. | [optional] -**subMode** | [**SubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**issuerMode** | [**IssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] -**jwksSources** | **[UUID]** | | [optional] -**internalHost** | **String** | | [optional] -**externalHost** | **String** | | -**internalHostSslValidation** | **Bool** | Validate SSL Certificates of upstream servers | [optional] -**skipPathRegex** | **String** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] -**basicAuthEnabled** | **Bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] -**basicAuthPasswordAttribute** | **String** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] -**basicAuthUserAttribute** | **String** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**mode** | [**ProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] -**interceptHeaderAuth** | **Bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] -**cookieDomain** | **String** | | [optional] -**clientNetworks** | **String** | List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. | [optional] -**sharedSecret** | **String** | Shared secret between clients and server to hash packets. | [optional] -**acsUrl** | **String** | | -**audience** | **String** | Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. | [optional] -**issuer** | **String** | Also known as EntityID | [optional] -**assertionValidNotBefore** | **String** | Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). | [optional] -**assertionValidNotOnOrAfter** | **String** | Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**sessionValidNotOnOrAfter** | **String** | Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**nameIdMapping** | **UUID** | Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**spBinding** | [**SpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] -**defaultRelayState** | **String** | Default relay_state value for IDP-initiated logins | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] -**url** | **String** | Base URL to SCIM requests, usually ends in /v2 | -**token** | **String** | Authentication token | -**excludeUsersServiceAccount** | **Bool** | | [optional] -**filterGroup** | **UUID** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NameIdPolicyEnum.md b/docs/NameIdPolicyEnum.md deleted file mode 100644 index 6176380..0000000 --- a/docs/NameIdPolicyEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# NameIdPolicyEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotConfiguredActionEnum.md b/docs/NotConfiguredActionEnum.md deleted file mode 100644 index 943183c..0000000 --- a/docs/NotConfiguredActionEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# NotConfiguredActionEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Notification.md b/docs/Notification.md deleted file mode 100644 index 9a6316a..0000000 --- a/docs/Notification.md +++ /dev/null @@ -1,15 +0,0 @@ -# Notification - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**severity** | [**SeverityEnum**](SeverityEnum.md) | | [readonly] -**body** | **String** | | [readonly] -**created** | **Date** | | [readonly] -**event** | [**Event**](Event.md) | | [optional] -**seen** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationRequest.md b/docs/NotificationRequest.md deleted file mode 100644 index a8b2d39..0000000 --- a/docs/NotificationRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# NotificationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**event** | [**EventRequest**](EventRequest.md) | | [optional] -**seen** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationRule.md b/docs/NotificationRule.md deleted file mode 100644 index 2699133..0000000 --- a/docs/NotificationRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# NotificationRule - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**transports** | **[UUID]** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**severity** | [**SeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] -**group** | **UUID** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] -**groupObj** | [**Group**](Group.md) | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationRuleRequest.md b/docs/NotificationRuleRequest.md deleted file mode 100644 index 807a901..0000000 --- a/docs/NotificationRuleRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# NotificationRuleRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**transports** | **[UUID]** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**severity** | [**SeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] -**group** | **UUID** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationTransport.md b/docs/NotificationTransport.md deleted file mode 100644 index 10c5602..0000000 --- a/docs/NotificationTransport.md +++ /dev/null @@ -1,16 +0,0 @@ -# NotificationTransport - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**mode** | [**NotificationTransportModeEnum**](NotificationTransportModeEnum.md) | | [optional] -**modeVerbose** | **String** | Return selected mode with a UI Label | [readonly] -**webhookUrl** | **String** | | [optional] -**webhookMapping** | **UUID** | | [optional] -**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationTransportModeEnum.md b/docs/NotificationTransportModeEnum.md deleted file mode 100644 index 575b740..0000000 --- a/docs/NotificationTransportModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# NotificationTransportModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationTransportRequest.md b/docs/NotificationTransportRequest.md deleted file mode 100644 index 89b9603..0000000 --- a/docs/NotificationTransportRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# NotificationTransportRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**mode** | [**NotificationTransportModeEnum**](NotificationTransportModeEnum.md) | | [optional] -**webhookUrl** | **String** | | [optional] -**webhookMapping** | **UUID** | | [optional] -**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationTransportTest.md b/docs/NotificationTransportTest.md deleted file mode 100644 index 5c49423..0000000 --- a/docs/NotificationTransportTest.md +++ /dev/null @@ -1,10 +0,0 @@ -# NotificationTransportTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messages** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationWebhookMapping.md b/docs/NotificationWebhookMapping.md deleted file mode 100644 index 8815e57..0000000 --- a/docs/NotificationWebhookMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# NotificationWebhookMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**expression** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationWebhookMappingRequest.md b/docs/NotificationWebhookMappingRequest.md deleted file mode 100644 index d0e82a2..0000000 --- a/docs/NotificationWebhookMappingRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# NotificationWebhookMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**expression** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuth2Provider.md b/docs/OAuth2Provider.md deleted file mode 100644 index cd0d6dd..0000000 --- a/docs/OAuth2Provider.md +++ /dev/null @@ -1,34 +0,0 @@ -# OAuth2Provider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**clientType** | [**ClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**accessCodeValidity** | **String** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**includeClaimsInIdToken** | **Bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] -**signingKey** | **UUID** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] -**redirectUris** | **String** | Enter each URI on a new line. | [optional] -**subMode** | [**SubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**issuerMode** | [**IssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] -**jwksSources** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuth2ProviderRequest.md b/docs/OAuth2ProviderRequest.md deleted file mode 100644 index 765b2e6..0000000 --- a/docs/OAuth2ProviderRequest.md +++ /dev/null @@ -1,25 +0,0 @@ -# OAuth2ProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**clientType** | [**ClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**accessCodeValidity** | **String** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**includeClaimsInIdToken** | **Bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] -**signingKey** | **UUID** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] -**redirectUris** | **String** | Enter each URI on a new line. | [optional] -**subMode** | [**SubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**issuerMode** | [**IssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] -**jwksSources** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuth2ProviderSetupURLs.md b/docs/OAuth2ProviderSetupURLs.md deleted file mode 100644 index 0d81833..0000000 --- a/docs/OAuth2ProviderSetupURLs.md +++ /dev/null @@ -1,16 +0,0 @@ -# OAuth2ProviderSetupURLs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**issuer** | **String** | | [readonly] -**authorize** | **String** | | [readonly] -**token** | **String** | | [readonly] -**userInfo** | **String** | | [readonly] -**providerInfo** | **String** | | [readonly] -**logout** | **String** | | [readonly] -**jwks** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthDeviceCodeChallenge.md b/docs/OAuthDeviceCodeChallenge.md deleted file mode 100644 index 592f005..0000000 --- a/docs/OAuthDeviceCodeChallenge.md +++ /dev/null @@ -1,13 +0,0 @@ -# OAuthDeviceCodeChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-provider-oauth2-device-code"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthDeviceCodeChallengeResponseRequest.md b/docs/OAuthDeviceCodeChallengeResponseRequest.md deleted file mode 100644 index 32fe43f..0000000 --- a/docs/OAuthDeviceCodeChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# OAuthDeviceCodeChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-provider-oauth2-device-code"] -**code** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthDeviceCodeFinishChallenge.md b/docs/OAuthDeviceCodeFinishChallenge.md deleted file mode 100644 index a4b8b93..0000000 --- a/docs/OAuthDeviceCodeFinishChallenge.md +++ /dev/null @@ -1,13 +0,0 @@ -# OAuthDeviceCodeFinishChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-provider-oauth2-device-code-finish"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthDeviceCodeFinishChallengeResponseRequest.md b/docs/OAuthDeviceCodeFinishChallengeResponseRequest.md deleted file mode 100644 index c13c1fd..0000000 --- a/docs/OAuthDeviceCodeFinishChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# OAuthDeviceCodeFinishChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-provider-oauth2-device-code-finish"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthSource.md b/docs/OAuthSource.md deleted file mode 100644 index 30ccfe4..0000000 --- a/docs/OAuthSource.md +++ /dev/null @@ -1,36 +0,0 @@ -# OAuthSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**userPathTemplate** | **String** | | [optional] -**icon** | **String** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] -**providerType** | [**ProviderTypeEnum**](ProviderTypeEnum.md) | | -**requestTokenUrl** | **String** | URL used to request the initial token. This URL is only required for OAuth 1. | [optional] -**authorizationUrl** | **String** | URL the user is redirect to to conest the flow. | [optional] -**accessTokenUrl** | **String** | URL used by authentik to retrieve tokens. | [optional] -**profileUrl** | **String** | URL used by authentik to get user information. | [optional] -**consumerKey** | **String** | | -**callbackUrl** | **String** | Get OAuth Callback URL | [readonly] -**additionalScopes** | **String** | | [optional] -**type** | [**SourceType**](SourceType.md) | | [readonly] -**oidcWellKnownUrl** | **String** | | [optional] -**oidcJwksUrl** | **String** | | [optional] -**oidcJwks** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OAuthSourceRequest.md b/docs/OAuthSourceRequest.md deleted file mode 100644 index 5111da3..0000000 --- a/docs/OAuthSourceRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# OAuthSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**providerType** | [**ProviderTypeEnum**](ProviderTypeEnum.md) | | -**requestTokenUrl** | **String** | URL used to request the initial token. This URL is only required for OAuth 1. | [optional] -**authorizationUrl** | **String** | URL the user is redirect to to conest the flow. | [optional] -**accessTokenUrl** | **String** | URL used by authentik to retrieve tokens. | [optional] -**profileUrl** | **String** | URL used by authentik to get user information. | [optional] -**consumerKey** | **String** | | -**consumerSecret** | **String** | | -**additionalScopes** | **String** | | [optional] -**oidcWellKnownUrl** | **String** | | [optional] -**oidcJwksUrl** | **String** | | [optional] -**oidcJwks** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Oauth2API.md b/docs/Oauth2API.md deleted file mode 100644 index f7495b1..0000000 --- a/docs/Oauth2API.md +++ /dev/null @@ -1,638 +0,0 @@ -# Oauth2API - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**oauth2AccessTokensDestroy**](Oauth2API.md#oauth2accesstokensdestroy) | **DELETE** /oauth2/access_tokens/{id}/ | -[**oauth2AccessTokensList**](Oauth2API.md#oauth2accesstokenslist) | **GET** /oauth2/access_tokens/ | -[**oauth2AccessTokensRetrieve**](Oauth2API.md#oauth2accesstokensretrieve) | **GET** /oauth2/access_tokens/{id}/ | -[**oauth2AccessTokensUsedByList**](Oauth2API.md#oauth2accesstokensusedbylist) | **GET** /oauth2/access_tokens/{id}/used_by/ | -[**oauth2AuthorizationCodesDestroy**](Oauth2API.md#oauth2authorizationcodesdestroy) | **DELETE** /oauth2/authorization_codes/{id}/ | -[**oauth2AuthorizationCodesList**](Oauth2API.md#oauth2authorizationcodeslist) | **GET** /oauth2/authorization_codes/ | -[**oauth2AuthorizationCodesRetrieve**](Oauth2API.md#oauth2authorizationcodesretrieve) | **GET** /oauth2/authorization_codes/{id}/ | -[**oauth2AuthorizationCodesUsedByList**](Oauth2API.md#oauth2authorizationcodesusedbylist) | **GET** /oauth2/authorization_codes/{id}/used_by/ | -[**oauth2RefreshTokensDestroy**](Oauth2API.md#oauth2refreshtokensdestroy) | **DELETE** /oauth2/refresh_tokens/{id}/ | -[**oauth2RefreshTokensList**](Oauth2API.md#oauth2refreshtokenslist) | **GET** /oauth2/refresh_tokens/ | -[**oauth2RefreshTokensRetrieve**](Oauth2API.md#oauth2refreshtokensretrieve) | **GET** /oauth2/refresh_tokens/{id}/ | -[**oauth2RefreshTokensUsedByList**](Oauth2API.md#oauth2refreshtokensusedbylist) | **GET** /oauth2/refresh_tokens/{id}/used_by/ | - - -# **oauth2AccessTokensDestroy** -```swift - open class func oauth2AccessTokensDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AccessToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Access Token. - -Oauth2API.oauth2AccessTokensDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Access Token. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AccessTokensList** -```swift - open class func oauth2AccessTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedTokenModelList?, _ error: Error?) -> Void) -``` - - - -AccessToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let provider = 987 // Int | (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -Oauth2API.oauth2AccessTokensList(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **provider** | **Int** | | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedTokenModelList**](PaginatedTokenModelList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AccessTokensRetrieve** -```swift - open class func oauth2AccessTokensRetrieve(id: Int, completion: @escaping (_ data: TokenModel?, _ error: Error?) -> Void) -``` - - - -AccessToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Access Token. - -Oauth2API.oauth2AccessTokensRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Access Token. | - -### Return type - -[**TokenModel**](TokenModel.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AccessTokensUsedByList** -```swift - open class func oauth2AccessTokensUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Access Token. - -Oauth2API.oauth2AccessTokensUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Access Token. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AuthorizationCodesDestroy** -```swift - open class func oauth2AuthorizationCodesDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthorizationCode Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Authorization Code. - -Oauth2API.oauth2AuthorizationCodesDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Authorization Code. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AuthorizationCodesList** -```swift - open class func oauth2AuthorizationCodesList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedExpiringBaseGrantModelList?, _ error: Error?) -> Void) -``` - - - -AuthorizationCode Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let provider = 987 // Int | (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -Oauth2API.oauth2AuthorizationCodesList(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **provider** | **Int** | | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedExpiringBaseGrantModelList**](PaginatedExpiringBaseGrantModelList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AuthorizationCodesRetrieve** -```swift - open class func oauth2AuthorizationCodesRetrieve(id: Int, completion: @escaping (_ data: ExpiringBaseGrantModel?, _ error: Error?) -> Void) -``` - - - -AuthorizationCode Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Authorization Code. - -Oauth2API.oauth2AuthorizationCodesRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Authorization Code. | - -### Return type - -[**ExpiringBaseGrantModel**](ExpiringBaseGrantModel.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2AuthorizationCodesUsedByList** -```swift - open class func oauth2AuthorizationCodesUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Authorization Code. - -Oauth2API.oauth2AuthorizationCodesUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Authorization Code. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2RefreshTokensDestroy** -```swift - open class func oauth2RefreshTokensDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -RefreshToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Refresh Token. - -Oauth2API.oauth2RefreshTokensDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Refresh Token. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2RefreshTokensList** -```swift - open class func oauth2RefreshTokensList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Int? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedTokenModelList?, _ error: Error?) -> Void) -``` - - - -RefreshToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let provider = 987 // Int | (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -Oauth2API.oauth2RefreshTokensList(ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **provider** | **Int** | | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedTokenModelList**](PaginatedTokenModelList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2RefreshTokensRetrieve** -```swift - open class func oauth2RefreshTokensRetrieve(id: Int, completion: @escaping (_ data: TokenModel?, _ error: Error?) -> Void) -``` - - - -RefreshToken Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Refresh Token. - -Oauth2API.oauth2RefreshTokensRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Refresh Token. | - -### Return type - -[**TokenModel**](TokenModel.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **oauth2RefreshTokensUsedByList** -```swift - open class func oauth2RefreshTokensUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2 Refresh Token. - -Oauth2API.oauth2RefreshTokensUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2 Refresh Token. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/OpenIDConnectConfiguration.md b/docs/OpenIDConnectConfiguration.md deleted file mode 100644 index 8642349..0000000 --- a/docs/OpenIDConnectConfiguration.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenIDConnectConfiguration - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**issuer** | **String** | | -**authorizationEndpoint** | **String** | | -**tokenEndpoint** | **String** | | -**userinfoEndpoint** | **String** | | -**endSessionEndpoint** | **String** | | -**introspectionEndpoint** | **String** | | -**jwksUri** | **String** | | -**responseTypesSupported** | **[String]** | | -**idTokenSigningAlgValuesSupported** | **[String]** | | -**subjectTypesSupported** | **[String]** | | -**tokenEndpointAuthMethodsSupported** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Outpost.md b/docs/Outpost.md deleted file mode 100644 index 2579778..0000000 --- a/docs/Outpost.md +++ /dev/null @@ -1,19 +0,0 @@ -# Outpost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**type** | [**OutpostTypeEnum**](OutpostTypeEnum.md) | | -**providers** | **[Int]** | | -**providersObj** | [Provider] | | [readonly] -**serviceConnection** | **UUID** | Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. | [optional] -**serviceConnectionObj** | [**ServiceConnection**](ServiceConnection.md) | | [readonly] -**tokenIdentifier** | **String** | Get Token identifier | [readonly] -**config** | [String: AnyCodable] | | -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostDefaultConfig.md b/docs/OutpostDefaultConfig.md deleted file mode 100644 index 26ca3bb..0000000 --- a/docs/OutpostDefaultConfig.md +++ /dev/null @@ -1,10 +0,0 @@ -# OutpostDefaultConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | [String: AnyCodable] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostHealth.md b/docs/OutpostHealth.md deleted file mode 100644 index bd05c01..0000000 --- a/docs/OutpostHealth.md +++ /dev/null @@ -1,17 +0,0 @@ -# OutpostHealth - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **String** | | [readonly] -**lastSeen** | **Date** | | [readonly] -**version** | **String** | | [readonly] -**versionShould** | **String** | | [readonly] -**versionOutdated** | **Bool** | | [readonly] -**buildHash** | **String** | | [readonly] -**buildHashShould** | **String** | | [readonly] -**hostname** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostRequest.md b/docs/OutpostRequest.md deleted file mode 100644 index 94f207f..0000000 --- a/docs/OutpostRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# OutpostRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**type** | [**OutpostTypeEnum**](OutpostTypeEnum.md) | | -**providers** | **[Int]** | | -**serviceConnection** | **UUID** | Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. | [optional] -**config** | [String: AnyCodable] | | -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostTypeEnum.md b/docs/OutpostTypeEnum.md deleted file mode 100644 index fd5f607..0000000 --- a/docs/OutpostTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OutpostTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostsAPI.md b/docs/OutpostsAPI.md deleted file mode 100644 index 340fac3..0000000 --- a/docs/OutpostsAPI.md +++ /dev/null @@ -1,1862 +0,0 @@ -# OutpostsAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**outpostsInstancesCreate**](OutpostsAPI.md#outpostsinstancescreate) | **POST** /outposts/instances/ | -[**outpostsInstancesDefaultSettingsRetrieve**](OutpostsAPI.md#outpostsinstancesdefaultsettingsretrieve) | **GET** /outposts/instances/default_settings/ | -[**outpostsInstancesDestroy**](OutpostsAPI.md#outpostsinstancesdestroy) | **DELETE** /outposts/instances/{uuid}/ | -[**outpostsInstancesHealthList**](OutpostsAPI.md#outpostsinstanceshealthlist) | **GET** /outposts/instances/{uuid}/health/ | -[**outpostsInstancesList**](OutpostsAPI.md#outpostsinstanceslist) | **GET** /outposts/instances/ | -[**outpostsInstancesPartialUpdate**](OutpostsAPI.md#outpostsinstancespartialupdate) | **PATCH** /outposts/instances/{uuid}/ | -[**outpostsInstancesRetrieve**](OutpostsAPI.md#outpostsinstancesretrieve) | **GET** /outposts/instances/{uuid}/ | -[**outpostsInstancesUpdate**](OutpostsAPI.md#outpostsinstancesupdate) | **PUT** /outposts/instances/{uuid}/ | -[**outpostsInstancesUsedByList**](OutpostsAPI.md#outpostsinstancesusedbylist) | **GET** /outposts/instances/{uuid}/used_by/ | -[**outpostsLdapList**](OutpostsAPI.md#outpostsldaplist) | **GET** /outposts/ldap/ | -[**outpostsLdapRetrieve**](OutpostsAPI.md#outpostsldapretrieve) | **GET** /outposts/ldap/{id}/ | -[**outpostsProxyList**](OutpostsAPI.md#outpostsproxylist) | **GET** /outposts/proxy/ | -[**outpostsProxyRetrieve**](OutpostsAPI.md#outpostsproxyretrieve) | **GET** /outposts/proxy/{id}/ | -[**outpostsRadiusList**](OutpostsAPI.md#outpostsradiuslist) | **GET** /outposts/radius/ | -[**outpostsRadiusRetrieve**](OutpostsAPI.md#outpostsradiusretrieve) | **GET** /outposts/radius/{id}/ | -[**outpostsServiceConnectionsAllDestroy**](OutpostsAPI.md#outpostsserviceconnectionsalldestroy) | **DELETE** /outposts/service_connections/all/{uuid}/ | -[**outpostsServiceConnectionsAllList**](OutpostsAPI.md#outpostsserviceconnectionsalllist) | **GET** /outposts/service_connections/all/ | -[**outpostsServiceConnectionsAllRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsallretrieve) | **GET** /outposts/service_connections/all/{uuid}/ | -[**outpostsServiceConnectionsAllStateRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsallstateretrieve) | **GET** /outposts/service_connections/all/{uuid}/state/ | -[**outpostsServiceConnectionsAllTypesList**](OutpostsAPI.md#outpostsserviceconnectionsalltypeslist) | **GET** /outposts/service_connections/all/types/ | -[**outpostsServiceConnectionsAllUsedByList**](OutpostsAPI.md#outpostsserviceconnectionsallusedbylist) | **GET** /outposts/service_connections/all/{uuid}/used_by/ | -[**outpostsServiceConnectionsDockerCreate**](OutpostsAPI.md#outpostsserviceconnectionsdockercreate) | **POST** /outposts/service_connections/docker/ | -[**outpostsServiceConnectionsDockerDestroy**](OutpostsAPI.md#outpostsserviceconnectionsdockerdestroy) | **DELETE** /outposts/service_connections/docker/{uuid}/ | -[**outpostsServiceConnectionsDockerList**](OutpostsAPI.md#outpostsserviceconnectionsdockerlist) | **GET** /outposts/service_connections/docker/ | -[**outpostsServiceConnectionsDockerPartialUpdate**](OutpostsAPI.md#outpostsserviceconnectionsdockerpartialupdate) | **PATCH** /outposts/service_connections/docker/{uuid}/ | -[**outpostsServiceConnectionsDockerRetrieve**](OutpostsAPI.md#outpostsserviceconnectionsdockerretrieve) | **GET** /outposts/service_connections/docker/{uuid}/ | -[**outpostsServiceConnectionsDockerUpdate**](OutpostsAPI.md#outpostsserviceconnectionsdockerupdate) | **PUT** /outposts/service_connections/docker/{uuid}/ | -[**outpostsServiceConnectionsDockerUsedByList**](OutpostsAPI.md#outpostsserviceconnectionsdockerusedbylist) | **GET** /outposts/service_connections/docker/{uuid}/used_by/ | -[**outpostsServiceConnectionsKubernetesCreate**](OutpostsAPI.md#outpostsserviceconnectionskubernetescreate) | **POST** /outposts/service_connections/kubernetes/ | -[**outpostsServiceConnectionsKubernetesDestroy**](OutpostsAPI.md#outpostsserviceconnectionskubernetesdestroy) | **DELETE** /outposts/service_connections/kubernetes/{uuid}/ | -[**outpostsServiceConnectionsKubernetesList**](OutpostsAPI.md#outpostsserviceconnectionskuberneteslist) | **GET** /outposts/service_connections/kubernetes/ | -[**outpostsServiceConnectionsKubernetesPartialUpdate**](OutpostsAPI.md#outpostsserviceconnectionskubernetespartialupdate) | **PATCH** /outposts/service_connections/kubernetes/{uuid}/ | -[**outpostsServiceConnectionsKubernetesRetrieve**](OutpostsAPI.md#outpostsserviceconnectionskubernetesretrieve) | **GET** /outposts/service_connections/kubernetes/{uuid}/ | -[**outpostsServiceConnectionsKubernetesUpdate**](OutpostsAPI.md#outpostsserviceconnectionskubernetesupdate) | **PUT** /outposts/service_connections/kubernetes/{uuid}/ | -[**outpostsServiceConnectionsKubernetesUsedByList**](OutpostsAPI.md#outpostsserviceconnectionskubernetesusedbylist) | **GET** /outposts/service_connections/kubernetes/{uuid}/used_by/ | - - -# **outpostsInstancesCreate** -```swift - open class func outpostsInstancesCreate(outpostRequest: OutpostRequest, completion: @escaping (_ data: Outpost?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let outpostRequest = OutpostRequest(name: "name_example", type: OutpostTypeEnum(), providers: [123], serviceConnection: 123, config: "TODO", managed: "managed_example") // OutpostRequest | - -OutpostsAPI.outpostsInstancesCreate(outpostRequest: outpostRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outpostRequest** | [**OutpostRequest**](OutpostRequest.md) | | - -### Return type - -[**Outpost**](Outpost.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesDefaultSettingsRetrieve** -```swift - open class func outpostsInstancesDefaultSettingsRetrieve(completion: @escaping (_ data: OutpostDefaultConfig?, _ error: Error?) -> Void) -``` - - - -Global default outpost config - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -OutpostsAPI.outpostsInstancesDefaultSettingsRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**OutpostDefaultConfig**](OutpostDefaultConfig.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesDestroy** -```swift - open class func outpostsInstancesDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. - -OutpostsAPI.outpostsInstancesDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesHealthList** -```swift - open class func outpostsInstancesHealthList(uuid: UUID, managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil, completion: @escaping (_ data: [OutpostHealth]?, _ error: Error?) -> Void) -``` - - - -Get outposts current health - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. -let managedIcontains = "managedIcontains_example" // String | (optional) -let managedIexact = "managedIexact_example" // String | (optional) -let nameIcontains = "nameIcontains_example" // String | (optional) -let nameIexact = "nameIexact_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let providersIsnull = true // Bool | (optional) -let providersByPk = [123] // [Int] | (optional) -let search = "search_example" // String | A search term. (optional) -let serviceConnectionNameIcontains = "serviceConnectionNameIcontains_example" // String | (optional) -let serviceConnectionNameIexact = "serviceConnectionNameIexact_example" // String | (optional) - -OutpostsAPI.outpostsInstancesHealthList(uuid: uuid, managedIcontains: managedIcontains, managedIexact: managedIexact, nameIcontains: nameIcontains, nameIexact: nameIexact, ordering: ordering, providersIsnull: providersIsnull, providersByPk: providersByPk, search: search, serviceConnectionNameIcontains: serviceConnectionNameIcontains, serviceConnectionNameIexact: serviceConnectionNameIexact) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - **managedIcontains** | **String** | | [optional] - **managedIexact** | **String** | | [optional] - **nameIcontains** | **String** | | [optional] - **nameIexact** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **providersIsnull** | **Bool** | | [optional] - **providersByPk** | [**[Int]**](Int.md) | | [optional] - **search** | **String** | A search term. | [optional] - **serviceConnectionNameIcontains** | **String** | | [optional] - **serviceConnectionNameIexact** | **String** | | [optional] - -### Return type - -[**[OutpostHealth]**](OutpostHealth.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesList** -```swift - open class func outpostsInstancesList(managedIcontains: String? = nil, managedIexact: String? = nil, nameIcontains: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, providersIsnull: Bool? = nil, providersByPk: [Int]? = nil, search: String? = nil, serviceConnectionNameIcontains: String? = nil, serviceConnectionNameIexact: String? = nil, completion: @escaping (_ data: PaginatedOutpostList?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let managedIcontains = "managedIcontains_example" // String | (optional) -let managedIexact = "managedIexact_example" // String | (optional) -let nameIcontains = "nameIcontains_example" // String | (optional) -let nameIexact = "nameIexact_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let providersIsnull = true // Bool | (optional) -let providersByPk = [123] // [Int] | (optional) -let search = "search_example" // String | A search term. (optional) -let serviceConnectionNameIcontains = "serviceConnectionNameIcontains_example" // String | (optional) -let serviceConnectionNameIexact = "serviceConnectionNameIexact_example" // String | (optional) - -OutpostsAPI.outpostsInstancesList(managedIcontains: managedIcontains, managedIexact: managedIexact, nameIcontains: nameIcontains, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, providersIsnull: providersIsnull, providersByPk: providersByPk, search: search, serviceConnectionNameIcontains: serviceConnectionNameIcontains, serviceConnectionNameIexact: serviceConnectionNameIexact) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **managedIcontains** | **String** | | [optional] - **managedIexact** | **String** | | [optional] - **nameIcontains** | **String** | | [optional] - **nameIexact** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **providersIsnull** | **Bool** | | [optional] - **providersByPk** | [**[Int]**](Int.md) | | [optional] - **search** | **String** | A search term. | [optional] - **serviceConnectionNameIcontains** | **String** | | [optional] - **serviceConnectionNameIexact** | **String** | | [optional] - -### Return type - -[**PaginatedOutpostList**](PaginatedOutpostList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesPartialUpdate** -```swift - open class func outpostsInstancesPartialUpdate(uuid: UUID, patchedOutpostRequest: PatchedOutpostRequest? = nil, completion: @escaping (_ data: Outpost?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. -let patchedOutpostRequest = PatchedOutpostRequest(name: "name_example", type: OutpostTypeEnum(), providers: [123], serviceConnection: 123, config: "TODO", managed: "managed_example") // PatchedOutpostRequest | (optional) - -OutpostsAPI.outpostsInstancesPartialUpdate(uuid: uuid, patchedOutpostRequest: patchedOutpostRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - **patchedOutpostRequest** | [**PatchedOutpostRequest**](PatchedOutpostRequest.md) | | [optional] - -### Return type - -[**Outpost**](Outpost.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesRetrieve** -```swift - open class func outpostsInstancesRetrieve(uuid: UUID, completion: @escaping (_ data: Outpost?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. - -OutpostsAPI.outpostsInstancesRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - -### Return type - -[**Outpost**](Outpost.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesUpdate** -```swift - open class func outpostsInstancesUpdate(uuid: UUID, outpostRequest: OutpostRequest, completion: @escaping (_ data: Outpost?, _ error: Error?) -> Void) -``` - - - -Outpost Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. -let outpostRequest = OutpostRequest(name: "name_example", type: OutpostTypeEnum(), providers: [123], serviceConnection: 123, config: "TODO", managed: "managed_example") // OutpostRequest | - -OutpostsAPI.outpostsInstancesUpdate(uuid: uuid, outpostRequest: outpostRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - **outpostRequest** | [**OutpostRequest**](OutpostRequest.md) | | - -### Return type - -[**Outpost**](Outpost.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsInstancesUsedByList** -```swift - open class func outpostsInstancesUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost. - -OutpostsAPI.outpostsInstancesUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsLdapList** -```swift - open class func outpostsLdapList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedLDAPOutpostConfigList?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -OutpostsAPI.outpostsLdapList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedLDAPOutpostConfigList**](PaginatedLDAPOutpostConfigList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsLdapRetrieve** -```swift - open class func outpostsLdapRetrieve(id: Int, completion: @escaping (_ data: LDAPOutpostConfig?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. - -OutpostsAPI.outpostsLdapRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - -### Return type - -[**LDAPOutpostConfig**](LDAPOutpostConfig.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsProxyList** -```swift - open class func outpostsProxyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedProxyOutpostConfigList?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -OutpostsAPI.outpostsProxyList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedProxyOutpostConfigList**](PaginatedProxyOutpostConfigList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsProxyRetrieve** -```swift - open class func outpostsProxyRetrieve(id: Int, completion: @escaping (_ data: ProxyOutpostConfig?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. - -OutpostsAPI.outpostsProxyRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - -### Return type - -[**ProxyOutpostConfig**](ProxyOutpostConfig.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsRadiusList** -```swift - open class func outpostsRadiusList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedRadiusOutpostConfigList?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -OutpostsAPI.outpostsRadiusList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedRadiusOutpostConfigList**](PaginatedRadiusOutpostConfigList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsRadiusRetrieve** -```swift - open class func outpostsRadiusRetrieve(id: Int, completion: @escaping (_ data: RadiusOutpostConfig?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. - -OutpostsAPI.outpostsRadiusRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - -### Return type - -[**RadiusOutpostConfig**](RadiusOutpostConfig.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllDestroy** -```swift - open class func outpostsServiceConnectionsAllDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -ServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsAllDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost Service-Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllList** -```swift - open class func outpostsServiceConnectionsAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedServiceConnectionList?, _ error: Error?) -> Void) -``` - - - -ServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -OutpostsAPI.outpostsServiceConnectionsAllList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedServiceConnectionList**](PaginatedServiceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllRetrieve** -```swift - open class func outpostsServiceConnectionsAllRetrieve(uuid: UUID, completion: @escaping (_ data: ServiceConnection?, _ error: Error?) -> Void) -``` - - - -ServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsAllRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost Service-Connection. | - -### Return type - -[**ServiceConnection**](ServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllStateRetrieve** -```swift - open class func outpostsServiceConnectionsAllStateRetrieve(uuid: UUID, completion: @escaping (_ data: ServiceConnectionState?, _ error: Error?) -> Void) -``` - - - -Get the service connection's state - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsAllStateRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost Service-Connection. | - -### Return type - -[**ServiceConnectionState**](ServiceConnectionState.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllTypesList** -```swift - open class func outpostsServiceConnectionsAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable service connection types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -OutpostsAPI.outpostsServiceConnectionsAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsAllUsedByList** -```swift - open class func outpostsServiceConnectionsAllUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Outpost Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsAllUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Outpost Service-Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerCreate** -```swift - open class func outpostsServiceConnectionsDockerCreate(dockerServiceConnectionRequest: DockerServiceConnectionRequest, completion: @escaping (_ data: DockerServiceConnection?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let dockerServiceConnectionRequest = DockerServiceConnectionRequest(name: "name_example", local: false, url: "url_example", tlsVerification: 123, tlsAuthentication: 123) // DockerServiceConnectionRequest | - -OutpostsAPI.outpostsServiceConnectionsDockerCreate(dockerServiceConnectionRequest: dockerServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dockerServiceConnectionRequest** | [**DockerServiceConnectionRequest**](DockerServiceConnectionRequest.md) | | - -### Return type - -[**DockerServiceConnection**](DockerServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerDestroy** -```swift - open class func outpostsServiceConnectionsDockerDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Docker Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsDockerDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Docker Service-Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerList** -```swift - open class func outpostsServiceConnectionsDockerList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, tlsAuthentication: UUID? = nil, tlsVerification: UUID? = nil, url: String? = nil, completion: @escaping (_ data: PaginatedDockerServiceConnectionList?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let local = true // Bool | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let tlsAuthentication = 987 // UUID | (optional) -let tlsVerification = 987 // UUID | (optional) -let url = "url_example" // String | (optional) - -OutpostsAPI.outpostsServiceConnectionsDockerList(local: local, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, tlsAuthentication: tlsAuthentication, tlsVerification: tlsVerification, url: url) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **local** | **Bool** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **tlsAuthentication** | **UUID** | | [optional] - **tlsVerification** | **UUID** | | [optional] - **url** | **String** | | [optional] - -### Return type - -[**PaginatedDockerServiceConnectionList**](PaginatedDockerServiceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerPartialUpdate** -```swift - open class func outpostsServiceConnectionsDockerPartialUpdate(uuid: UUID, patchedDockerServiceConnectionRequest: PatchedDockerServiceConnectionRequest? = nil, completion: @escaping (_ data: DockerServiceConnection?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Docker Service-Connection. -let patchedDockerServiceConnectionRequest = PatchedDockerServiceConnectionRequest(name: "name_example", local: false, url: "url_example", tlsVerification: 123, tlsAuthentication: 123) // PatchedDockerServiceConnectionRequest | (optional) - -OutpostsAPI.outpostsServiceConnectionsDockerPartialUpdate(uuid: uuid, patchedDockerServiceConnectionRequest: patchedDockerServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Docker Service-Connection. | - **patchedDockerServiceConnectionRequest** | [**PatchedDockerServiceConnectionRequest**](PatchedDockerServiceConnectionRequest.md) | | [optional] - -### Return type - -[**DockerServiceConnection**](DockerServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerRetrieve** -```swift - open class func outpostsServiceConnectionsDockerRetrieve(uuid: UUID, completion: @escaping (_ data: DockerServiceConnection?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Docker Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsDockerRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Docker Service-Connection. | - -### Return type - -[**DockerServiceConnection**](DockerServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerUpdate** -```swift - open class func outpostsServiceConnectionsDockerUpdate(uuid: UUID, dockerServiceConnectionRequest: DockerServiceConnectionRequest, completion: @escaping (_ data: DockerServiceConnection?, _ error: Error?) -> Void) -``` - - - -DockerServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Docker Service-Connection. -let dockerServiceConnectionRequest = DockerServiceConnectionRequest(name: "name_example", local: false, url: "url_example", tlsVerification: 123, tlsAuthentication: 123) // DockerServiceConnectionRequest | - -OutpostsAPI.outpostsServiceConnectionsDockerUpdate(uuid: uuid, dockerServiceConnectionRequest: dockerServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Docker Service-Connection. | - **dockerServiceConnectionRequest** | [**DockerServiceConnectionRequest**](DockerServiceConnectionRequest.md) | | - -### Return type - -[**DockerServiceConnection**](DockerServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsDockerUsedByList** -```swift - open class func outpostsServiceConnectionsDockerUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Docker Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsDockerUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Docker Service-Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesCreate** -```swift - open class func outpostsServiceConnectionsKubernetesCreate(kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest, completion: @escaping (_ data: KubernetesServiceConnection?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let kubernetesServiceConnectionRequest = KubernetesServiceConnectionRequest(name: "name_example", local: false, kubeconfig: "TODO", verifySsl: false) // KubernetesServiceConnectionRequest | - -OutpostsAPI.outpostsServiceConnectionsKubernetesCreate(kubernetesServiceConnectionRequest: kubernetesServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kubernetesServiceConnectionRequest** | [**KubernetesServiceConnectionRequest**](KubernetesServiceConnectionRequest.md) | | - -### Return type - -[**KubernetesServiceConnection**](KubernetesServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesDestroy** -```swift - open class func outpostsServiceConnectionsKubernetesDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Kubernetes Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsKubernetesDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Kubernetes Service-Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesList** -```swift - open class func outpostsServiceConnectionsKubernetesList(local: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedKubernetesServiceConnectionList?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let local = true // Bool | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -OutpostsAPI.outpostsServiceConnectionsKubernetesList(local: local, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **local** | **Bool** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedKubernetesServiceConnectionList**](PaginatedKubernetesServiceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesPartialUpdate** -```swift - open class func outpostsServiceConnectionsKubernetesPartialUpdate(uuid: UUID, patchedKubernetesServiceConnectionRequest: PatchedKubernetesServiceConnectionRequest? = nil, completion: @escaping (_ data: KubernetesServiceConnection?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Kubernetes Service-Connection. -let patchedKubernetesServiceConnectionRequest = PatchedKubernetesServiceConnectionRequest(name: "name_example", local: false, kubeconfig: "TODO", verifySsl: false) // PatchedKubernetesServiceConnectionRequest | (optional) - -OutpostsAPI.outpostsServiceConnectionsKubernetesPartialUpdate(uuid: uuid, patchedKubernetesServiceConnectionRequest: patchedKubernetesServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Kubernetes Service-Connection. | - **patchedKubernetesServiceConnectionRequest** | [**PatchedKubernetesServiceConnectionRequest**](PatchedKubernetesServiceConnectionRequest.md) | | [optional] - -### Return type - -[**KubernetesServiceConnection**](KubernetesServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesRetrieve** -```swift - open class func outpostsServiceConnectionsKubernetesRetrieve(uuid: UUID, completion: @escaping (_ data: KubernetesServiceConnection?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Kubernetes Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsKubernetesRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Kubernetes Service-Connection. | - -### Return type - -[**KubernetesServiceConnection**](KubernetesServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesUpdate** -```swift - open class func outpostsServiceConnectionsKubernetesUpdate(uuid: UUID, kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest, completion: @escaping (_ data: KubernetesServiceConnection?, _ error: Error?) -> Void) -``` - - - -KubernetesServiceConnection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Kubernetes Service-Connection. -let kubernetesServiceConnectionRequest = KubernetesServiceConnectionRequest(name: "name_example", local: false, kubeconfig: "TODO", verifySsl: false) // KubernetesServiceConnectionRequest | - -OutpostsAPI.outpostsServiceConnectionsKubernetesUpdate(uuid: uuid, kubernetesServiceConnectionRequest: kubernetesServiceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Kubernetes Service-Connection. | - **kubernetesServiceConnectionRequest** | [**KubernetesServiceConnectionRequest**](KubernetesServiceConnectionRequest.md) | | - -### Return type - -[**KubernetesServiceConnection**](KubernetesServiceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **outpostsServiceConnectionsKubernetesUsedByList** -```swift - open class func outpostsServiceConnectionsKubernetesUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Kubernetes Service-Connection. - -OutpostsAPI.outpostsServiceConnectionsKubernetesUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Kubernetes Service-Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/PaginatedApplicationList.md b/docs/PaginatedApplicationList.md deleted file mode 100644 index 4839e4d..0000000 --- a/docs/PaginatedApplicationList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedApplicationList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Application] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticateWebAuthnStageList.md b/docs/PaginatedAuthenticateWebAuthnStageList.md deleted file mode 100644 index 0779328..0000000 --- a/docs/PaginatedAuthenticateWebAuthnStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticateWebAuthnStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticateWebAuthnStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatedSessionList.md b/docs/PaginatedAuthenticatedSessionList.md deleted file mode 100644 index 377fe20..0000000 --- a/docs/PaginatedAuthenticatedSessionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatedSessionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatedSession] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatorDuoStageList.md b/docs/PaginatedAuthenticatorDuoStageList.md deleted file mode 100644 index 70b4d15..0000000 --- a/docs/PaginatedAuthenticatorDuoStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatorDuoStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatorDuoStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatorSMSStageList.md b/docs/PaginatedAuthenticatorSMSStageList.md deleted file mode 100644 index af5ee92..0000000 --- a/docs/PaginatedAuthenticatorSMSStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatorSMSStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatorSMSStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatorStaticStageList.md b/docs/PaginatedAuthenticatorStaticStageList.md deleted file mode 100644 index 35eef96..0000000 --- a/docs/PaginatedAuthenticatorStaticStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatorStaticStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatorStaticStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatorTOTPStageList.md b/docs/PaginatedAuthenticatorTOTPStageList.md deleted file mode 100644 index eb6e51a..0000000 --- a/docs/PaginatedAuthenticatorTOTPStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatorTOTPStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatorTOTPStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedAuthenticatorValidateStageList.md b/docs/PaginatedAuthenticatorValidateStageList.md deleted file mode 100644 index d9b11e7..0000000 --- a/docs/PaginatedAuthenticatorValidateStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedAuthenticatorValidateStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [AuthenticatorValidateStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedBlueprintInstanceList.md b/docs/PaginatedBlueprintInstanceList.md deleted file mode 100644 index b873cd9..0000000 --- a/docs/PaginatedBlueprintInstanceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedBlueprintInstanceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [BlueprintInstance] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedCaptchaStageList.md b/docs/PaginatedCaptchaStageList.md deleted file mode 100644 index ae8f6f7..0000000 --- a/docs/PaginatedCaptchaStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedCaptchaStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [CaptchaStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedCertificateKeyPairList.md b/docs/PaginatedCertificateKeyPairList.md deleted file mode 100644 index d7354a5..0000000 --- a/docs/PaginatedCertificateKeyPairList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedCertificateKeyPairList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [CertificateKeyPair] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedConsentStageList.md b/docs/PaginatedConsentStageList.md deleted file mode 100644 index 1e7208b..0000000 --- a/docs/PaginatedConsentStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedConsentStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ConsentStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedDenyStageList.md b/docs/PaginatedDenyStageList.md deleted file mode 100644 index 3b28bd7..0000000 --- a/docs/PaginatedDenyStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedDenyStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [DenyStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedDockerServiceConnectionList.md b/docs/PaginatedDockerServiceConnectionList.md deleted file mode 100644 index 953a4fe..0000000 --- a/docs/PaginatedDockerServiceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedDockerServiceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [DockerServiceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedDummyPolicyList.md b/docs/PaginatedDummyPolicyList.md deleted file mode 100644 index 9bbbae8..0000000 --- a/docs/PaginatedDummyPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedDummyPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [DummyPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedDummyStageList.md b/docs/PaginatedDummyStageList.md deleted file mode 100644 index 33fe28a..0000000 --- a/docs/PaginatedDummyStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedDummyStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [DummyStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedDuoDeviceList.md b/docs/PaginatedDuoDeviceList.md deleted file mode 100644 index fd522da..0000000 --- a/docs/PaginatedDuoDeviceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedDuoDeviceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [DuoDevice] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedEmailStageList.md b/docs/PaginatedEmailStageList.md deleted file mode 100644 index 1ff148a..0000000 --- a/docs/PaginatedEmailStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedEmailStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [EmailStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedEventList.md b/docs/PaginatedEventList.md deleted file mode 100644 index 9b6983e..0000000 --- a/docs/PaginatedEventList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedEventList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Event] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedEventMatcherPolicyList.md b/docs/PaginatedEventMatcherPolicyList.md deleted file mode 100644 index 94139b7..0000000 --- a/docs/PaginatedEventMatcherPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedEventMatcherPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [EventMatcherPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedExpiringBaseGrantModelList.md b/docs/PaginatedExpiringBaseGrantModelList.md deleted file mode 100644 index 44f06f9..0000000 --- a/docs/PaginatedExpiringBaseGrantModelList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedExpiringBaseGrantModelList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ExpiringBaseGrantModel] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedExpressionPolicyList.md b/docs/PaginatedExpressionPolicyList.md deleted file mode 100644 index efeda5c..0000000 --- a/docs/PaginatedExpressionPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedExpressionPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ExpressionPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedExtraRoleObjectPermissionList.md b/docs/PaginatedExtraRoleObjectPermissionList.md deleted file mode 100644 index 0c18e2b..0000000 --- a/docs/PaginatedExtraRoleObjectPermissionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedExtraRoleObjectPermissionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ExtraRoleObjectPermission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedExtraUserObjectPermissionList.md b/docs/PaginatedExtraUserObjectPermissionList.md deleted file mode 100644 index 09a42c3..0000000 --- a/docs/PaginatedExtraUserObjectPermissionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedExtraUserObjectPermissionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ExtraUserObjectPermission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedFlowList.md b/docs/PaginatedFlowList.md deleted file mode 100644 index ae911aa..0000000 --- a/docs/PaginatedFlowList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedFlowList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Flow] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedFlowStageBindingList.md b/docs/PaginatedFlowStageBindingList.md deleted file mode 100644 index 44d4d08..0000000 --- a/docs/PaginatedFlowStageBindingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedFlowStageBindingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [FlowStageBinding] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedGroupList.md b/docs/PaginatedGroupList.md deleted file mode 100644 index 9b619af..0000000 --- a/docs/PaginatedGroupList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedGroupList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Group] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedIdentificationStageList.md b/docs/PaginatedIdentificationStageList.md deleted file mode 100644 index 9c07766..0000000 --- a/docs/PaginatedIdentificationStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedIdentificationStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [IdentificationStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedInvitationList.md b/docs/PaginatedInvitationList.md deleted file mode 100644 index b089f20..0000000 --- a/docs/PaginatedInvitationList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedInvitationList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Invitation] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedInvitationStageList.md b/docs/PaginatedInvitationStageList.md deleted file mode 100644 index c4154d4..0000000 --- a/docs/PaginatedInvitationStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedInvitationStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [InvitationStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedKubernetesServiceConnectionList.md b/docs/PaginatedKubernetesServiceConnectionList.md deleted file mode 100644 index e9a032e..0000000 --- a/docs/PaginatedKubernetesServiceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedKubernetesServiceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [KubernetesServiceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedLDAPOutpostConfigList.md b/docs/PaginatedLDAPOutpostConfigList.md deleted file mode 100644 index 6b83fa8..0000000 --- a/docs/PaginatedLDAPOutpostConfigList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedLDAPOutpostConfigList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [LDAPOutpostConfig] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedLDAPPropertyMappingList.md b/docs/PaginatedLDAPPropertyMappingList.md deleted file mode 100644 index a83312c..0000000 --- a/docs/PaginatedLDAPPropertyMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedLDAPPropertyMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [LDAPPropertyMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedLDAPProviderList.md b/docs/PaginatedLDAPProviderList.md deleted file mode 100644 index b95f5db..0000000 --- a/docs/PaginatedLDAPProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedLDAPProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [LDAPProvider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedLDAPSourceList.md b/docs/PaginatedLDAPSourceList.md deleted file mode 100644 index 98bbb94..0000000 --- a/docs/PaginatedLDAPSourceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedLDAPSourceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [LDAPSource] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedLicenseList.md b/docs/PaginatedLicenseList.md deleted file mode 100644 index 68f270d..0000000 --- a/docs/PaginatedLicenseList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedLicenseList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [License] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedNotificationList.md b/docs/PaginatedNotificationList.md deleted file mode 100644 index 61b13c1..0000000 --- a/docs/PaginatedNotificationList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedNotificationList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Notification] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedNotificationRuleList.md b/docs/PaginatedNotificationRuleList.md deleted file mode 100644 index aa2206d..0000000 --- a/docs/PaginatedNotificationRuleList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedNotificationRuleList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [NotificationRule] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedNotificationTransportList.md b/docs/PaginatedNotificationTransportList.md deleted file mode 100644 index 976f9e0..0000000 --- a/docs/PaginatedNotificationTransportList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedNotificationTransportList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [NotificationTransport] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedNotificationWebhookMappingList.md b/docs/PaginatedNotificationWebhookMappingList.md deleted file mode 100644 index e0b5a31..0000000 --- a/docs/PaginatedNotificationWebhookMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedNotificationWebhookMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [NotificationWebhookMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedOAuth2ProviderList.md b/docs/PaginatedOAuth2ProviderList.md deleted file mode 100644 index ede9e6c..0000000 --- a/docs/PaginatedOAuth2ProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedOAuth2ProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [OAuth2Provider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedOAuthSourceList.md b/docs/PaginatedOAuthSourceList.md deleted file mode 100644 index 8f7fc52..0000000 --- a/docs/PaginatedOAuthSourceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedOAuthSourceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [OAuthSource] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedOutpostList.md b/docs/PaginatedOutpostList.md deleted file mode 100644 index d308161..0000000 --- a/docs/PaginatedOutpostList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedOutpostList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Outpost] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPasswordExpiryPolicyList.md b/docs/PaginatedPasswordExpiryPolicyList.md deleted file mode 100644 index 9241153..0000000 --- a/docs/PaginatedPasswordExpiryPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPasswordExpiryPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PasswordExpiryPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPasswordPolicyList.md b/docs/PaginatedPasswordPolicyList.md deleted file mode 100644 index 291e0a4..0000000 --- a/docs/PaginatedPasswordPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPasswordPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PasswordPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPasswordStageList.md b/docs/PaginatedPasswordStageList.md deleted file mode 100644 index 4f0aee9..0000000 --- a/docs/PaginatedPasswordStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPasswordStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PasswordStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPermissionList.md b/docs/PaginatedPermissionList.md deleted file mode 100644 index c6e3400..0000000 --- a/docs/PaginatedPermissionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPermissionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Permission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPlexSourceConnectionList.md b/docs/PaginatedPlexSourceConnectionList.md deleted file mode 100644 index 094bcbd..0000000 --- a/docs/PaginatedPlexSourceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPlexSourceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PlexSourceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPlexSourceList.md b/docs/PaginatedPlexSourceList.md deleted file mode 100644 index f617c87..0000000 --- a/docs/PaginatedPlexSourceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPlexSourceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PlexSource] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPolicyBindingList.md b/docs/PaginatedPolicyBindingList.md deleted file mode 100644 index c4289f2..0000000 --- a/docs/PaginatedPolicyBindingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPolicyBindingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PolicyBinding] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPolicyList.md b/docs/PaginatedPolicyList.md deleted file mode 100644 index 9da635a..0000000 --- a/docs/PaginatedPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Policy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPromptList.md b/docs/PaginatedPromptList.md deleted file mode 100644 index 7e7d2c1..0000000 --- a/docs/PaginatedPromptList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPromptList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Prompt] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPromptStageList.md b/docs/PaginatedPromptStageList.md deleted file mode 100644 index cf2803a..0000000 --- a/docs/PaginatedPromptStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPromptStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PromptStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedPropertyMappingList.md b/docs/PaginatedPropertyMappingList.md deleted file mode 100644 index 714b6d4..0000000 --- a/docs/PaginatedPropertyMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedPropertyMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [PropertyMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedProviderList.md b/docs/PaginatedProviderList.md deleted file mode 100644 index 363a3f3..0000000 --- a/docs/PaginatedProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Provider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedProxyOutpostConfigList.md b/docs/PaginatedProxyOutpostConfigList.md deleted file mode 100644 index afefce2..0000000 --- a/docs/PaginatedProxyOutpostConfigList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedProxyOutpostConfigList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ProxyOutpostConfig] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedProxyProviderList.md b/docs/PaginatedProxyProviderList.md deleted file mode 100644 index f0aaf96..0000000 --- a/docs/PaginatedProxyProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedProxyProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ProxyProvider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedRadiusOutpostConfigList.md b/docs/PaginatedRadiusOutpostConfigList.md deleted file mode 100644 index eb68f79..0000000 --- a/docs/PaginatedRadiusOutpostConfigList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedRadiusOutpostConfigList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [RadiusOutpostConfig] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedRadiusProviderList.md b/docs/PaginatedRadiusProviderList.md deleted file mode 100644 index 46cf836..0000000 --- a/docs/PaginatedRadiusProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedRadiusProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [RadiusProvider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedReputationList.md b/docs/PaginatedReputationList.md deleted file mode 100644 index 550f3e1..0000000 --- a/docs/PaginatedReputationList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedReputationList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Reputation] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedReputationPolicyList.md b/docs/PaginatedReputationPolicyList.md deleted file mode 100644 index c3341ff..0000000 --- a/docs/PaginatedReputationPolicyList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedReputationPolicyList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ReputationPolicy] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedRoleAssignedObjectPermissionList.md b/docs/PaginatedRoleAssignedObjectPermissionList.md deleted file mode 100644 index 6595375..0000000 --- a/docs/PaginatedRoleAssignedObjectPermissionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedRoleAssignedObjectPermissionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [RoleAssignedObjectPermission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedRoleList.md b/docs/PaginatedRoleList.md deleted file mode 100644 index f93fbfe..0000000 --- a/docs/PaginatedRoleList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedRoleList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Role] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSAMLPropertyMappingList.md b/docs/PaginatedSAMLPropertyMappingList.md deleted file mode 100644 index 55b0a75..0000000 --- a/docs/PaginatedSAMLPropertyMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSAMLPropertyMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SAMLPropertyMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSAMLProviderList.md b/docs/PaginatedSAMLProviderList.md deleted file mode 100644 index ed074b3..0000000 --- a/docs/PaginatedSAMLProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSAMLProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SAMLProvider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSAMLSourceList.md b/docs/PaginatedSAMLSourceList.md deleted file mode 100644 index a043938..0000000 --- a/docs/PaginatedSAMLSourceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSAMLSourceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SAMLSource] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSCIMMappingList.md b/docs/PaginatedSCIMMappingList.md deleted file mode 100644 index cbc5528..0000000 --- a/docs/PaginatedSCIMMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSCIMMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SCIMMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSCIMProviderList.md b/docs/PaginatedSCIMProviderList.md deleted file mode 100644 index c1bd988..0000000 --- a/docs/PaginatedSCIMProviderList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSCIMProviderList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SCIMProvider] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSMSDeviceList.md b/docs/PaginatedSMSDeviceList.md deleted file mode 100644 index 7ca822d..0000000 --- a/docs/PaginatedSMSDeviceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSMSDeviceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [SMSDevice] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedScopeMappingList.md b/docs/PaginatedScopeMappingList.md deleted file mode 100644 index 758cc5f..0000000 --- a/docs/PaginatedScopeMappingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedScopeMappingList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ScopeMapping] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedServiceConnectionList.md b/docs/PaginatedServiceConnectionList.md deleted file mode 100644 index 0794ae0..0000000 --- a/docs/PaginatedServiceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedServiceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [ServiceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedSourceList.md b/docs/PaginatedSourceList.md deleted file mode 100644 index 5935fd2..0000000 --- a/docs/PaginatedSourceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedSourceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Source] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedStageList.md b/docs/PaginatedStageList.md deleted file mode 100644 index a1bbfa3..0000000 --- a/docs/PaginatedStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Stage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedStaticDeviceList.md b/docs/PaginatedStaticDeviceList.md deleted file mode 100644 index 7889474..0000000 --- a/docs/PaginatedStaticDeviceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedStaticDeviceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [StaticDevice] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedTOTPDeviceList.md b/docs/PaginatedTOTPDeviceList.md deleted file mode 100644 index b4ab37e..0000000 --- a/docs/PaginatedTOTPDeviceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedTOTPDeviceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [TOTPDevice] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedTenantList.md b/docs/PaginatedTenantList.md deleted file mode 100644 index 8256933..0000000 --- a/docs/PaginatedTenantList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedTenantList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Tenant] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedTokenList.md b/docs/PaginatedTokenList.md deleted file mode 100644 index b1709c2..0000000 --- a/docs/PaginatedTokenList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedTokenList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [Token] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedTokenModelList.md b/docs/PaginatedTokenModelList.md deleted file mode 100644 index 4af3c2a..0000000 --- a/docs/PaginatedTokenModelList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedTokenModelList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [TokenModel] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserAssignedObjectPermissionList.md b/docs/PaginatedUserAssignedObjectPermissionList.md deleted file mode 100644 index f91d97f..0000000 --- a/docs/PaginatedUserAssignedObjectPermissionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserAssignedObjectPermissionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserAssignedObjectPermission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserConsentList.md b/docs/PaginatedUserConsentList.md deleted file mode 100644 index 490048e..0000000 --- a/docs/PaginatedUserConsentList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserConsentList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserConsent] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserDeleteStageList.md b/docs/PaginatedUserDeleteStageList.md deleted file mode 100644 index 69b3f47..0000000 --- a/docs/PaginatedUserDeleteStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserDeleteStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserDeleteStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserList.md b/docs/PaginatedUserList.md deleted file mode 100644 index bcde718..0000000 --- a/docs/PaginatedUserList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [User] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserLoginStageList.md b/docs/PaginatedUserLoginStageList.md deleted file mode 100644 index ee6d4e9..0000000 --- a/docs/PaginatedUserLoginStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserLoginStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserLoginStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserLogoutStageList.md b/docs/PaginatedUserLogoutStageList.md deleted file mode 100644 index 89a5cce..0000000 --- a/docs/PaginatedUserLogoutStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserLogoutStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserLogoutStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserOAuthSourceConnectionList.md b/docs/PaginatedUserOAuthSourceConnectionList.md deleted file mode 100644 index 5ccef19..0000000 --- a/docs/PaginatedUserOAuthSourceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserOAuthSourceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserOAuthSourceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserSAMLSourceConnectionList.md b/docs/PaginatedUserSAMLSourceConnectionList.md deleted file mode 100644 index fa5ccc2..0000000 --- a/docs/PaginatedUserSAMLSourceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserSAMLSourceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserSAMLSourceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserSourceConnectionList.md b/docs/PaginatedUserSourceConnectionList.md deleted file mode 100644 index 6cfd069..0000000 --- a/docs/PaginatedUserSourceConnectionList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserSourceConnectionList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserSourceConnection] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedUserWriteStageList.md b/docs/PaginatedUserWriteStageList.md deleted file mode 100644 index ace14a3..0000000 --- a/docs/PaginatedUserWriteStageList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedUserWriteStageList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [UserWriteStage] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaginatedWebAuthnDeviceList.md b/docs/PaginatedWebAuthnDeviceList.md deleted file mode 100644 index f6b1746..0000000 --- a/docs/PaginatedWebAuthnDeviceList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaginatedWebAuthnDeviceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | | -**results** | [WebAuthnDevice] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Pagination.md b/docs/Pagination.md deleted file mode 100644 index aff0ffc..0000000 --- a/docs/Pagination.md +++ /dev/null @@ -1,16 +0,0 @@ -# Pagination - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**next** | **Double** | | -**previous** | **Double** | | -**count** | **Double** | | -**current** | **Double** | | -**totalPages** | **Double** | | -**startIndex** | **Double** | | -**endIndex** | **Double** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordChallenge.md b/docs/PasswordChallenge.md deleted file mode 100644 index d90ec85..0000000 --- a/docs/PasswordChallenge.md +++ /dev/null @@ -1,16 +0,0 @@ -# PasswordChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-password"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | -**recoveryUrl** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordChallengeResponseRequest.md b/docs/PasswordChallengeResponseRequest.md deleted file mode 100644 index e9573fa..0000000 --- a/docs/PasswordChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PasswordChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-password"] -**password** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordExpiryPolicy.md b/docs/PasswordExpiryPolicy.md deleted file mode 100644 index 154b280..0000000 --- a/docs/PasswordExpiryPolicy.md +++ /dev/null @@ -1,19 +0,0 @@ -# PasswordExpiryPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**days** | **Int** | | -**denyOnly** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordExpiryPolicyRequest.md b/docs/PasswordExpiryPolicyRequest.md deleted file mode 100644 index 4c6d4bf..0000000 --- a/docs/PasswordExpiryPolicyRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PasswordExpiryPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**days** | **Int** | | -**denyOnly** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordPolicy.md b/docs/PasswordPolicy.md deleted file mode 100644 index abcbc3f..0000000 --- a/docs/PasswordPolicy.md +++ /dev/null @@ -1,30 +0,0 @@ -# PasswordPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**passwordField** | **String** | Field key to check, field keys defined in Prompt stages are available. | [optional] -**amountDigits** | **Int** | | [optional] -**amountUppercase** | **Int** | | [optional] -**amountLowercase** | **Int** | | [optional] -**amountSymbols** | **Int** | | [optional] -**lengthMin** | **Int** | | [optional] -**symbolCharset** | **String** | | [optional] -**errorMessage** | **String** | | [optional] -**checkStaticRules** | **Bool** | | [optional] -**checkHaveIBeenPwned** | **Bool** | | [optional] -**checkZxcvbn** | **Bool** | | [optional] -**hibpAllowedCount** | **Int** | How many times the password hash is allowed to be on haveibeenpwned | [optional] -**zxcvbnScoreThreshold** | **Int** | If the zxcvbn score is equal or less than this value, the policy will fail. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordPolicyRequest.md b/docs/PasswordPolicyRequest.md deleted file mode 100644 index fbb8dce..0000000 --- a/docs/PasswordPolicyRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# PasswordPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**passwordField** | **String** | Field key to check, field keys defined in Prompt stages are available. | [optional] -**amountDigits** | **Int** | | [optional] -**amountUppercase** | **Int** | | [optional] -**amountLowercase** | **Int** | | [optional] -**amountSymbols** | **Int** | | [optional] -**lengthMin** | **Int** | | [optional] -**symbolCharset** | **String** | | [optional] -**errorMessage** | **String** | | [optional] -**checkStaticRules** | **Bool** | | [optional] -**checkHaveIBeenPwned** | **Bool** | | [optional] -**checkZxcvbn** | **Bool** | | [optional] -**hibpAllowedCount** | **Int** | How many times the password hash is allowed to be on haveibeenpwned | [optional] -**zxcvbnScoreThreshold** | **Int** | If the zxcvbn score is equal or less than this value, the policy will fail. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordStage.md b/docs/PasswordStage.md deleted file mode 100644 index 18d3f09..0000000 --- a/docs/PasswordStage.md +++ /dev/null @@ -1,19 +0,0 @@ -# PasswordStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**backends** | [BackendsEnum] | Selection of backends to test the password against. | -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**failedAttemptsBeforeCancel** | **Int** | How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PasswordStageRequest.md b/docs/PasswordStageRequest.md deleted file mode 100644 index 21e0e35..0000000 --- a/docs/PasswordStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PasswordStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**backends** | [BackendsEnum] | Selection of backends to test the password against. | -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**failedAttemptsBeforeCancel** | **Int** | How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedApplicationRequest.md b/docs/PatchedApplicationRequest.md deleted file mode 100644 index 47dbb29..0000000 --- a/docs/PatchedApplicationRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchedApplicationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Application's display Name. | [optional] -**slug** | **String** | Internal application name, used in URLs. | [optional] -**provider** | **Int** | | [optional] -**backchannelProviders** | **[Int]** | | [optional] -**openInNewTab** | **Bool** | Open launch URL in a new browser tab or window. | [optional] -**metaLaunchUrl** | **String** | | [optional] -**metaDescription** | **String** | | [optional] -**metaPublisher** | **String** | | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**group** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticateWebAuthnStageRequest.md b/docs/PatchedAuthenticateWebAuthnStageRequest.md deleted file mode 100644 index 2ec1544..0000000 --- a/docs/PatchedAuthenticateWebAuthnStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedAuthenticateWebAuthnStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**userVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] -**authenticatorAttachment** | [**AuthenticatorAttachmentEnum**](AuthenticatorAttachmentEnum.md) | | [optional] -**residentKeyRequirement** | [**ResidentKeyRequirementEnum**](ResidentKeyRequirementEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticatorDuoStageRequest.md b/docs/PatchedAuthenticatorDuoStageRequest.md deleted file mode 100644 index b3061d0..0000000 --- a/docs/PatchedAuthenticatorDuoStageRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchedAuthenticatorDuoStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**apiHostname** | **String** | | [optional] -**adminIntegrationKey** | **String** | | [optional] -**adminSecretKey** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticatorSMSStageRequest.md b/docs/PatchedAuthenticatorSMSStageRequest.md deleted file mode 100644 index 90644a6..0000000 --- a/docs/PatchedAuthenticatorSMSStageRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchedAuthenticatorSMSStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**provider** | [**ProviderEnum**](ProviderEnum.md) | | [optional] -**fromNumber** | **String** | | [optional] -**accountSid** | **String** | | [optional] -**auth** | **String** | | [optional] -**authPassword** | **String** | | [optional] -**authType** | [**AuthTypeEnum**](AuthTypeEnum.md) | | [optional] -**verifyOnly** | **Bool** | When enabled, the Phone number is only used during enrollment to verify the users authenticity. Only a hash of the phone number is saved to ensure it is not reused in the future. | [optional] -**mapping** | **UUID** | Optionally modify the payload being sent to custom providers. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticatorStaticStageRequest.md b/docs/PatchedAuthenticatorStaticStageRequest.md deleted file mode 100644 index 971fdd2..0000000 --- a/docs/PatchedAuthenticatorStaticStageRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchedAuthenticatorStaticStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**tokenCount** | **Int** | | [optional] -**tokenLength** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticatorTOTPStageRequest.md b/docs/PatchedAuthenticatorTOTPStageRequest.md deleted file mode 100644 index 4ee5dc1..0000000 --- a/docs/PatchedAuthenticatorTOTPStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedAuthenticatorTOTPStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**friendlyName** | **String** | | [optional] -**digits** | [**DigitsEnum**](DigitsEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedAuthenticatorValidateStageRequest.md b/docs/PatchedAuthenticatorValidateStageRequest.md deleted file mode 100644 index 594e821..0000000 --- a/docs/PatchedAuthenticatorValidateStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedAuthenticatorValidateStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**notConfiguredAction** | [**NotConfiguredActionEnum**](NotConfiguredActionEnum.md) | | [optional] -**deviceClasses** | [DeviceClassesEnum] | Device classes which can be used to authenticate | [optional] -**configurationStages** | **[UUID]** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] -**lastAuthThreshold** | **String** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**webauthnUserVerification** | [**UserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedBlueprintInstanceRequest.md b/docs/PatchedBlueprintInstanceRequest.md deleted file mode 100644 index 6789816..0000000 --- a/docs/PatchedBlueprintInstanceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedBlueprintInstanceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**path** | **String** | | [optional] [default to ""] -**context** | [String: AnyCodable] | | [optional] -**enabled** | **Bool** | | [optional] -**content** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedCaptchaStageRequest.md b/docs/PatchedCaptchaStageRequest.md deleted file mode 100644 index 821d4d1..0000000 --- a/docs/PatchedCaptchaStageRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchedCaptchaStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**publicKey** | **String** | Public key, acquired your captcha Provider. | [optional] -**privateKey** | **String** | Private key, acquired your captcha Provider. | [optional] -**jsUrl** | **String** | | [optional] -**apiUrl** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedCertificateKeyPairRequest.md b/docs/PatchedCertificateKeyPairRequest.md deleted file mode 100644 index 748648b..0000000 --- a/docs/PatchedCertificateKeyPairRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedCertificateKeyPairRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**certificateData** | **String** | PEM-encoded Certificate data | [optional] -**keyData** | **String** | Optional Private Key. If this is set, you can use this keypair for encryption. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedConsentStageRequest.md b/docs/PatchedConsentStageRequest.md deleted file mode 100644 index 1877a3b..0000000 --- a/docs/PatchedConsentStageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedConsentStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**mode** | [**ConsentStageModeEnum**](ConsentStageModeEnum.md) | | [optional] -**consentExpireIn** | **String** | Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedDenyStageRequest.md b/docs/PatchedDenyStageRequest.md deleted file mode 100644 index 16798bd..0000000 --- a/docs/PatchedDenyStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedDenyStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**denyMessage** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedDockerServiceConnectionRequest.md b/docs/PatchedDockerServiceConnectionRequest.md deleted file mode 100644 index 5a987cc..0000000 --- a/docs/PatchedDockerServiceConnectionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedDockerServiceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**url** | **String** | Can be in the format of 'unix://<path>' when connecting to a local docker daemon, or 'https://<hostname>:2376' when connecting to a remote system. | [optional] -**tlsVerification** | **UUID** | CA which the endpoint's Certificate is verified against. Can be left empty for no validation. | [optional] -**tlsAuthentication** | **UUID** | Certificate/Key used for authentication. Can be left empty for no authentication. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedDummyPolicyRequest.md b/docs/PatchedDummyPolicyRequest.md deleted file mode 100644 index 78c9595..0000000 --- a/docs/PatchedDummyPolicyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedDummyPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**result** | **Bool** | | [optional] -**waitMin** | **Int** | | [optional] -**waitMax** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedDummyStageRequest.md b/docs/PatchedDummyStageRequest.md deleted file mode 100644 index abe635b..0000000 --- a/docs/PatchedDummyStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedDummyStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**throwError** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedDuoDeviceRequest.md b/docs/PatchedDuoDeviceRequest.md deleted file mode 100644 index 3b2b559..0000000 --- a/docs/PatchedDuoDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedDuoDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedEmailStageRequest.md b/docs/PatchedEmailStageRequest.md deleted file mode 100644 index c7066b1..0000000 --- a/docs/PatchedEmailStageRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# PatchedEmailStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**useGlobalSettings** | **Bool** | When enabled, global Email connection settings will be used and connection settings below will be ignored. | [optional] -**host** | **String** | | [optional] -**port** | **Int** | | [optional] -**username** | **String** | | [optional] -**password** | **String** | | [optional] -**useTls** | **Bool** | | [optional] -**useSsl** | **Bool** | | [optional] -**timeout** | **Int** | | [optional] -**fromAddress** | **String** | | [optional] -**tokenExpiry** | **Int** | Time in minutes the token sent is valid. | [optional] -**subject** | **String** | | [optional] -**template** | **String** | | [optional] -**activateUserOnSuccess** | **Bool** | Activate users upon completion of stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedEventMatcherPolicyRequest.md b/docs/PatchedEventMatcherPolicyRequest.md deleted file mode 100644 index 0abb50d..0000000 --- a/docs/PatchedEventMatcherPolicyRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchedEventMatcherPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**action** | [**EventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] -**clientIp** | **String** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**app** | [**AppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.rbac` - authentik RBAC * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core * `authentik.enterprise` - authentik Enterprise | [optional] -**model** | [**ModelEnum**](ModelEnum.md) | Match events created by selected model. When left empty, all models are matched. When an app is selected, all the application's models are matched. * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedEventRequest.md b/docs/PatchedEventRequest.md deleted file mode 100644 index 8372b10..0000000 --- a/docs/PatchedEventRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedEventRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [String: AnyCodable] | | [optional] -**action** | [**EventActions**](EventActions.md) | | [optional] -**app** | **String** | | [optional] -**context** | [String: AnyCodable] | | [optional] -**clientIp** | **String** | | [optional] -**expires** | **Date** | | [optional] -**tenant** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedExpressionPolicyRequest.md b/docs/PatchedExpressionPolicyRequest.md deleted file mode 100644 index bd298cc..0000000 --- a/docs/PatchedExpressionPolicyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedExpressionPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**expression** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedFlowRequest.md b/docs/PatchedFlowRequest.md deleted file mode 100644 index 803b0cf..0000000 --- a/docs/PatchedFlowRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchedFlowRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**slug** | **String** | Visible in the URL. | [optional] -**title** | **String** | Shown as the Title in Flow pages. | [optional] -**designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**compatibilityMode** | **Bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**layout** | [**LayoutEnum**](LayoutEnum.md) | | [optional] -**deniedAction** | [**DeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**authentication** | [**AuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedFlowStageBindingRequest.md b/docs/PatchedFlowStageBindingRequest.md deleted file mode 100644 index 3df6adf..0000000 --- a/docs/PatchedFlowStageBindingRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedFlowStageBindingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**target** | **UUID** | | [optional] -**stage** | **UUID** | | [optional] -**evaluateOnPlan** | **Bool** | Evaluate policies during the Flow planning process. | [optional] -**reEvaluatePolicies** | **Bool** | Evaluate policies when the Stage is present to the user. | [optional] -**order** | **Int** | | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**invalidResponseAction** | [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedGroupRequest.md b/docs/PatchedGroupRequest.md deleted file mode 100644 index 53908ce..0000000 --- a/docs/PatchedGroupRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchedGroupRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**isSuperuser** | **Bool** | Users added to this group will be superusers. | [optional] -**parent** | **UUID** | | [optional] -**users** | **[Int]** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**roles** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedIdentificationStageRequest.md b/docs/PatchedIdentificationStageRequest.md deleted file mode 100644 index 06c7859..0000000 --- a/docs/PatchedIdentificationStageRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchedIdentificationStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**userFields** | [UserFieldsEnum] | Fields of the user object to match against. (Hold shift to select multiple options) | [optional] -**passwordStage** | **UUID** | When set, shows a password field, instead of showing the password field as seaprate step. | [optional] -**caseInsensitiveMatching** | **Bool** | When enabled, user fields are matched regardless of their casing. | [optional] -**showMatchedUser** | **Bool** | When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown | [optional] -**enrollmentFlow** | **UUID** | Optional enrollment flow, which is linked at the bottom of the page. | [optional] -**recoveryFlow** | **UUID** | Optional recovery flow, which is linked at the bottom of the page. | [optional] -**passwordlessFlow** | **UUID** | Optional passwordless flow, which is linked at the bottom of the page. | [optional] -**sources** | **[UUID]** | Specify which sources should be shown. | [optional] -**showSourceLabels** | **Bool** | | [optional] -**pretendUserExists** | **Bool** | When enabled, the stage will succeed and continue even when incorrect user info is entered. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedInvitationRequest.md b/docs/PatchedInvitationRequest.md deleted file mode 100644 index 419843f..0000000 --- a/docs/PatchedInvitationRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedInvitationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**expires** | **Date** | | [optional] -**fixedData** | [String: AnyCodable] | | [optional] -**singleUse** | **Bool** | When enabled, the invitation will be deleted after usage. | [optional] -**flow** | **UUID** | When set, only the configured flow can use this invitation. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedInvitationStageRequest.md b/docs/PatchedInvitationStageRequest.md deleted file mode 100644 index 8767a95..0000000 --- a/docs/PatchedInvitationStageRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedInvitationStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**continueFlowWithoutInvitation** | **Bool** | If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedKubernetesServiceConnectionRequest.md b/docs/PatchedKubernetesServiceConnectionRequest.md deleted file mode 100644 index ce3bb9e..0000000 --- a/docs/PatchedKubernetesServiceConnectionRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedKubernetesServiceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**kubeconfig** | [String: AnyCodable] | Paste your kubeconfig here. authentik will automatically use the currently selected context. | [optional] -**verifySsl** | **Bool** | Verify SSL Certificates of the Kubernetes API endpoint | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedLDAPPropertyMappingRequest.md b/docs/PatchedLDAPPropertyMappingRequest.md deleted file mode 100644 index 2652c70..0000000 --- a/docs/PatchedLDAPPropertyMappingRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedLDAPPropertyMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | [optional] -**expression** | **String** | | [optional] -**objectField** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedLDAPProviderRequest.md b/docs/PatchedLDAPProviderRequest.md deleted file mode 100644 index 4f7b355..0000000 --- a/docs/PatchedLDAPProviderRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchedLDAPProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**baseDn** | **String** | DN under which objects are accessible. | [optional] -**searchGroup** | **UUID** | Users in this group can do search queries. If not set, every user can execute search queries. | [optional] -**certificate** | **UUID** | | [optional] -**tlsServerName** | **String** | | [optional] -**uidStartNumber** | **Int** | The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber | [optional] -**gidStartNumber** | **Int** | The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber | [optional] -**searchMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**bindMode** | [**LDAPAPIAccessMode**](LDAPAPIAccessMode.md) | | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedLDAPSourceRequest.md b/docs/PatchedLDAPSourceRequest.md deleted file mode 100644 index 2ad68f4..0000000 --- a/docs/PatchedLDAPSourceRequest.md +++ /dev/null @@ -1,37 +0,0 @@ -# PatchedLDAPSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | [optional] -**slug** | **String** | Internal source name, used in URLs. | [optional] -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**serverUri** | **String** | | [optional] -**peerCertificate** | **UUID** | Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. | [optional] -**clientCertificate** | **UUID** | Client certificate to authenticate against the LDAP Server's Certificate. | [optional] -**bindCn** | **String** | | [optional] -**bindPassword** | **String** | | [optional] -**startTls** | **Bool** | | [optional] -**sni** | **Bool** | | [optional] -**baseDn** | **String** | | [optional] -**additionalUserDn** | **String** | Prepended to Base DN for User-queries. | [optional] -**additionalGroupDn** | **String** | Prepended to Base DN for Group-queries. | [optional] -**userObjectFilter** | **String** | Consider Objects matching this filter to be Users. | [optional] -**groupObjectFilter** | **String** | Consider Objects matching this filter to be Groups. | [optional] -**groupMembershipField** | **String** | Field which contains members of a group. | [optional] -**objectUniquenessField** | **String** | Field which contains a unique Identifier. | [optional] -**syncUsers** | **Bool** | | [optional] -**syncUsersPassword** | **Bool** | When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. | [optional] -**syncGroups** | **Bool** | | [optional] -**syncParentGroup** | **UUID** | | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedLicenseRequest.md b/docs/PatchedLicenseRequest.md deleted file mode 100644 index 875c9d2..0000000 --- a/docs/PatchedLicenseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedLicenseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedNotificationRequest.md b/docs/PatchedNotificationRequest.md deleted file mode 100644 index cbe9d42..0000000 --- a/docs/PatchedNotificationRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedNotificationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**event** | [**EventRequest**](EventRequest.md) | | [optional] -**seen** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedNotificationRuleRequest.md b/docs/PatchedNotificationRuleRequest.md deleted file mode 100644 index ef47ecb..0000000 --- a/docs/PatchedNotificationRuleRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedNotificationRuleRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**transports** | **[UUID]** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**severity** | [**SeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] -**group** | **UUID** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedNotificationTransportRequest.md b/docs/PatchedNotificationTransportRequest.md deleted file mode 100644 index b65e447..0000000 --- a/docs/PatchedNotificationTransportRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedNotificationTransportRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**mode** | [**NotificationTransportModeEnum**](NotificationTransportModeEnum.md) | | [optional] -**webhookUrl** | **String** | | [optional] -**webhookMapping** | **UUID** | | [optional] -**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedNotificationWebhookMappingRequest.md b/docs/PatchedNotificationWebhookMappingRequest.md deleted file mode 100644 index bba65dc..0000000 --- a/docs/PatchedNotificationWebhookMappingRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedNotificationWebhookMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**expression** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedOAuth2ProviderRequest.md b/docs/PatchedOAuth2ProviderRequest.md deleted file mode 100644 index 18d7a0e..0000000 --- a/docs/PatchedOAuth2ProviderRequest.md +++ /dev/null @@ -1,25 +0,0 @@ -# PatchedOAuth2ProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**clientType** | [**ClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**accessCodeValidity** | **String** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**includeClaimsInIdToken** | **Bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] -**signingKey** | **UUID** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] -**redirectUris** | **String** | Enter each URI on a new line. | [optional] -**subMode** | [**SubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**issuerMode** | [**IssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] -**jwksSources** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedOAuthSourceRequest.md b/docs/PatchedOAuthSourceRequest.md deleted file mode 100644 index 85506c8..0000000 --- a/docs/PatchedOAuthSourceRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# PatchedOAuthSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | [optional] -**slug** | **String** | Internal source name, used in URLs. | [optional] -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**providerType** | [**ProviderTypeEnum**](ProviderTypeEnum.md) | | [optional] -**requestTokenUrl** | **String** | URL used to request the initial token. This URL is only required for OAuth 1. | [optional] -**authorizationUrl** | **String** | URL the user is redirect to to conest the flow. | [optional] -**accessTokenUrl** | **String** | URL used by authentik to retrieve tokens. | [optional] -**profileUrl** | **String** | URL used by authentik to get user information. | [optional] -**consumerKey** | **String** | | [optional] -**consumerSecret** | **String** | | [optional] -**additionalScopes** | **String** | | [optional] -**oidcWellKnownUrl** | **String** | | [optional] -**oidcJwksUrl** | **String** | | [optional] -**oidcJwks** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedOutpostRequest.md b/docs/PatchedOutpostRequest.md deleted file mode 100644 index 4bcfbd3..0000000 --- a/docs/PatchedOutpostRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchedOutpostRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**type** | [**OutpostTypeEnum**](OutpostTypeEnum.md) | | [optional] -**providers** | **[Int]** | | [optional] -**serviceConnection** | **UUID** | Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. | [optional] -**config** | [String: AnyCodable] | | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPasswordExpiryPolicyRequest.md b/docs/PatchedPasswordExpiryPolicyRequest.md deleted file mode 100644 index 9ca9b16..0000000 --- a/docs/PatchedPasswordExpiryPolicyRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedPasswordExpiryPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**days** | **Int** | | [optional] -**denyOnly** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPasswordPolicyRequest.md b/docs/PatchedPasswordPolicyRequest.md deleted file mode 100644 index 30c31e0..0000000 --- a/docs/PatchedPasswordPolicyRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# PatchedPasswordPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**passwordField** | **String** | Field key to check, field keys defined in Prompt stages are available. | [optional] -**amountDigits** | **Int** | | [optional] -**amountUppercase** | **Int** | | [optional] -**amountLowercase** | **Int** | | [optional] -**amountSymbols** | **Int** | | [optional] -**lengthMin** | **Int** | | [optional] -**symbolCharset** | **String** | | [optional] -**errorMessage** | **String** | | [optional] -**checkStaticRules** | **Bool** | | [optional] -**checkHaveIBeenPwned** | **Bool** | | [optional] -**checkZxcvbn** | **Bool** | | [optional] -**hibpAllowedCount** | **Int** | How many times the password hash is allowed to be on haveibeenpwned | [optional] -**zxcvbnScoreThreshold** | **Int** | If the zxcvbn score is equal or less than this value, the policy will fail. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPasswordStageRequest.md b/docs/PatchedPasswordStageRequest.md deleted file mode 100644 index 05a77a7..0000000 --- a/docs/PatchedPasswordStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedPasswordStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**backends** | [BackendsEnum] | Selection of backends to test the password against. | [optional] -**configureFlow** | **UUID** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**failedAttemptsBeforeCancel** | **Int** | How many attempts a user has before the flow is canceled. To lock the user out, use a reputation policy and a user_write stage. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPermissionAssignRequest.md b/docs/PatchedPermissionAssignRequest.md deleted file mode 100644 index eb8d3d3..0000000 --- a/docs/PatchedPermissionAssignRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedPermissionAssignRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permissions** | **[String]** | | [optional] -**model** | [**ModelEnum**](ModelEnum.md) | | [optional] -**objectPk** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPlexSourceConnectionRequest.md b/docs/PatchedPlexSourceConnectionRequest.md deleted file mode 100644 index 7d021fd..0000000 --- a/docs/PatchedPlexSourceConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedPlexSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identifier** | **String** | | [optional] -**plexToken** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPlexSourceRequest.md b/docs/PatchedPlexSourceRequest.md deleted file mode 100644 index 5f2dd9c..0000000 --- a/docs/PatchedPlexSourceRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchedPlexSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | [optional] -**slug** | **String** | Internal source name, used in URLs. | [optional] -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**clientId** | **String** | Client identifier used to talk to Plex. | [optional] -**allowedServers** | **[String]** | Which servers a user has to be a member of to be granted access. Empty list allows every server. | [optional] -**allowFriends** | **Bool** | Allow friends to authenticate, even if you don't share a server. | [optional] -**plexToken** | **String** | Plex token used to check friends | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPolicyBindingRequest.md b/docs/PatchedPolicyBindingRequest.md deleted file mode 100644 index b04e76d..0000000 --- a/docs/PatchedPolicyBindingRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchedPolicyBindingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**policy** | **UUID** | | [optional] -**group** | **UUID** | | [optional] -**user** | **Int** | | [optional] -**target** | **UUID** | | [optional] -**negate** | **Bool** | Negates the outcome of the policy. Messages are unaffected. | [optional] -**enabled** | **Bool** | | [optional] -**order** | **Int** | | [optional] -**timeout** | **Int** | Timeout after which Policy execution is terminated. | [optional] -**failureResult** | **Bool** | Result if the Policy execution fails. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPromptRequest.md b/docs/PatchedPromptRequest.md deleted file mode 100644 index 10fe835..0000000 --- a/docs/PatchedPromptRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchedPromptRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**fieldKey** | **String** | Name of the form field, also used to store the value | [optional] -**label** | **String** | | [optional] -**type** | [**PromptTypeEnum**](PromptTypeEnum.md) | | [optional] -**_required** | **Bool** | | [optional] -**placeholder** | **String** | Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. | [optional] -**initialValue** | **String** | Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. | [optional] -**order** | **Int** | | [optional] -**promptstageSet** | [StageRequest] | | [optional] -**subText** | **String** | | [optional] -**placeholderExpression** | **Bool** | | [optional] -**initialValueExpression** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedPromptStageRequest.md b/docs/PatchedPromptStageRequest.md deleted file mode 100644 index 14fd926..0000000 --- a/docs/PatchedPromptStageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PatchedPromptStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**fields** | **[UUID]** | | [optional] -**validationPolicies** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedProxyProviderRequest.md b/docs/PatchedProxyProviderRequest.md deleted file mode 100644 index a96723d..0000000 --- a/docs/PatchedProxyProviderRequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# PatchedProxyProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**internalHost** | **String** | | [optional] -**externalHost** | **String** | | [optional] -**internalHostSslValidation** | **Bool** | Validate SSL Certificates of upstream servers | [optional] -**certificate** | **UUID** | | [optional] -**skipPathRegex** | **String** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] -**basicAuthEnabled** | **Bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] -**basicAuthPasswordAttribute** | **String** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] -**basicAuthUserAttribute** | **String** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**mode** | [**ProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] -**interceptHeaderAuth** | **Bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] -**cookieDomain** | **String** | | [optional] -**jwksSources** | **[UUID]** | | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedRadiusProviderRequest.md b/docs/PatchedRadiusProviderRequest.md deleted file mode 100644 index 2727786..0000000 --- a/docs/PatchedRadiusProviderRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedRadiusProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**clientNetworks** | **String** | List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. | [optional] -**sharedSecret** | **String** | Shared secret between clients and server to hash packets. | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedReputationPolicyRequest.md b/docs/PatchedReputationPolicyRequest.md deleted file mode 100644 index 7d1fce9..0000000 --- a/docs/PatchedReputationPolicyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedReputationPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**checkIp** | **Bool** | | [optional] -**checkUsername** | **Bool** | | [optional] -**threshold** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedRoleRequest.md b/docs/PatchedRoleRequest.md deleted file mode 100644 index d5f2194..0000000 --- a/docs/PatchedRoleRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedRoleRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSAMLPropertyMappingRequest.md b/docs/PatchedSAMLPropertyMappingRequest.md deleted file mode 100644 index 64052f7..0000000 --- a/docs/PatchedSAMLPropertyMappingRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedSAMLPropertyMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | [optional] -**expression** | **String** | | [optional] -**samlName** | **String** | | [optional] -**friendlyName** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSAMLProviderRequest.md b/docs/PatchedSAMLProviderRequest.md deleted file mode 100644 index 12368a4..0000000 --- a/docs/PatchedSAMLProviderRequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# PatchedSAMLProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**acsUrl** | **String** | | [optional] -**audience** | **String** | Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. | [optional] -**issuer** | **String** | Also known as EntityID | [optional] -**assertionValidNotBefore** | **String** | Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). | [optional] -**assertionValidNotOnOrAfter** | **String** | Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**sessionValidNotOnOrAfter** | **String** | Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**nameIdMapping** | **UUID** | Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**spBinding** | [**SpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] -**defaultRelayState** | **String** | Default relay_state value for IDP-initiated logins | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSAMLSourceRequest.md b/docs/PatchedSAMLSourceRequest.md deleted file mode 100644 index 41754b8..0000000 --- a/docs/PatchedSAMLSourceRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# PatchedSAMLSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | [optional] -**slug** | **String** | Internal source name, used in URLs. | [optional] -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**preAuthenticationFlow** | **UUID** | Flow used before authentication. | [optional] -**issuer** | **String** | Also known as Entity ID. Defaults the Metadata URL. | [optional] -**ssoUrl** | **String** | URL that the initial Login request is sent to. | [optional] -**sloUrl** | **String** | Optional URL if your IDP supports Single-Logout. | [optional] -**allowIdpInitiated** | **Bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**nameIdPolicy** | [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] -**bindingType** | [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Identity Provider. | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**temporaryUserDeleteAfter** | **String** | Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSCIMMappingRequest.md b/docs/PatchedSCIMMappingRequest.md deleted file mode 100644 index fcfa0fc..0000000 --- a/docs/PatchedSCIMMappingRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedSCIMMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | [optional] -**expression** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSCIMProviderRequest.md b/docs/PatchedSCIMProviderRequest.md deleted file mode 100644 index 453eba4..0000000 --- a/docs/PatchedSCIMProviderRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedSCIMProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] -**url** | **String** | Base URL to SCIM requests, usually ends in /v2 | [optional] -**token** | **String** | Authentication token | [optional] -**excludeUsersServiceAccount** | **Bool** | | [optional] -**filterGroup** | **UUID** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedSMSDeviceRequest.md b/docs/PatchedSMSDeviceRequest.md deleted file mode 100644 index 096c0f1..0000000 --- a/docs/PatchedSMSDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedSMSDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedScopeMappingRequest.md b/docs/PatchedScopeMappingRequest.md deleted file mode 100644 index c61825c..0000000 --- a/docs/PatchedScopeMappingRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedScopeMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | [optional] -**expression** | **String** | | [optional] -**scopeName** | **String** | Scope name requested by the client | [optional] -**description** | **String** | Description shown to the user when consenting. If left empty, the user won't be informed. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedStaticDeviceRequest.md b/docs/PatchedStaticDeviceRequest.md deleted file mode 100644 index a45bd04..0000000 --- a/docs/PatchedStaticDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedStaticDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedTOTPDeviceRequest.md b/docs/PatchedTOTPDeviceRequest.md deleted file mode 100644 index d41a695..0000000 --- a/docs/PatchedTOTPDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedTOTPDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedTenantRequest.md b/docs/PatchedTenantRequest.md deleted file mode 100644 index 39c2d21..0000000 --- a/docs/PatchedTenantRequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# PatchedTenantRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain** | **String** | Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` | [optional] -**_default** | **Bool** | | [optional] -**brandingTitle** | **String** | | [optional] -**brandingLogo** | **String** | | [optional] -**brandingFavicon** | **String** | | [optional] -**flowAuthentication** | **UUID** | | [optional] -**flowInvalidation** | **UUID** | | [optional] -**flowRecovery** | **UUID** | | [optional] -**flowUnenrollment** | **UUID** | | [optional] -**flowUserSettings** | **UUID** | | [optional] -**flowDeviceCode** | **UUID** | | [optional] -**eventRetention** | **String** | Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). | [optional] -**webCertificate** | **UUID** | Web Certificate used by the authentik Core webserver. | [optional] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedTokenRequest.md b/docs/PatchedTokenRequest.md deleted file mode 100644 index 76bc26e..0000000 --- a/docs/PatchedTokenRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedTokenRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**identifier** | **String** | | [optional] -**intent** | [**IntentEnum**](IntentEnum.md) | | [optional] -**user** | **Int** | | [optional] -**description** | **String** | | [optional] -**expires** | **Date** | | [optional] -**expiring** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserDeleteStageRequest.md b/docs/PatchedUserDeleteStageRequest.md deleted file mode 100644 index 7cd23e4..0000000 --- a/docs/PatchedUserDeleteStageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedUserDeleteStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserLoginStageRequest.md b/docs/PatchedUserLoginStageRequest.md deleted file mode 100644 index c84a09f..0000000 --- a/docs/PatchedUserLoginStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchedUserLoginStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**sessionDuration** | **String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] -**terminateOtherSessions** | **Bool** | Terminate all other sessions of the user logging in. | [optional] -**rememberMeOffset** | **String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserLogoutStageRequest.md b/docs/PatchedUserLogoutStageRequest.md deleted file mode 100644 index 590615d..0000000 --- a/docs/PatchedUserLogoutStageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedUserLogoutStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserOAuthSourceConnectionRequest.md b/docs/PatchedUserOAuthSourceConnectionRequest.md deleted file mode 100644 index c5d784f..0000000 --- a/docs/PatchedUserOAuthSourceConnectionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PatchedUserOAuthSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **Int** | | [optional] -**identifier** | **String** | | [optional] -**accessToken** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserRequest.md b/docs/PatchedUserRequest.md deleted file mode 100644 index 2bccc8c..0000000 --- a/docs/PatchedUserRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchedUserRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **String** | | [optional] -**name** | **String** | User's display name. | [optional] -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**groups** | **[UUID]** | | [optional] -**email** | **String** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**path** | **String** | | [optional] -**type** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserSAMLSourceConnectionRequest.md b/docs/PatchedUserSAMLSourceConnectionRequest.md deleted file mode 100644 index 89a35be..0000000 --- a/docs/PatchedUserSAMLSourceConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchedUserSAMLSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **Int** | | [optional] -**identifier** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedUserWriteStageRequest.md b/docs/PatchedUserWriteStageRequest.md deleted file mode 100644 index f536159..0000000 --- a/docs/PatchedUserWriteStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchedUserWriteStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**flowSet** | [FlowSetRequest] | | [optional] -**userCreationMode** | [**UserCreationModeEnum**](UserCreationModeEnum.md) | | [optional] -**createUsersAsInactive** | **Bool** | When set, newly created users are inactive and cannot login. | [optional] -**createUsersGroup** | **UUID** | Optionally add newly created users to this group. | [optional] -**userType** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] -**userPathTemplate** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchedWebAuthnDeviceRequest.md b/docs/PatchedWebAuthnDeviceRequest.md deleted file mode 100644 index c02a5ea..0000000 --- a/docs/PatchedWebAuthnDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PatchedWebAuthnDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Permission.md b/docs/Permission.md deleted file mode 100644 index 8121ab3..0000000 --- a/docs/Permission.md +++ /dev/null @@ -1,16 +0,0 @@ -# Permission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int** | | [readonly] -**name** | **String** | | -**codename** | **String** | | -**model** | **String** | | [readonly] -**appLabel** | **String** | | [readonly] -**appLabelVerbose** | **String** | Human-readable app label | [readonly] -**modelVerbose** | **String** | Human-readable model name | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PermissionAssignRequest.md b/docs/PermissionAssignRequest.md deleted file mode 100644 index da93c13..0000000 --- a/docs/PermissionAssignRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PermissionAssignRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permissions** | **[String]** | | -**model** | [**ModelEnum**](ModelEnum.md) | | [optional] -**objectPk** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexAuthenticationChallenge.md b/docs/PlexAuthenticationChallenge.md deleted file mode 100644 index dfd5275..0000000 --- a/docs/PlexAuthenticationChallenge.md +++ /dev/null @@ -1,15 +0,0 @@ -# PlexAuthenticationChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-source-plex"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**clientId** | **String** | | -**slug** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexAuthenticationChallengeResponseRequest.md b/docs/PlexAuthenticationChallengeResponseRequest.md deleted file mode 100644 index 301b028..0000000 --- a/docs/PlexAuthenticationChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PlexAuthenticationChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-source-plex"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexSource.md b/docs/PlexSource.md deleted file mode 100644 index 1425635..0000000 --- a/docs/PlexSource.md +++ /dev/null @@ -1,28 +0,0 @@ -# PlexSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**userPathTemplate** | **String** | | [optional] -**icon** | **String** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] -**clientId** | **String** | Client identifier used to talk to Plex. | [optional] -**allowedServers** | **[String]** | Which servers a user has to be a member of to be granted access. Empty list allows every server. | [optional] -**allowFriends** | **Bool** | Allow friends to authenticate, even if you don't share a server. | [optional] -**plexToken** | **String** | Plex token used to check friends | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexSourceConnection.md b/docs/PlexSourceConnection.md deleted file mode 100644 index 64f437c..0000000 --- a/docs/PlexSourceConnection.md +++ /dev/null @@ -1,14 +0,0 @@ -# PlexSourceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**user** | **Int** | | [readonly] -**source** | [**Source**](Source.md) | | [readonly] -**identifier** | **String** | | -**plexToken** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexSourceConnectionRequest.md b/docs/PlexSourceConnectionRequest.md deleted file mode 100644 index 48f7e0e..0000000 --- a/docs/PlexSourceConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlexSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identifier** | **String** | | -**plexToken** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexSourceRequest.md b/docs/PlexSourceRequest.md deleted file mode 100644 index 786038e..0000000 --- a/docs/PlexSourceRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PlexSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**clientId** | **String** | Client identifier used to talk to Plex. | [optional] -**allowedServers** | **[String]** | Which servers a user has to be a member of to be granted access. Empty list allows every server. | [optional] -**allowFriends** | **Bool** | Allow friends to authenticate, even if you don't share a server. | [optional] -**plexToken** | **String** | Plex token used to check friends | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexTokenRedeemRequest.md b/docs/PlexTokenRedeemRequest.md deleted file mode 100644 index b1dbb38..0000000 --- a/docs/PlexTokenRedeemRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PlexTokenRedeemRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plexToken** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PoliciesAPI.md b/docs/PoliciesAPI.md deleted file mode 100644 index b4388ab..0000000 --- a/docs/PoliciesAPI.md +++ /dev/null @@ -1,3266 +0,0 @@ -# PoliciesAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**policiesAllCacheClearCreate**](PoliciesAPI.md#policiesallcacheclearcreate) | **POST** /policies/all/cache_clear/ | -[**policiesAllCacheInfoRetrieve**](PoliciesAPI.md#policiesallcacheinforetrieve) | **GET** /policies/all/cache_info/ | -[**policiesAllDestroy**](PoliciesAPI.md#policiesalldestroy) | **DELETE** /policies/all/{policy_uuid}/ | -[**policiesAllList**](PoliciesAPI.md#policiesalllist) | **GET** /policies/all/ | -[**policiesAllRetrieve**](PoliciesAPI.md#policiesallretrieve) | **GET** /policies/all/{policy_uuid}/ | -[**policiesAllTestCreate**](PoliciesAPI.md#policiesalltestcreate) | **POST** /policies/all/{policy_uuid}/test/ | -[**policiesAllTypesList**](PoliciesAPI.md#policiesalltypeslist) | **GET** /policies/all/types/ | -[**policiesAllUsedByList**](PoliciesAPI.md#policiesallusedbylist) | **GET** /policies/all/{policy_uuid}/used_by/ | -[**policiesBindingsCreate**](PoliciesAPI.md#policiesbindingscreate) | **POST** /policies/bindings/ | -[**policiesBindingsDestroy**](PoliciesAPI.md#policiesbindingsdestroy) | **DELETE** /policies/bindings/{policy_binding_uuid}/ | -[**policiesBindingsList**](PoliciesAPI.md#policiesbindingslist) | **GET** /policies/bindings/ | -[**policiesBindingsPartialUpdate**](PoliciesAPI.md#policiesbindingspartialupdate) | **PATCH** /policies/bindings/{policy_binding_uuid}/ | -[**policiesBindingsRetrieve**](PoliciesAPI.md#policiesbindingsretrieve) | **GET** /policies/bindings/{policy_binding_uuid}/ | -[**policiesBindingsUpdate**](PoliciesAPI.md#policiesbindingsupdate) | **PUT** /policies/bindings/{policy_binding_uuid}/ | -[**policiesBindingsUsedByList**](PoliciesAPI.md#policiesbindingsusedbylist) | **GET** /policies/bindings/{policy_binding_uuid}/used_by/ | -[**policiesDummyCreate**](PoliciesAPI.md#policiesdummycreate) | **POST** /policies/dummy/ | -[**policiesDummyDestroy**](PoliciesAPI.md#policiesdummydestroy) | **DELETE** /policies/dummy/{policy_uuid}/ | -[**policiesDummyList**](PoliciesAPI.md#policiesdummylist) | **GET** /policies/dummy/ | -[**policiesDummyPartialUpdate**](PoliciesAPI.md#policiesdummypartialupdate) | **PATCH** /policies/dummy/{policy_uuid}/ | -[**policiesDummyRetrieve**](PoliciesAPI.md#policiesdummyretrieve) | **GET** /policies/dummy/{policy_uuid}/ | -[**policiesDummyUpdate**](PoliciesAPI.md#policiesdummyupdate) | **PUT** /policies/dummy/{policy_uuid}/ | -[**policiesDummyUsedByList**](PoliciesAPI.md#policiesdummyusedbylist) | **GET** /policies/dummy/{policy_uuid}/used_by/ | -[**policiesEventMatcherCreate**](PoliciesAPI.md#policieseventmatchercreate) | **POST** /policies/event_matcher/ | -[**policiesEventMatcherDestroy**](PoliciesAPI.md#policieseventmatcherdestroy) | **DELETE** /policies/event_matcher/{policy_uuid}/ | -[**policiesEventMatcherList**](PoliciesAPI.md#policieseventmatcherlist) | **GET** /policies/event_matcher/ | -[**policiesEventMatcherPartialUpdate**](PoliciesAPI.md#policieseventmatcherpartialupdate) | **PATCH** /policies/event_matcher/{policy_uuid}/ | -[**policiesEventMatcherRetrieve**](PoliciesAPI.md#policieseventmatcherretrieve) | **GET** /policies/event_matcher/{policy_uuid}/ | -[**policiesEventMatcherUpdate**](PoliciesAPI.md#policieseventmatcherupdate) | **PUT** /policies/event_matcher/{policy_uuid}/ | -[**policiesEventMatcherUsedByList**](PoliciesAPI.md#policieseventmatcherusedbylist) | **GET** /policies/event_matcher/{policy_uuid}/used_by/ | -[**policiesExpressionCreate**](PoliciesAPI.md#policiesexpressioncreate) | **POST** /policies/expression/ | -[**policiesExpressionDestroy**](PoliciesAPI.md#policiesexpressiondestroy) | **DELETE** /policies/expression/{policy_uuid}/ | -[**policiesExpressionList**](PoliciesAPI.md#policiesexpressionlist) | **GET** /policies/expression/ | -[**policiesExpressionPartialUpdate**](PoliciesAPI.md#policiesexpressionpartialupdate) | **PATCH** /policies/expression/{policy_uuid}/ | -[**policiesExpressionRetrieve**](PoliciesAPI.md#policiesexpressionretrieve) | **GET** /policies/expression/{policy_uuid}/ | -[**policiesExpressionUpdate**](PoliciesAPI.md#policiesexpressionupdate) | **PUT** /policies/expression/{policy_uuid}/ | -[**policiesExpressionUsedByList**](PoliciesAPI.md#policiesexpressionusedbylist) | **GET** /policies/expression/{policy_uuid}/used_by/ | -[**policiesPasswordCreate**](PoliciesAPI.md#policiespasswordcreate) | **POST** /policies/password/ | -[**policiesPasswordDestroy**](PoliciesAPI.md#policiespassworddestroy) | **DELETE** /policies/password/{policy_uuid}/ | -[**policiesPasswordExpiryCreate**](PoliciesAPI.md#policiespasswordexpirycreate) | **POST** /policies/password_expiry/ | -[**policiesPasswordExpiryDestroy**](PoliciesAPI.md#policiespasswordexpirydestroy) | **DELETE** /policies/password_expiry/{policy_uuid}/ | -[**policiesPasswordExpiryList**](PoliciesAPI.md#policiespasswordexpirylist) | **GET** /policies/password_expiry/ | -[**policiesPasswordExpiryPartialUpdate**](PoliciesAPI.md#policiespasswordexpirypartialupdate) | **PATCH** /policies/password_expiry/{policy_uuid}/ | -[**policiesPasswordExpiryRetrieve**](PoliciesAPI.md#policiespasswordexpiryretrieve) | **GET** /policies/password_expiry/{policy_uuid}/ | -[**policiesPasswordExpiryUpdate**](PoliciesAPI.md#policiespasswordexpiryupdate) | **PUT** /policies/password_expiry/{policy_uuid}/ | -[**policiesPasswordExpiryUsedByList**](PoliciesAPI.md#policiespasswordexpiryusedbylist) | **GET** /policies/password_expiry/{policy_uuid}/used_by/ | -[**policiesPasswordList**](PoliciesAPI.md#policiespasswordlist) | **GET** /policies/password/ | -[**policiesPasswordPartialUpdate**](PoliciesAPI.md#policiespasswordpartialupdate) | **PATCH** /policies/password/{policy_uuid}/ | -[**policiesPasswordRetrieve**](PoliciesAPI.md#policiespasswordretrieve) | **GET** /policies/password/{policy_uuid}/ | -[**policiesPasswordUpdate**](PoliciesAPI.md#policiespasswordupdate) | **PUT** /policies/password/{policy_uuid}/ | -[**policiesPasswordUsedByList**](PoliciesAPI.md#policiespasswordusedbylist) | **GET** /policies/password/{policy_uuid}/used_by/ | -[**policiesReputationCreate**](PoliciesAPI.md#policiesreputationcreate) | **POST** /policies/reputation/ | -[**policiesReputationDestroy**](PoliciesAPI.md#policiesreputationdestroy) | **DELETE** /policies/reputation/{policy_uuid}/ | -[**policiesReputationList**](PoliciesAPI.md#policiesreputationlist) | **GET** /policies/reputation/ | -[**policiesReputationPartialUpdate**](PoliciesAPI.md#policiesreputationpartialupdate) | **PATCH** /policies/reputation/{policy_uuid}/ | -[**policiesReputationRetrieve**](PoliciesAPI.md#policiesreputationretrieve) | **GET** /policies/reputation/{policy_uuid}/ | -[**policiesReputationScoresDestroy**](PoliciesAPI.md#policiesreputationscoresdestroy) | **DELETE** /policies/reputation/scores/{reputation_uuid}/ | -[**policiesReputationScoresList**](PoliciesAPI.md#policiesreputationscoreslist) | **GET** /policies/reputation/scores/ | -[**policiesReputationScoresRetrieve**](PoliciesAPI.md#policiesreputationscoresretrieve) | **GET** /policies/reputation/scores/{reputation_uuid}/ | -[**policiesReputationScoresUsedByList**](PoliciesAPI.md#policiesreputationscoresusedbylist) | **GET** /policies/reputation/scores/{reputation_uuid}/used_by/ | -[**policiesReputationUpdate**](PoliciesAPI.md#policiesreputationupdate) | **PUT** /policies/reputation/{policy_uuid}/ | -[**policiesReputationUsedByList**](PoliciesAPI.md#policiesreputationusedbylist) | **GET** /policies/reputation/{policy_uuid}/used_by/ | - - -# **policiesAllCacheClearCreate** -```swift - open class func policiesAllCacheClearCreate(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Clear policy cache - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -PoliciesAPI.policiesAllCacheClearCreate() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllCacheInfoRetrieve** -```swift - open class func policiesAllCacheInfoRetrieve(completion: @escaping (_ data: Cache?, _ error: Error?) -> Void) -``` - - - -Info about cached policies - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -PoliciesAPI.policiesAllCacheInfoRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Cache**](Cache.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllDestroy** -```swift - open class func policiesAllDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Policy. - -PoliciesAPI.policiesAllDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllList** -```swift - open class func policiesAllList(bindingsIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, promptstageIsnull: Bool? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedPolicyList?, _ error: Error?) -> Void) -``` - - - -Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let bindingsIsnull = true // Bool | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let promptstageIsnull = true // Bool | (optional) -let search = "search_example" // String | A search term. (optional) - -PoliciesAPI.policiesAllList(bindingsIsnull: bindingsIsnull, ordering: ordering, page: page, pageSize: pageSize, promptstageIsnull: promptstageIsnull, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bindingsIsnull** | **Bool** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **promptstageIsnull** | **Bool** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedPolicyList**](PaginatedPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllRetrieve** -```swift - open class func policiesAllRetrieve(policyUuid: UUID, completion: @escaping (_ data: Policy?, _ error: Error?) -> Void) -``` - - - -Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Policy. - -PoliciesAPI.policiesAllRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Policy. | - -### Return type - -[**Policy**](Policy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllTestCreate** -```swift - open class func policiesAllTestCreate(policyUuid: UUID, policyTestRequest: PolicyTestRequest, completion: @escaping (_ data: PolicyTestResult?, _ error: Error?) -> Void) -``` - - - -Test policy - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Policy. -let policyTestRequest = PolicyTestRequest(user: 123, context: "TODO") // PolicyTestRequest | - -PoliciesAPI.policiesAllTestCreate(policyUuid: policyUuid, policyTestRequest: policyTestRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Policy. | - **policyTestRequest** | [**PolicyTestRequest**](PolicyTestRequest.md) | | - -### Return type - -[**PolicyTestResult**](PolicyTestResult.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllTypesList** -```swift - open class func policiesAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable policy types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -PoliciesAPI.policiesAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesAllUsedByList** -```swift - open class func policiesAllUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Policy. - -PoliciesAPI.policiesAllUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsCreate** -```swift - open class func policiesBindingsCreate(policyBindingRequest: PolicyBindingRequest, completion: @escaping (_ data: PolicyBinding?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingRequest = PolicyBindingRequest(policy: 123, group: 123, user: 123, target: 123, negate: false, enabled: false, order: 123, timeout: 123, failureResult: false) // PolicyBindingRequest | - -PoliciesAPI.policiesBindingsCreate(policyBindingRequest: policyBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingRequest** | [**PolicyBindingRequest**](PolicyBindingRequest.md) | | - -### Return type - -[**PolicyBinding**](PolicyBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsDestroy** -```swift - open class func policiesBindingsDestroy(policyBindingUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingUuid = 987 // UUID | A UUID string identifying this Policy Binding. - -PoliciesAPI.policiesBindingsDestroy(policyBindingUuid: policyBindingUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingUuid** | **UUID** | A UUID string identifying this Policy Binding. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsList** -```swift - open class func policiesBindingsList(enabled: Bool? = nil, order: Int? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policy: UUID? = nil, policyIsnull: Bool? = nil, search: String? = nil, target: UUID? = nil, targetIn: [UUID]? = nil, timeout: Int? = nil, completion: @escaping (_ data: PaginatedPolicyBindingList?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let enabled = true // Bool | (optional) -let order = 987 // Int | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policy = 987 // UUID | (optional) -let policyIsnull = true // Bool | (optional) -let search = "search_example" // String | A search term. (optional) -let target = 987 // UUID | (optional) -let targetIn = [123] // [UUID] | (optional) -let timeout = 987 // Int | (optional) - -PoliciesAPI.policiesBindingsList(enabled: enabled, order: order, ordering: ordering, page: page, pageSize: pageSize, policy: policy, policyIsnull: policyIsnull, search: search, target: target, targetIn: targetIn, timeout: timeout) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enabled** | **Bool** | | [optional] - **order** | **Int** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policy** | **UUID** | | [optional] - **policyIsnull** | **Bool** | | [optional] - **search** | **String** | A search term. | [optional] - **target** | **UUID** | | [optional] - **targetIn** | [**[UUID]**](UUID.md) | | [optional] - **timeout** | **Int** | | [optional] - -### Return type - -[**PaginatedPolicyBindingList**](PaginatedPolicyBindingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsPartialUpdate** -```swift - open class func policiesBindingsPartialUpdate(policyBindingUuid: UUID, patchedPolicyBindingRequest: PatchedPolicyBindingRequest? = nil, completion: @escaping (_ data: PolicyBinding?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingUuid = 987 // UUID | A UUID string identifying this Policy Binding. -let patchedPolicyBindingRequest = PatchedPolicyBindingRequest(policy: 123, group: 123, user: 123, target: 123, negate: false, enabled: false, order: 123, timeout: 123, failureResult: false) // PatchedPolicyBindingRequest | (optional) - -PoliciesAPI.policiesBindingsPartialUpdate(policyBindingUuid: policyBindingUuid, patchedPolicyBindingRequest: patchedPolicyBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingUuid** | **UUID** | A UUID string identifying this Policy Binding. | - **patchedPolicyBindingRequest** | [**PatchedPolicyBindingRequest**](PatchedPolicyBindingRequest.md) | | [optional] - -### Return type - -[**PolicyBinding**](PolicyBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsRetrieve** -```swift - open class func policiesBindingsRetrieve(policyBindingUuid: UUID, completion: @escaping (_ data: PolicyBinding?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingUuid = 987 // UUID | A UUID string identifying this Policy Binding. - -PoliciesAPI.policiesBindingsRetrieve(policyBindingUuid: policyBindingUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingUuid** | **UUID** | A UUID string identifying this Policy Binding. | - -### Return type - -[**PolicyBinding**](PolicyBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsUpdate** -```swift - open class func policiesBindingsUpdate(policyBindingUuid: UUID, policyBindingRequest: PolicyBindingRequest, completion: @escaping (_ data: PolicyBinding?, _ error: Error?) -> Void) -``` - - - -PolicyBinding Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingUuid = 987 // UUID | A UUID string identifying this Policy Binding. -let policyBindingRequest = PolicyBindingRequest(policy: 123, group: 123, user: 123, target: 123, negate: false, enabled: false, order: 123, timeout: 123, failureResult: false) // PolicyBindingRequest | - -PoliciesAPI.policiesBindingsUpdate(policyBindingUuid: policyBindingUuid, policyBindingRequest: policyBindingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingUuid** | **UUID** | A UUID string identifying this Policy Binding. | - **policyBindingRequest** | [**PolicyBindingRequest**](PolicyBindingRequest.md) | | - -### Return type - -[**PolicyBinding**](PolicyBinding.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesBindingsUsedByList** -```swift - open class func policiesBindingsUsedByList(policyBindingUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyBindingUuid = 987 // UUID | A UUID string identifying this Policy Binding. - -PoliciesAPI.policiesBindingsUsedByList(policyBindingUuid: policyBindingUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyBindingUuid** | **UUID** | A UUID string identifying this Policy Binding. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyCreate** -```swift - open class func policiesDummyCreate(dummyPolicyRequest: DummyPolicyRequest, completion: @escaping (_ data: DummyPolicy?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let dummyPolicyRequest = DummyPolicyRequest(name: "name_example", executionLogging: false, result: false, waitMin: 123, waitMax: 123) // DummyPolicyRequest | - -PoliciesAPI.policiesDummyCreate(dummyPolicyRequest: dummyPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dummyPolicyRequest** | [**DummyPolicyRequest**](DummyPolicyRequest.md) | | - -### Return type - -[**DummyPolicy**](DummyPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyDestroy** -```swift - open class func policiesDummyDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Dummy Policy. - -PoliciesAPI.policiesDummyDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Dummy Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyList** -```swift - open class func policiesDummyList(created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, result: Bool? = nil, search: String? = nil, waitMax: Int? = nil, waitMin: Int? = nil, completion: @escaping (_ data: PaginatedDummyPolicyList?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let created = Date() // Date | (optional) -let executionLogging = true // Bool | (optional) -let lastUpdated = Date() // Date | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyUuid = 987 // UUID | (optional) -let result = true // Bool | (optional) -let search = "search_example" // String | A search term. (optional) -let waitMax = 987 // Int | (optional) -let waitMin = 987 // Int | (optional) - -PoliciesAPI.policiesDummyList(created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, result: result, search: search, waitMax: waitMax, waitMin: waitMin) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **created** | **Date** | | [optional] - **executionLogging** | **Bool** | | [optional] - **lastUpdated** | **Date** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyUuid** | **UUID** | | [optional] - **result** | **Bool** | | [optional] - **search** | **String** | A search term. | [optional] - **waitMax** | **Int** | | [optional] - **waitMin** | **Int** | | [optional] - -### Return type - -[**PaginatedDummyPolicyList**](PaginatedDummyPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyPartialUpdate** -```swift - open class func policiesDummyPartialUpdate(policyUuid: UUID, patchedDummyPolicyRequest: PatchedDummyPolicyRequest? = nil, completion: @escaping (_ data: DummyPolicy?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Dummy Policy. -let patchedDummyPolicyRequest = PatchedDummyPolicyRequest(name: "name_example", executionLogging: false, result: false, waitMin: 123, waitMax: 123) // PatchedDummyPolicyRequest | (optional) - -PoliciesAPI.policiesDummyPartialUpdate(policyUuid: policyUuid, patchedDummyPolicyRequest: patchedDummyPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Dummy Policy. | - **patchedDummyPolicyRequest** | [**PatchedDummyPolicyRequest**](PatchedDummyPolicyRequest.md) | | [optional] - -### Return type - -[**DummyPolicy**](DummyPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyRetrieve** -```swift - open class func policiesDummyRetrieve(policyUuid: UUID, completion: @escaping (_ data: DummyPolicy?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Dummy Policy. - -PoliciesAPI.policiesDummyRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Dummy Policy. | - -### Return type - -[**DummyPolicy**](DummyPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyUpdate** -```swift - open class func policiesDummyUpdate(policyUuid: UUID, dummyPolicyRequest: DummyPolicyRequest, completion: @escaping (_ data: DummyPolicy?, _ error: Error?) -> Void) -``` - - - -Dummy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Dummy Policy. -let dummyPolicyRequest = DummyPolicyRequest(name: "name_example", executionLogging: false, result: false, waitMin: 123, waitMax: 123) // DummyPolicyRequest | - -PoliciesAPI.policiesDummyUpdate(policyUuid: policyUuid, dummyPolicyRequest: dummyPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Dummy Policy. | - **dummyPolicyRequest** | [**DummyPolicyRequest**](DummyPolicyRequest.md) | | - -### Return type - -[**DummyPolicy**](DummyPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesDummyUsedByList** -```swift - open class func policiesDummyUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Dummy Policy. - -PoliciesAPI.policiesDummyUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Dummy Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherCreate** -```swift - open class func policiesEventMatcherCreate(eventMatcherPolicyRequest: EventMatcherPolicyRequest, completion: @escaping (_ data: EventMatcherPolicy?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let eventMatcherPolicyRequest = EventMatcherPolicyRequest(name: "name_example", executionLogging: false, action: EventActions(), clientIp: "clientIp_example", app: AppEnum(), model: ModelEnum()) // EventMatcherPolicyRequest | - -PoliciesAPI.policiesEventMatcherCreate(eventMatcherPolicyRequest: eventMatcherPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventMatcherPolicyRequest** | [**EventMatcherPolicyRequest**](EventMatcherPolicyRequest.md) | | - -### Return type - -[**EventMatcherPolicy**](EventMatcherPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherDestroy** -```swift - open class func policiesEventMatcherDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Event Matcher Policy. - -PoliciesAPI.policiesEventMatcherDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Event Matcher Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherList** -```swift - open class func policiesEventMatcherList(action: Action_policiesEventMatcherList? = nil, app: String? = nil, clientIp: String? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, model: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedEventMatcherPolicyList?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let action = "action_example" // String | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix (optional) -let app = "app_example" // String | (optional) -let clientIp = "clientIp_example" // String | (optional) -let created = Date() // Date | (optional) -let executionLogging = true // Bool | (optional) -let lastUpdated = Date() // Date | (optional) -let model = "model_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) - -PoliciesAPI.policiesEventMatcherList(action: action, app: app, clientIp: clientIp, created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, model: model, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **action** | **String** | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] - **app** | **String** | | [optional] - **clientIp** | **String** | | [optional] - **created** | **Date** | | [optional] - **executionLogging** | **Bool** | | [optional] - **lastUpdated** | **Date** | | [optional] - **model** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedEventMatcherPolicyList**](PaginatedEventMatcherPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherPartialUpdate** -```swift - open class func policiesEventMatcherPartialUpdate(policyUuid: UUID, patchedEventMatcherPolicyRequest: PatchedEventMatcherPolicyRequest? = nil, completion: @escaping (_ data: EventMatcherPolicy?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Event Matcher Policy. -let patchedEventMatcherPolicyRequest = PatchedEventMatcherPolicyRequest(name: "name_example", executionLogging: false, action: EventActions(), clientIp: "clientIp_example", app: AppEnum(), model: ModelEnum()) // PatchedEventMatcherPolicyRequest | (optional) - -PoliciesAPI.policiesEventMatcherPartialUpdate(policyUuid: policyUuid, patchedEventMatcherPolicyRequest: patchedEventMatcherPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Event Matcher Policy. | - **patchedEventMatcherPolicyRequest** | [**PatchedEventMatcherPolicyRequest**](PatchedEventMatcherPolicyRequest.md) | | [optional] - -### Return type - -[**EventMatcherPolicy**](EventMatcherPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherRetrieve** -```swift - open class func policiesEventMatcherRetrieve(policyUuid: UUID, completion: @escaping (_ data: EventMatcherPolicy?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Event Matcher Policy. - -PoliciesAPI.policiesEventMatcherRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Event Matcher Policy. | - -### Return type - -[**EventMatcherPolicy**](EventMatcherPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherUpdate** -```swift - open class func policiesEventMatcherUpdate(policyUuid: UUID, eventMatcherPolicyRequest: EventMatcherPolicyRequest, completion: @escaping (_ data: EventMatcherPolicy?, _ error: Error?) -> Void) -``` - - - -Event Matcher Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Event Matcher Policy. -let eventMatcherPolicyRequest = EventMatcherPolicyRequest(name: "name_example", executionLogging: false, action: EventActions(), clientIp: "clientIp_example", app: AppEnum(), model: ModelEnum()) // EventMatcherPolicyRequest | - -PoliciesAPI.policiesEventMatcherUpdate(policyUuid: policyUuid, eventMatcherPolicyRequest: eventMatcherPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Event Matcher Policy. | - **eventMatcherPolicyRequest** | [**EventMatcherPolicyRequest**](EventMatcherPolicyRequest.md) | | - -### Return type - -[**EventMatcherPolicy**](EventMatcherPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesEventMatcherUsedByList** -```swift - open class func policiesEventMatcherUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Event Matcher Policy. - -PoliciesAPI.policiesEventMatcherUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Event Matcher Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionCreate** -```swift - open class func policiesExpressionCreate(expressionPolicyRequest: ExpressionPolicyRequest, completion: @escaping (_ data: ExpressionPolicy?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let expressionPolicyRequest = ExpressionPolicyRequest(name: "name_example", executionLogging: false, expression: "expression_example") // ExpressionPolicyRequest | - -PoliciesAPI.policiesExpressionCreate(expressionPolicyRequest: expressionPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **expressionPolicyRequest** | [**ExpressionPolicyRequest**](ExpressionPolicyRequest.md) | | - -### Return type - -[**ExpressionPolicy**](ExpressionPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionDestroy** -```swift - open class func policiesExpressionDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Expression Policy. - -PoliciesAPI.policiesExpressionDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Expression Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionList** -```swift - open class func policiesExpressionList(created: Date? = nil, executionLogging: Bool? = nil, expression: String? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedExpressionPolicyList?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let created = Date() // Date | (optional) -let executionLogging = true // Bool | (optional) -let expression = "expression_example" // String | (optional) -let lastUpdated = Date() // Date | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) - -PoliciesAPI.policiesExpressionList(created: created, executionLogging: executionLogging, expression: expression, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **created** | **Date** | | [optional] - **executionLogging** | **Bool** | | [optional] - **expression** | **String** | | [optional] - **lastUpdated** | **Date** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedExpressionPolicyList**](PaginatedExpressionPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionPartialUpdate** -```swift - open class func policiesExpressionPartialUpdate(policyUuid: UUID, patchedExpressionPolicyRequest: PatchedExpressionPolicyRequest? = nil, completion: @escaping (_ data: ExpressionPolicy?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Expression Policy. -let patchedExpressionPolicyRequest = PatchedExpressionPolicyRequest(name: "name_example", executionLogging: false, expression: "expression_example") // PatchedExpressionPolicyRequest | (optional) - -PoliciesAPI.policiesExpressionPartialUpdate(policyUuid: policyUuid, patchedExpressionPolicyRequest: patchedExpressionPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Expression Policy. | - **patchedExpressionPolicyRequest** | [**PatchedExpressionPolicyRequest**](PatchedExpressionPolicyRequest.md) | | [optional] - -### Return type - -[**ExpressionPolicy**](ExpressionPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionRetrieve** -```swift - open class func policiesExpressionRetrieve(policyUuid: UUID, completion: @escaping (_ data: ExpressionPolicy?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Expression Policy. - -PoliciesAPI.policiesExpressionRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Expression Policy. | - -### Return type - -[**ExpressionPolicy**](ExpressionPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionUpdate** -```swift - open class func policiesExpressionUpdate(policyUuid: UUID, expressionPolicyRequest: ExpressionPolicyRequest, completion: @escaping (_ data: ExpressionPolicy?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Expression Policy. -let expressionPolicyRequest = ExpressionPolicyRequest(name: "name_example", executionLogging: false, expression: "expression_example") // ExpressionPolicyRequest | - -PoliciesAPI.policiesExpressionUpdate(policyUuid: policyUuid, expressionPolicyRequest: expressionPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Expression Policy. | - **expressionPolicyRequest** | [**ExpressionPolicyRequest**](ExpressionPolicyRequest.md) | | - -### Return type - -[**ExpressionPolicy**](ExpressionPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesExpressionUsedByList** -```swift - open class func policiesExpressionUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Expression Policy. - -PoliciesAPI.policiesExpressionUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Expression Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordCreate** -```swift - open class func policiesPasswordCreate(passwordPolicyRequest: PasswordPolicyRequest, completion: @escaping (_ data: PasswordPolicy?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let passwordPolicyRequest = PasswordPolicyRequest(name: "name_example", executionLogging: false, passwordField: "passwordField_example", amountDigits: 123, amountUppercase: 123, amountLowercase: 123, amountSymbols: 123, lengthMin: 123, symbolCharset: "symbolCharset_example", errorMessage: "errorMessage_example", checkStaticRules: false, checkHaveIBeenPwned: false, checkZxcvbn: false, hibpAllowedCount: 123, zxcvbnScoreThreshold: 123) // PasswordPolicyRequest | - -PoliciesAPI.policiesPasswordCreate(passwordPolicyRequest: passwordPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **passwordPolicyRequest** | [**PasswordPolicyRequest**](PasswordPolicyRequest.md) | | - -### Return type - -[**PasswordPolicy**](PasswordPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordDestroy** -```swift - open class func policiesPasswordDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Policy. - -PoliciesAPI.policiesPasswordDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryCreate** -```swift - open class func policiesPasswordExpiryCreate(passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest, completion: @escaping (_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let passwordExpiryPolicyRequest = PasswordExpiryPolicyRequest(name: "name_example", executionLogging: false, days: 123, denyOnly: false) // PasswordExpiryPolicyRequest | - -PoliciesAPI.policiesPasswordExpiryCreate(passwordExpiryPolicyRequest: passwordExpiryPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **passwordExpiryPolicyRequest** | [**PasswordExpiryPolicyRequest**](PasswordExpiryPolicyRequest.md) | | - -### Return type - -[**PasswordExpiryPolicy**](PasswordExpiryPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryDestroy** -```swift - open class func policiesPasswordExpiryDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Expiry Policy. - -PoliciesAPI.policiesPasswordExpiryDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Expiry Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryList** -```swift - open class func policiesPasswordExpiryList(created: Date? = nil, days: Int? = nil, denyOnly: Bool? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedPasswordExpiryPolicyList?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let created = Date() // Date | (optional) -let days = 987 // Int | (optional) -let denyOnly = true // Bool | (optional) -let executionLogging = true // Bool | (optional) -let lastUpdated = Date() // Date | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) - -PoliciesAPI.policiesPasswordExpiryList(created: created, days: days, denyOnly: denyOnly, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **created** | **Date** | | [optional] - **days** | **Int** | | [optional] - **denyOnly** | **Bool** | | [optional] - **executionLogging** | **Bool** | | [optional] - **lastUpdated** | **Date** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedPasswordExpiryPolicyList**](PaginatedPasswordExpiryPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryPartialUpdate** -```swift - open class func policiesPasswordExpiryPartialUpdate(policyUuid: UUID, patchedPasswordExpiryPolicyRequest: PatchedPasswordExpiryPolicyRequest? = nil, completion: @escaping (_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Expiry Policy. -let patchedPasswordExpiryPolicyRequest = PatchedPasswordExpiryPolicyRequest(name: "name_example", executionLogging: false, days: 123, denyOnly: false) // PatchedPasswordExpiryPolicyRequest | (optional) - -PoliciesAPI.policiesPasswordExpiryPartialUpdate(policyUuid: policyUuid, patchedPasswordExpiryPolicyRequest: patchedPasswordExpiryPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Expiry Policy. | - **patchedPasswordExpiryPolicyRequest** | [**PatchedPasswordExpiryPolicyRequest**](PatchedPasswordExpiryPolicyRequest.md) | | [optional] - -### Return type - -[**PasswordExpiryPolicy**](PasswordExpiryPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryRetrieve** -```swift - open class func policiesPasswordExpiryRetrieve(policyUuid: UUID, completion: @escaping (_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Expiry Policy. - -PoliciesAPI.policiesPasswordExpiryRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Expiry Policy. | - -### Return type - -[**PasswordExpiryPolicy**](PasswordExpiryPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryUpdate** -```swift - open class func policiesPasswordExpiryUpdate(policyUuid: UUID, passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest, completion: @escaping (_ data: PasswordExpiryPolicy?, _ error: Error?) -> Void) -``` - - - -Password Expiry Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Expiry Policy. -let passwordExpiryPolicyRequest = PasswordExpiryPolicyRequest(name: "name_example", executionLogging: false, days: 123, denyOnly: false) // PasswordExpiryPolicyRequest | - -PoliciesAPI.policiesPasswordExpiryUpdate(policyUuid: policyUuid, passwordExpiryPolicyRequest: passwordExpiryPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Expiry Policy. | - **passwordExpiryPolicyRequest** | [**PasswordExpiryPolicyRequest**](PasswordExpiryPolicyRequest.md) | | - -### Return type - -[**PasswordExpiryPolicy**](PasswordExpiryPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordExpiryUsedByList** -```swift - open class func policiesPasswordExpiryUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Expiry Policy. - -PoliciesAPI.policiesPasswordExpiryUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Expiry Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordList** -```swift - open class func policiesPasswordList(amountDigits: Int? = nil, amountLowercase: Int? = nil, amountSymbols: Int? = nil, amountUppercase: Int? = nil, checkHaveIBeenPwned: Bool? = nil, checkStaticRules: Bool? = nil, checkZxcvbn: Bool? = nil, created: Date? = nil, errorMessage: String? = nil, executionLogging: Bool? = nil, hibpAllowedCount: Int? = nil, lastUpdated: Date? = nil, lengthMin: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordField: String? = nil, policyUuid: UUID? = nil, search: String? = nil, symbolCharset: String? = nil, zxcvbnScoreThreshold: Int? = nil, completion: @escaping (_ data: PaginatedPasswordPolicyList?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let amountDigits = 987 // Int | (optional) -let amountLowercase = 987 // Int | (optional) -let amountSymbols = 987 // Int | (optional) -let amountUppercase = 987 // Int | (optional) -let checkHaveIBeenPwned = true // Bool | (optional) -let checkStaticRules = true // Bool | (optional) -let checkZxcvbn = true // Bool | (optional) -let created = Date() // Date | (optional) -let errorMessage = "errorMessage_example" // String | (optional) -let executionLogging = true // Bool | (optional) -let hibpAllowedCount = 987 // Int | (optional) -let lastUpdated = Date() // Date | (optional) -let lengthMin = 987 // Int | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let passwordField = "passwordField_example" // String | (optional) -let policyUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) -let symbolCharset = "symbolCharset_example" // String | (optional) -let zxcvbnScoreThreshold = 987 // Int | (optional) - -PoliciesAPI.policiesPasswordList(amountDigits: amountDigits, amountLowercase: amountLowercase, amountSymbols: amountSymbols, amountUppercase: amountUppercase, checkHaveIBeenPwned: checkHaveIBeenPwned, checkStaticRules: checkStaticRules, checkZxcvbn: checkZxcvbn, created: created, errorMessage: errorMessage, executionLogging: executionLogging, hibpAllowedCount: hibpAllowedCount, lastUpdated: lastUpdated, lengthMin: lengthMin, name: name, ordering: ordering, page: page, pageSize: pageSize, passwordField: passwordField, policyUuid: policyUuid, search: search, symbolCharset: symbolCharset, zxcvbnScoreThreshold: zxcvbnScoreThreshold) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **amountDigits** | **Int** | | [optional] - **amountLowercase** | **Int** | | [optional] - **amountSymbols** | **Int** | | [optional] - **amountUppercase** | **Int** | | [optional] - **checkHaveIBeenPwned** | **Bool** | | [optional] - **checkStaticRules** | **Bool** | | [optional] - **checkZxcvbn** | **Bool** | | [optional] - **created** | **Date** | | [optional] - **errorMessage** | **String** | | [optional] - **executionLogging** | **Bool** | | [optional] - **hibpAllowedCount** | **Int** | | [optional] - **lastUpdated** | **Date** | | [optional] - **lengthMin** | **Int** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **passwordField** | **String** | | [optional] - **policyUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - **symbolCharset** | **String** | | [optional] - **zxcvbnScoreThreshold** | **Int** | | [optional] - -### Return type - -[**PaginatedPasswordPolicyList**](PaginatedPasswordPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordPartialUpdate** -```swift - open class func policiesPasswordPartialUpdate(policyUuid: UUID, patchedPasswordPolicyRequest: PatchedPasswordPolicyRequest? = nil, completion: @escaping (_ data: PasswordPolicy?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Policy. -let patchedPasswordPolicyRequest = PatchedPasswordPolicyRequest(name: "name_example", executionLogging: false, passwordField: "passwordField_example", amountDigits: 123, amountUppercase: 123, amountLowercase: 123, amountSymbols: 123, lengthMin: 123, symbolCharset: "symbolCharset_example", errorMessage: "errorMessage_example", checkStaticRules: false, checkHaveIBeenPwned: false, checkZxcvbn: false, hibpAllowedCount: 123, zxcvbnScoreThreshold: 123) // PatchedPasswordPolicyRequest | (optional) - -PoliciesAPI.policiesPasswordPartialUpdate(policyUuid: policyUuid, patchedPasswordPolicyRequest: patchedPasswordPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Policy. | - **patchedPasswordPolicyRequest** | [**PatchedPasswordPolicyRequest**](PatchedPasswordPolicyRequest.md) | | [optional] - -### Return type - -[**PasswordPolicy**](PasswordPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordRetrieve** -```swift - open class func policiesPasswordRetrieve(policyUuid: UUID, completion: @escaping (_ data: PasswordPolicy?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Policy. - -PoliciesAPI.policiesPasswordRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Policy. | - -### Return type - -[**PasswordPolicy**](PasswordPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordUpdate** -```swift - open class func policiesPasswordUpdate(policyUuid: UUID, passwordPolicyRequest: PasswordPolicyRequest, completion: @escaping (_ data: PasswordPolicy?, _ error: Error?) -> Void) -``` - - - -Password Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Policy. -let passwordPolicyRequest = PasswordPolicyRequest(name: "name_example", executionLogging: false, passwordField: "passwordField_example", amountDigits: 123, amountUppercase: 123, amountLowercase: 123, amountSymbols: 123, lengthMin: 123, symbolCharset: "symbolCharset_example", errorMessage: "errorMessage_example", checkStaticRules: false, checkHaveIBeenPwned: false, checkZxcvbn: false, hibpAllowedCount: 123, zxcvbnScoreThreshold: 123) // PasswordPolicyRequest | - -PoliciesAPI.policiesPasswordUpdate(policyUuid: policyUuid, passwordPolicyRequest: passwordPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Policy. | - **passwordPolicyRequest** | [**PasswordPolicyRequest**](PasswordPolicyRequest.md) | | - -### Return type - -[**PasswordPolicy**](PasswordPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesPasswordUsedByList** -```swift - open class func policiesPasswordUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Password Policy. - -PoliciesAPI.policiesPasswordUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Password Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationCreate** -```swift - open class func policiesReputationCreate(reputationPolicyRequest: ReputationPolicyRequest, completion: @escaping (_ data: ReputationPolicy?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let reputationPolicyRequest = ReputationPolicyRequest(name: "name_example", executionLogging: false, checkIp: false, checkUsername: false, threshold: 123) // ReputationPolicyRequest | - -PoliciesAPI.policiesReputationCreate(reputationPolicyRequest: reputationPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reputationPolicyRequest** | [**ReputationPolicyRequest**](ReputationPolicyRequest.md) | | - -### Return type - -[**ReputationPolicy**](ReputationPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationDestroy** -```swift - open class func policiesReputationDestroy(policyUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Reputation Policy. - -PoliciesAPI.policiesReputationDestroy(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Reputation Policy. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationList** -```swift - open class func policiesReputationList(checkIp: Bool? = nil, checkUsername: Bool? = nil, created: Date? = nil, executionLogging: Bool? = nil, lastUpdated: Date? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyUuid: UUID? = nil, search: String? = nil, threshold: Int? = nil, completion: @escaping (_ data: PaginatedReputationPolicyList?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let checkIp = true // Bool | (optional) -let checkUsername = true // Bool | (optional) -let created = Date() // Date | (optional) -let executionLogging = true // Bool | (optional) -let lastUpdated = Date() // Date | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) -let threshold = 987 // Int | (optional) - -PoliciesAPI.policiesReputationList(checkIp: checkIp, checkUsername: checkUsername, created: created, executionLogging: executionLogging, lastUpdated: lastUpdated, name: name, ordering: ordering, page: page, pageSize: pageSize, policyUuid: policyUuid, search: search, threshold: threshold) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **checkIp** | **Bool** | | [optional] - **checkUsername** | **Bool** | | [optional] - **created** | **Date** | | [optional] - **executionLogging** | **Bool** | | [optional] - **lastUpdated** | **Date** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - **threshold** | **Int** | | [optional] - -### Return type - -[**PaginatedReputationPolicyList**](PaginatedReputationPolicyList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationPartialUpdate** -```swift - open class func policiesReputationPartialUpdate(policyUuid: UUID, patchedReputationPolicyRequest: PatchedReputationPolicyRequest? = nil, completion: @escaping (_ data: ReputationPolicy?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Reputation Policy. -let patchedReputationPolicyRequest = PatchedReputationPolicyRequest(name: "name_example", executionLogging: false, checkIp: false, checkUsername: false, threshold: 123) // PatchedReputationPolicyRequest | (optional) - -PoliciesAPI.policiesReputationPartialUpdate(policyUuid: policyUuid, patchedReputationPolicyRequest: patchedReputationPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Reputation Policy. | - **patchedReputationPolicyRequest** | [**PatchedReputationPolicyRequest**](PatchedReputationPolicyRequest.md) | | [optional] - -### Return type - -[**ReputationPolicy**](ReputationPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationRetrieve** -```swift - open class func policiesReputationRetrieve(policyUuid: UUID, completion: @escaping (_ data: ReputationPolicy?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Reputation Policy. - -PoliciesAPI.policiesReputationRetrieve(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Reputation Policy. | - -### Return type - -[**ReputationPolicy**](ReputationPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationScoresDestroy** -```swift - open class func policiesReputationScoresDestroy(reputationUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Reputation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let reputationUuid = 987 // UUID | A UUID string identifying this Reputation Score. - -PoliciesAPI.policiesReputationScoresDestroy(reputationUuid: reputationUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reputationUuid** | **UUID** | A UUID string identifying this Reputation Score. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationScoresList** -```swift - open class func policiesReputationScoresList(identifier: String? = nil, ip: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, score: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedReputationList?, _ error: Error?) -> Void) -``` - - - -Reputation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identifier = "identifier_example" // String | (optional) -let ip = "ip_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let score = 987 // Int | (optional) -let search = "search_example" // String | A search term. (optional) - -PoliciesAPI.policiesReputationScoresList(identifier: identifier, ip: ip, ordering: ordering, page: page, pageSize: pageSize, score: score, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identifier** | **String** | | [optional] - **ip** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **score** | **Int** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedReputationList**](PaginatedReputationList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationScoresRetrieve** -```swift - open class func policiesReputationScoresRetrieve(reputationUuid: UUID, completion: @escaping (_ data: Reputation?, _ error: Error?) -> Void) -``` - - - -Reputation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let reputationUuid = 987 // UUID | A UUID string identifying this Reputation Score. - -PoliciesAPI.policiesReputationScoresRetrieve(reputationUuid: reputationUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reputationUuid** | **UUID** | A UUID string identifying this Reputation Score. | - -### Return type - -[**Reputation**](Reputation.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationScoresUsedByList** -```swift - open class func policiesReputationScoresUsedByList(reputationUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let reputationUuid = 987 // UUID | A UUID string identifying this Reputation Score. - -PoliciesAPI.policiesReputationScoresUsedByList(reputationUuid: reputationUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reputationUuid** | **UUID** | A UUID string identifying this Reputation Score. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationUpdate** -```swift - open class func policiesReputationUpdate(policyUuid: UUID, reputationPolicyRequest: ReputationPolicyRequest, completion: @escaping (_ data: ReputationPolicy?, _ error: Error?) -> Void) -``` - - - -Reputation Policy Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Reputation Policy. -let reputationPolicyRequest = ReputationPolicyRequest(name: "name_example", executionLogging: false, checkIp: false, checkUsername: false, threshold: 123) // ReputationPolicyRequest | - -PoliciesAPI.policiesReputationUpdate(policyUuid: policyUuid, reputationPolicyRequest: reputationPolicyRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Reputation Policy. | - **reputationPolicyRequest** | [**ReputationPolicyRequest**](ReputationPolicyRequest.md) | | - -### Return type - -[**ReputationPolicy**](ReputationPolicy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **policiesReputationUsedByList** -```swift - open class func policiesReputationUsedByList(policyUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let policyUuid = 987 // UUID | A UUID string identifying this Reputation Policy. - -PoliciesAPI.policiesReputationUsedByList(policyUuid: policyUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **policyUuid** | **UUID** | A UUID string identifying this Reputation Policy. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Policy.md b/docs/Policy.md deleted file mode 100644 index d079b84..0000000 --- a/docs/Policy.md +++ /dev/null @@ -1,17 +0,0 @@ -# Policy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyBinding.md b/docs/PolicyBinding.md deleted file mode 100644 index dda995b..0000000 --- a/docs/PolicyBinding.md +++ /dev/null @@ -1,22 +0,0 @@ -# PolicyBinding - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**policy** | **UUID** | | [optional] -**group** | **UUID** | | [optional] -**user** | **Int** | | [optional] -**policyObj** | [**Policy**](Policy.md) | | [readonly] -**groupObj** | [**Group**](Group.md) | | [readonly] -**userObj** | [**User**](User.md) | | [readonly] -**target** | **UUID** | | -**negate** | **Bool** | Negates the outcome of the policy. Messages are unaffected. | [optional] -**enabled** | **Bool** | | [optional] -**order** | **Int** | | -**timeout** | **Int** | Timeout after which Policy execution is terminated. | [optional] -**failureResult** | **Bool** | Result if the Policy execution fails. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyBindingRequest.md b/docs/PolicyBindingRequest.md deleted file mode 100644 index 748147a..0000000 --- a/docs/PolicyBindingRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PolicyBindingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**policy** | **UUID** | | [optional] -**group** | **UUID** | | [optional] -**user** | **Int** | | [optional] -**target** | **UUID** | | -**negate** | **Bool** | Negates the outcome of the policy. Messages are unaffected. | [optional] -**enabled** | **Bool** | | [optional] -**order** | **Int** | | -**timeout** | **Int** | Timeout after which Policy execution is terminated. | [optional] -**failureResult** | **Bool** | Result if the Policy execution fails. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyEngineMode.md b/docs/PolicyEngineMode.md deleted file mode 100644 index d5ef6e7..0000000 --- a/docs/PolicyEngineMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# PolicyEngineMode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyRequest.md b/docs/PolicyRequest.md deleted file mode 100644 index 1c2b2b0..0000000 --- a/docs/PolicyRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyTestRequest.md b/docs/PolicyTestRequest.md deleted file mode 100644 index 425ba24..0000000 --- a/docs/PolicyTestRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PolicyTestRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **Int** | | -**context** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyTestResult.md b/docs/PolicyTestResult.md deleted file mode 100644 index 3691caf..0000000 --- a/docs/PolicyTestResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# PolicyTestResult - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**passing** | **Bool** | | -**messages** | **[String]** | | [readonly] -**logMessages** | [[String: AnyCodable]] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Prompt.md b/docs/Prompt.md deleted file mode 100644 index 3c252de..0000000 --- a/docs/Prompt.md +++ /dev/null @@ -1,22 +0,0 @@ -# Prompt - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**fieldKey** | **String** | Name of the form field, also used to store the value | -**label** | **String** | | -**type** | [**PromptTypeEnum**](PromptTypeEnum.md) | | -**_required** | **Bool** | | [optional] -**placeholder** | **String** | Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. | [optional] -**initialValue** | **String** | Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. | [optional] -**order** | **Int** | | [optional] -**promptstageSet** | [Stage] | | [optional] -**subText** | **String** | | [optional] -**placeholderExpression** | **Bool** | | [optional] -**initialValueExpression** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptChallenge.md b/docs/PromptChallenge.md deleted file mode 100644 index a2e6460..0000000 --- a/docs/PromptChallenge.md +++ /dev/null @@ -1,14 +0,0 @@ -# PromptChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-prompt"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**fields** | [StagePrompt] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptChallengeResponseRequest.md b/docs/PromptChallengeResponseRequest.md deleted file mode 100644 index 5f40016..0000000 --- a/docs/PromptChallengeResponseRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PromptChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-prompt"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptRequest.md b/docs/PromptRequest.md deleted file mode 100644 index 9e8bbf3..0000000 --- a/docs/PromptRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PromptRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**fieldKey** | **String** | Name of the form field, also used to store the value | -**label** | **String** | | -**type** | [**PromptTypeEnum**](PromptTypeEnum.md) | | -**_required** | **Bool** | | [optional] -**placeholder** | **String** | Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices. | [optional] -**initialValue** | **String** | Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices. | [optional] -**order** | **Int** | | [optional] -**promptstageSet** | [StageRequest] | | [optional] -**subText** | **String** | | [optional] -**placeholderExpression** | **Bool** | | [optional] -**initialValueExpression** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptStage.md b/docs/PromptStage.md deleted file mode 100644 index efdb299..0000000 --- a/docs/PromptStage.md +++ /dev/null @@ -1,18 +0,0 @@ -# PromptStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**fields** | **[UUID]** | | -**validationPolicies** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptStageRequest.md b/docs/PromptStageRequest.md deleted file mode 100644 index 87a898e..0000000 --- a/docs/PromptStageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PromptStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**fields** | **[UUID]** | | -**validationPolicies** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PromptTypeEnum.md b/docs/PromptTypeEnum.md deleted file mode 100644 index 694c789..0000000 --- a/docs/PromptTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# PromptTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PropertyMapping.md b/docs/PropertyMapping.md deleted file mode 100644 index 983761e..0000000 --- a/docs/PropertyMapping.md +++ /dev/null @@ -1,17 +0,0 @@ -# PropertyMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**component** | **String** | Get object's component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PropertyMappingPreview.md b/docs/PropertyMappingPreview.md deleted file mode 100644 index fa734bc..0000000 --- a/docs/PropertyMappingPreview.md +++ /dev/null @@ -1,10 +0,0 @@ -# PropertyMappingPreview - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**preview** | [String: AnyCodable] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PropertyMappingTestResult.md b/docs/PropertyMappingTestResult.md deleted file mode 100644 index 76bb2ec..0000000 --- a/docs/PropertyMappingTestResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyMappingTestResult - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **String** | | [readonly] -**successful** | **Bool** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PropertymappingsAPI.md b/docs/PropertymappingsAPI.md deleted file mode 100644 index 80b36f8..0000000 --- a/docs/PropertymappingsAPI.md +++ /dev/null @@ -1,2154 +0,0 @@ -# PropertymappingsAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**propertymappingsAllDestroy**](PropertymappingsAPI.md#propertymappingsalldestroy) | **DELETE** /propertymappings/all/{pm_uuid}/ | -[**propertymappingsAllList**](PropertymappingsAPI.md#propertymappingsalllist) | **GET** /propertymappings/all/ | -[**propertymappingsAllRetrieve**](PropertymappingsAPI.md#propertymappingsallretrieve) | **GET** /propertymappings/all/{pm_uuid}/ | -[**propertymappingsAllTestCreate**](PropertymappingsAPI.md#propertymappingsalltestcreate) | **POST** /propertymappings/all/{pm_uuid}/test/ | -[**propertymappingsAllTypesList**](PropertymappingsAPI.md#propertymappingsalltypeslist) | **GET** /propertymappings/all/types/ | -[**propertymappingsAllUsedByList**](PropertymappingsAPI.md#propertymappingsallusedbylist) | **GET** /propertymappings/all/{pm_uuid}/used_by/ | -[**propertymappingsLdapCreate**](PropertymappingsAPI.md#propertymappingsldapcreate) | **POST** /propertymappings/ldap/ | -[**propertymappingsLdapDestroy**](PropertymappingsAPI.md#propertymappingsldapdestroy) | **DELETE** /propertymappings/ldap/{pm_uuid}/ | -[**propertymappingsLdapList**](PropertymappingsAPI.md#propertymappingsldaplist) | **GET** /propertymappings/ldap/ | -[**propertymappingsLdapPartialUpdate**](PropertymappingsAPI.md#propertymappingsldappartialupdate) | **PATCH** /propertymappings/ldap/{pm_uuid}/ | -[**propertymappingsLdapRetrieve**](PropertymappingsAPI.md#propertymappingsldapretrieve) | **GET** /propertymappings/ldap/{pm_uuid}/ | -[**propertymappingsLdapUpdate**](PropertymappingsAPI.md#propertymappingsldapupdate) | **PUT** /propertymappings/ldap/{pm_uuid}/ | -[**propertymappingsLdapUsedByList**](PropertymappingsAPI.md#propertymappingsldapusedbylist) | **GET** /propertymappings/ldap/{pm_uuid}/used_by/ | -[**propertymappingsNotificationCreate**](PropertymappingsAPI.md#propertymappingsnotificationcreate) | **POST** /propertymappings/notification/ | -[**propertymappingsNotificationDestroy**](PropertymappingsAPI.md#propertymappingsnotificationdestroy) | **DELETE** /propertymappings/notification/{pm_uuid}/ | -[**propertymappingsNotificationList**](PropertymappingsAPI.md#propertymappingsnotificationlist) | **GET** /propertymappings/notification/ | -[**propertymappingsNotificationPartialUpdate**](PropertymappingsAPI.md#propertymappingsnotificationpartialupdate) | **PATCH** /propertymappings/notification/{pm_uuid}/ | -[**propertymappingsNotificationRetrieve**](PropertymappingsAPI.md#propertymappingsnotificationretrieve) | **GET** /propertymappings/notification/{pm_uuid}/ | -[**propertymappingsNotificationUpdate**](PropertymappingsAPI.md#propertymappingsnotificationupdate) | **PUT** /propertymappings/notification/{pm_uuid}/ | -[**propertymappingsNotificationUsedByList**](PropertymappingsAPI.md#propertymappingsnotificationusedbylist) | **GET** /propertymappings/notification/{pm_uuid}/used_by/ | -[**propertymappingsSamlCreate**](PropertymappingsAPI.md#propertymappingssamlcreate) | **POST** /propertymappings/saml/ | -[**propertymappingsSamlDestroy**](PropertymappingsAPI.md#propertymappingssamldestroy) | **DELETE** /propertymappings/saml/{pm_uuid}/ | -[**propertymappingsSamlList**](PropertymappingsAPI.md#propertymappingssamllist) | **GET** /propertymappings/saml/ | -[**propertymappingsSamlPartialUpdate**](PropertymappingsAPI.md#propertymappingssamlpartialupdate) | **PATCH** /propertymappings/saml/{pm_uuid}/ | -[**propertymappingsSamlRetrieve**](PropertymappingsAPI.md#propertymappingssamlretrieve) | **GET** /propertymappings/saml/{pm_uuid}/ | -[**propertymappingsSamlUpdate**](PropertymappingsAPI.md#propertymappingssamlupdate) | **PUT** /propertymappings/saml/{pm_uuid}/ | -[**propertymappingsSamlUsedByList**](PropertymappingsAPI.md#propertymappingssamlusedbylist) | **GET** /propertymappings/saml/{pm_uuid}/used_by/ | -[**propertymappingsScimCreate**](PropertymappingsAPI.md#propertymappingsscimcreate) | **POST** /propertymappings/scim/ | -[**propertymappingsScimDestroy**](PropertymappingsAPI.md#propertymappingsscimdestroy) | **DELETE** /propertymappings/scim/{pm_uuid}/ | -[**propertymappingsScimList**](PropertymappingsAPI.md#propertymappingsscimlist) | **GET** /propertymappings/scim/ | -[**propertymappingsScimPartialUpdate**](PropertymappingsAPI.md#propertymappingsscimpartialupdate) | **PATCH** /propertymappings/scim/{pm_uuid}/ | -[**propertymappingsScimRetrieve**](PropertymappingsAPI.md#propertymappingsscimretrieve) | **GET** /propertymappings/scim/{pm_uuid}/ | -[**propertymappingsScimUpdate**](PropertymappingsAPI.md#propertymappingsscimupdate) | **PUT** /propertymappings/scim/{pm_uuid}/ | -[**propertymappingsScimUsedByList**](PropertymappingsAPI.md#propertymappingsscimusedbylist) | **GET** /propertymappings/scim/{pm_uuid}/used_by/ | -[**propertymappingsScopeCreate**](PropertymappingsAPI.md#propertymappingsscopecreate) | **POST** /propertymappings/scope/ | -[**propertymappingsScopeDestroy**](PropertymappingsAPI.md#propertymappingsscopedestroy) | **DELETE** /propertymappings/scope/{pm_uuid}/ | -[**propertymappingsScopeList**](PropertymappingsAPI.md#propertymappingsscopelist) | **GET** /propertymappings/scope/ | -[**propertymappingsScopePartialUpdate**](PropertymappingsAPI.md#propertymappingsscopepartialupdate) | **PATCH** /propertymappings/scope/{pm_uuid}/ | -[**propertymappingsScopeRetrieve**](PropertymappingsAPI.md#propertymappingsscoperetrieve) | **GET** /propertymappings/scope/{pm_uuid}/ | -[**propertymappingsScopeUpdate**](PropertymappingsAPI.md#propertymappingsscopeupdate) | **PUT** /propertymappings/scope/{pm_uuid}/ | -[**propertymappingsScopeUsedByList**](PropertymappingsAPI.md#propertymappingsscopeusedbylist) | **GET** /propertymappings/scope/{pm_uuid}/used_by/ | - - -# **propertymappingsAllDestroy** -```swift - open class func propertymappingsAllDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Property Mapping. - -PropertymappingsAPI.propertymappingsAllDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Property Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsAllList** -```swift - open class func propertymappingsAllList(managedIsnull: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedPropertyMappingList?, _ error: Error?) -> Void) -``` - - - -PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let managedIsnull = true // Bool | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsAllList(managedIsnull: managedIsnull, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **managedIsnull** | **Bool** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedPropertyMappingList**](PaginatedPropertyMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsAllRetrieve** -```swift - open class func propertymappingsAllRetrieve(pmUuid: UUID, completion: @escaping (_ data: PropertyMapping?, _ error: Error?) -> Void) -``` - - - -PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Property Mapping. - -PropertymappingsAPI.propertymappingsAllRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Property Mapping. | - -### Return type - -[**PropertyMapping**](PropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsAllTestCreate** -```swift - open class func propertymappingsAllTestCreate(pmUuid: UUID, policyTestRequest: PolicyTestRequest, formatResult: Bool? = nil, completion: @escaping (_ data: PropertyMappingTestResult?, _ error: Error?) -> Void) -``` - - - -Test Property Mapping - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Property Mapping. -let policyTestRequest = PolicyTestRequest(user: 123, context: "TODO") // PolicyTestRequest | -let formatResult = true // Bool | (optional) - -PropertymappingsAPI.propertymappingsAllTestCreate(pmUuid: pmUuid, policyTestRequest: policyTestRequest, formatResult: formatResult) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Property Mapping. | - **policyTestRequest** | [**PolicyTestRequest**](PolicyTestRequest.md) | | - **formatResult** | **Bool** | | [optional] - -### Return type - -[**PropertyMappingTestResult**](PropertyMappingTestResult.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsAllTypesList** -```swift - open class func propertymappingsAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable property-mapping types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -PropertymappingsAPI.propertymappingsAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsAllUsedByList** -```swift - open class func propertymappingsAllUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Property Mapping. - -PropertymappingsAPI.propertymappingsAllUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Property Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapCreate** -```swift - open class func propertymappingsLdapCreate(lDAPPropertyMappingRequest: LDAPPropertyMappingRequest, completion: @escaping (_ data: LDAPPropertyMapping?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let lDAPPropertyMappingRequest = LDAPPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", objectField: "objectField_example") // LDAPPropertyMappingRequest | - -PropertymappingsAPI.propertymappingsLdapCreate(lDAPPropertyMappingRequest: lDAPPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lDAPPropertyMappingRequest** | [**LDAPPropertyMappingRequest**](LDAPPropertyMappingRequest.md) | | - -### Return type - -[**LDAPPropertyMapping**](LDAPPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapDestroy** -```swift - open class func propertymappingsLdapDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this LDAP Property Mapping. - -PropertymappingsAPI.propertymappingsLdapDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this LDAP Property Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapList** -```swift - open class func propertymappingsLdapList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, objectField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedLDAPPropertyMappingList?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let expression = "expression_example" // String | (optional) -let managed = ["inner_example"] // [String] | (optional) -let name = "name_example" // String | (optional) -let objectField = "objectField_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let pmUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsLdapList(expression: expression, managed: managed, name: name, objectField: objectField, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **expression** | **String** | | [optional] - **managed** | [**[String]**](String.md) | | [optional] - **name** | **String** | | [optional] - **objectField** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **pmUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedLDAPPropertyMappingList**](PaginatedLDAPPropertyMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapPartialUpdate** -```swift - open class func propertymappingsLdapPartialUpdate(pmUuid: UUID, patchedLDAPPropertyMappingRequest: PatchedLDAPPropertyMappingRequest? = nil, completion: @escaping (_ data: LDAPPropertyMapping?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this LDAP Property Mapping. -let patchedLDAPPropertyMappingRequest = PatchedLDAPPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", objectField: "objectField_example") // PatchedLDAPPropertyMappingRequest | (optional) - -PropertymappingsAPI.propertymappingsLdapPartialUpdate(pmUuid: pmUuid, patchedLDAPPropertyMappingRequest: patchedLDAPPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this LDAP Property Mapping. | - **patchedLDAPPropertyMappingRequest** | [**PatchedLDAPPropertyMappingRequest**](PatchedLDAPPropertyMappingRequest.md) | | [optional] - -### Return type - -[**LDAPPropertyMapping**](LDAPPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapRetrieve** -```swift - open class func propertymappingsLdapRetrieve(pmUuid: UUID, completion: @escaping (_ data: LDAPPropertyMapping?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this LDAP Property Mapping. - -PropertymappingsAPI.propertymappingsLdapRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this LDAP Property Mapping. | - -### Return type - -[**LDAPPropertyMapping**](LDAPPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapUpdate** -```swift - open class func propertymappingsLdapUpdate(pmUuid: UUID, lDAPPropertyMappingRequest: LDAPPropertyMappingRequest, completion: @escaping (_ data: LDAPPropertyMapping?, _ error: Error?) -> Void) -``` - - - -LDAP PropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this LDAP Property Mapping. -let lDAPPropertyMappingRequest = LDAPPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", objectField: "objectField_example") // LDAPPropertyMappingRequest | - -PropertymappingsAPI.propertymappingsLdapUpdate(pmUuid: pmUuid, lDAPPropertyMappingRequest: lDAPPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this LDAP Property Mapping. | - **lDAPPropertyMappingRequest** | [**LDAPPropertyMappingRequest**](LDAPPropertyMappingRequest.md) | | - -### Return type - -[**LDAPPropertyMapping**](LDAPPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsLdapUsedByList** -```swift - open class func propertymappingsLdapUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this LDAP Property Mapping. - -PropertymappingsAPI.propertymappingsLdapUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this LDAP Property Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationCreate** -```swift - open class func propertymappingsNotificationCreate(notificationWebhookMappingRequest: NotificationWebhookMappingRequest, completion: @escaping (_ data: NotificationWebhookMapping?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let notificationWebhookMappingRequest = NotificationWebhookMappingRequest(name: "name_example", expression: "expression_example") // NotificationWebhookMappingRequest | - -PropertymappingsAPI.propertymappingsNotificationCreate(notificationWebhookMappingRequest: notificationWebhookMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationWebhookMappingRequest** | [**NotificationWebhookMappingRequest**](NotificationWebhookMappingRequest.md) | | - -### Return type - -[**NotificationWebhookMapping**](NotificationWebhookMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationDestroy** -```swift - open class func propertymappingsNotificationDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Webhook Mapping. - -PropertymappingsAPI.propertymappingsNotificationDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Webhook Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationList** -```swift - open class func propertymappingsNotificationList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedNotificationWebhookMappingList?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsNotificationList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedNotificationWebhookMappingList**](PaginatedNotificationWebhookMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationPartialUpdate** -```swift - open class func propertymappingsNotificationPartialUpdate(pmUuid: UUID, patchedNotificationWebhookMappingRequest: PatchedNotificationWebhookMappingRequest? = nil, completion: @escaping (_ data: NotificationWebhookMapping?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Webhook Mapping. -let patchedNotificationWebhookMappingRequest = PatchedNotificationWebhookMappingRequest(name: "name_example", expression: "expression_example") // PatchedNotificationWebhookMappingRequest | (optional) - -PropertymappingsAPI.propertymappingsNotificationPartialUpdate(pmUuid: pmUuid, patchedNotificationWebhookMappingRequest: patchedNotificationWebhookMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Webhook Mapping. | - **patchedNotificationWebhookMappingRequest** | [**PatchedNotificationWebhookMappingRequest**](PatchedNotificationWebhookMappingRequest.md) | | [optional] - -### Return type - -[**NotificationWebhookMapping**](NotificationWebhookMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationRetrieve** -```swift - open class func propertymappingsNotificationRetrieve(pmUuid: UUID, completion: @escaping (_ data: NotificationWebhookMapping?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Webhook Mapping. - -PropertymappingsAPI.propertymappingsNotificationRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Webhook Mapping. | - -### Return type - -[**NotificationWebhookMapping**](NotificationWebhookMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationUpdate** -```swift - open class func propertymappingsNotificationUpdate(pmUuid: UUID, notificationWebhookMappingRequest: NotificationWebhookMappingRequest, completion: @escaping (_ data: NotificationWebhookMapping?, _ error: Error?) -> Void) -``` - - - -NotificationWebhookMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Webhook Mapping. -let notificationWebhookMappingRequest = NotificationWebhookMappingRequest(name: "name_example", expression: "expression_example") // NotificationWebhookMappingRequest | - -PropertymappingsAPI.propertymappingsNotificationUpdate(pmUuid: pmUuid, notificationWebhookMappingRequest: notificationWebhookMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Webhook Mapping. | - **notificationWebhookMappingRequest** | [**NotificationWebhookMappingRequest**](NotificationWebhookMappingRequest.md) | | - -### Return type - -[**NotificationWebhookMapping**](NotificationWebhookMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsNotificationUsedByList** -```swift - open class func propertymappingsNotificationUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Webhook Mapping. - -PropertymappingsAPI.propertymappingsNotificationUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Webhook Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlCreate** -```swift - open class func propertymappingsSamlCreate(sAMLPropertyMappingRequest: SAMLPropertyMappingRequest, completion: @escaping (_ data: SAMLPropertyMapping?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sAMLPropertyMappingRequest = SAMLPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", samlName: "samlName_example", friendlyName: "friendlyName_example") // SAMLPropertyMappingRequest | - -PropertymappingsAPI.propertymappingsSamlCreate(sAMLPropertyMappingRequest: sAMLPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sAMLPropertyMappingRequest** | [**SAMLPropertyMappingRequest**](SAMLPropertyMappingRequest.md) | | - -### Return type - -[**SAMLPropertyMapping**](SAMLPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlDestroy** -```swift - open class func propertymappingsSamlDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SAML Property Mapping. - -PropertymappingsAPI.propertymappingsSamlDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SAML Property Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlList** -```swift - open class func propertymappingsSamlList(expression: String? = nil, friendlyName: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, samlName: String? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedSAMLPropertyMappingList?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let expression = "expression_example" // String | (optional) -let friendlyName = "friendlyName_example" // String | (optional) -let managed = ["inner_example"] // [String] | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let pmUuid = 987 // UUID | (optional) -let samlName = "samlName_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsSamlList(expression: expression, friendlyName: friendlyName, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, samlName: samlName, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **expression** | **String** | | [optional] - **friendlyName** | **String** | | [optional] - **managed** | [**[String]**](String.md) | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **pmUuid** | **UUID** | | [optional] - **samlName** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedSAMLPropertyMappingList**](PaginatedSAMLPropertyMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlPartialUpdate** -```swift - open class func propertymappingsSamlPartialUpdate(pmUuid: UUID, patchedSAMLPropertyMappingRequest: PatchedSAMLPropertyMappingRequest? = nil, completion: @escaping (_ data: SAMLPropertyMapping?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SAML Property Mapping. -let patchedSAMLPropertyMappingRequest = PatchedSAMLPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", samlName: "samlName_example", friendlyName: "friendlyName_example") // PatchedSAMLPropertyMappingRequest | (optional) - -PropertymappingsAPI.propertymappingsSamlPartialUpdate(pmUuid: pmUuid, patchedSAMLPropertyMappingRequest: patchedSAMLPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SAML Property Mapping. | - **patchedSAMLPropertyMappingRequest** | [**PatchedSAMLPropertyMappingRequest**](PatchedSAMLPropertyMappingRequest.md) | | [optional] - -### Return type - -[**SAMLPropertyMapping**](SAMLPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlRetrieve** -```swift - open class func propertymappingsSamlRetrieve(pmUuid: UUID, completion: @escaping (_ data: SAMLPropertyMapping?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SAML Property Mapping. - -PropertymappingsAPI.propertymappingsSamlRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SAML Property Mapping. | - -### Return type - -[**SAMLPropertyMapping**](SAMLPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlUpdate** -```swift - open class func propertymappingsSamlUpdate(pmUuid: UUID, sAMLPropertyMappingRequest: SAMLPropertyMappingRequest, completion: @escaping (_ data: SAMLPropertyMapping?, _ error: Error?) -> Void) -``` - - - -SAMLPropertyMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SAML Property Mapping. -let sAMLPropertyMappingRequest = SAMLPropertyMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", samlName: "samlName_example", friendlyName: "friendlyName_example") // SAMLPropertyMappingRequest | - -PropertymappingsAPI.propertymappingsSamlUpdate(pmUuid: pmUuid, sAMLPropertyMappingRequest: sAMLPropertyMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SAML Property Mapping. | - **sAMLPropertyMappingRequest** | [**SAMLPropertyMappingRequest**](SAMLPropertyMappingRequest.md) | | - -### Return type - -[**SAMLPropertyMapping**](SAMLPropertyMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsSamlUsedByList** -```swift - open class func propertymappingsSamlUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SAML Property Mapping. - -PropertymappingsAPI.propertymappingsSamlUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SAML Property Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimCreate** -```swift - open class func propertymappingsScimCreate(sCIMMappingRequest: SCIMMappingRequest, completion: @escaping (_ data: SCIMMapping?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sCIMMappingRequest = SCIMMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example") // SCIMMappingRequest | - -PropertymappingsAPI.propertymappingsScimCreate(sCIMMappingRequest: sCIMMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sCIMMappingRequest** | [**SCIMMappingRequest**](SCIMMappingRequest.md) | | - -### Return type - -[**SCIMMapping**](SCIMMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimDestroy** -```swift - open class func propertymappingsScimDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SCIM Mapping. - -PropertymappingsAPI.propertymappingsScimDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SCIM Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimList** -```swift - open class func propertymappingsScimList(expression: String? = nil, managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, pmUuid: UUID? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedSCIMMappingList?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let expression = "expression_example" // String | (optional) -let managed = ["inner_example"] // [String] | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let pmUuid = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsScimList(expression: expression, managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, pmUuid: pmUuid, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **expression** | **String** | | [optional] - **managed** | [**[String]**](String.md) | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **pmUuid** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedSCIMMappingList**](PaginatedSCIMMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimPartialUpdate** -```swift - open class func propertymappingsScimPartialUpdate(pmUuid: UUID, patchedSCIMMappingRequest: PatchedSCIMMappingRequest? = nil, completion: @escaping (_ data: SCIMMapping?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SCIM Mapping. -let patchedSCIMMappingRequest = PatchedSCIMMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example") // PatchedSCIMMappingRequest | (optional) - -PropertymappingsAPI.propertymappingsScimPartialUpdate(pmUuid: pmUuid, patchedSCIMMappingRequest: patchedSCIMMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SCIM Mapping. | - **patchedSCIMMappingRequest** | [**PatchedSCIMMappingRequest**](PatchedSCIMMappingRequest.md) | | [optional] - -### Return type - -[**SCIMMapping**](SCIMMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimRetrieve** -```swift - open class func propertymappingsScimRetrieve(pmUuid: UUID, completion: @escaping (_ data: SCIMMapping?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SCIM Mapping. - -PropertymappingsAPI.propertymappingsScimRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SCIM Mapping. | - -### Return type - -[**SCIMMapping**](SCIMMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimUpdate** -```swift - open class func propertymappingsScimUpdate(pmUuid: UUID, sCIMMappingRequest: SCIMMappingRequest, completion: @escaping (_ data: SCIMMapping?, _ error: Error?) -> Void) -``` - - - -SCIMMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SCIM Mapping. -let sCIMMappingRequest = SCIMMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example") // SCIMMappingRequest | - -PropertymappingsAPI.propertymappingsScimUpdate(pmUuid: pmUuid, sCIMMappingRequest: sCIMMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SCIM Mapping. | - **sCIMMappingRequest** | [**SCIMMappingRequest**](SCIMMappingRequest.md) | | - -### Return type - -[**SCIMMapping**](SCIMMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScimUsedByList** -```swift - open class func propertymappingsScimUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this SCIM Mapping. - -PropertymappingsAPI.propertymappingsScimUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this SCIM Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeCreate** -```swift - open class func propertymappingsScopeCreate(scopeMappingRequest: ScopeMappingRequest, completion: @escaping (_ data: ScopeMapping?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let scopeMappingRequest = ScopeMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", scopeName: "scopeName_example", description: "description_example") // ScopeMappingRequest | - -PropertymappingsAPI.propertymappingsScopeCreate(scopeMappingRequest: scopeMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **scopeMappingRequest** | [**ScopeMappingRequest**](ScopeMappingRequest.md) | | - -### Return type - -[**ScopeMapping**](ScopeMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeDestroy** -```swift - open class func propertymappingsScopeDestroy(pmUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Scope Mapping. - -PropertymappingsAPI.propertymappingsScopeDestroy(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Scope Mapping. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeList** -```swift - open class func propertymappingsScopeList(managed: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, scopeName: String? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedScopeMappingList?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let managed = ["inner_example"] // [String] | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let scopeName = "scopeName_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) - -PropertymappingsAPI.propertymappingsScopeList(managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, scopeName: scopeName, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **managed** | [**[String]**](String.md) | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **scopeName** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedScopeMappingList**](PaginatedScopeMappingList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopePartialUpdate** -```swift - open class func propertymappingsScopePartialUpdate(pmUuid: UUID, patchedScopeMappingRequest: PatchedScopeMappingRequest? = nil, completion: @escaping (_ data: ScopeMapping?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Scope Mapping. -let patchedScopeMappingRequest = PatchedScopeMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", scopeName: "scopeName_example", description: "description_example") // PatchedScopeMappingRequest | (optional) - -PropertymappingsAPI.propertymappingsScopePartialUpdate(pmUuid: pmUuid, patchedScopeMappingRequest: patchedScopeMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Scope Mapping. | - **patchedScopeMappingRequest** | [**PatchedScopeMappingRequest**](PatchedScopeMappingRequest.md) | | [optional] - -### Return type - -[**ScopeMapping**](ScopeMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeRetrieve** -```swift - open class func propertymappingsScopeRetrieve(pmUuid: UUID, completion: @escaping (_ data: ScopeMapping?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Scope Mapping. - -PropertymappingsAPI.propertymappingsScopeRetrieve(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Scope Mapping. | - -### Return type - -[**ScopeMapping**](ScopeMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeUpdate** -```swift - open class func propertymappingsScopeUpdate(pmUuid: UUID, scopeMappingRequest: ScopeMappingRequest, completion: @escaping (_ data: ScopeMapping?, _ error: Error?) -> Void) -``` - - - -ScopeMapping Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Scope Mapping. -let scopeMappingRequest = ScopeMappingRequest(managed: "managed_example", name: "name_example", expression: "expression_example", scopeName: "scopeName_example", description: "description_example") // ScopeMappingRequest | - -PropertymappingsAPI.propertymappingsScopeUpdate(pmUuid: pmUuid, scopeMappingRequest: scopeMappingRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Scope Mapping. | - **scopeMappingRequest** | [**ScopeMappingRequest**](ScopeMappingRequest.md) | | - -### Return type - -[**ScopeMapping**](ScopeMapping.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **propertymappingsScopeUsedByList** -```swift - open class func propertymappingsScopeUsedByList(pmUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let pmUuid = 987 // UUID | A UUID string identifying this Scope Mapping. - -PropertymappingsAPI.propertymappingsScopeUsedByList(pmUuid: pmUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pmUuid** | **UUID** | A UUID string identifying this Scope Mapping. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Provider.md b/docs/Provider.md deleted file mode 100644 index e55664a..0000000 --- a/docs/Provider.md +++ /dev/null @@ -1,22 +0,0 @@ -# Provider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProviderEnum.md b/docs/ProviderEnum.md deleted file mode 100644 index f4e7a19..0000000 --- a/docs/ProviderEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ProviderEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProviderModelEnum.md b/docs/ProviderModelEnum.md deleted file mode 100644 index 9e8bc36..0000000 --- a/docs/ProviderModelEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ProviderModelEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProviderRequest.md b/docs/ProviderRequest.md deleted file mode 100644 index c2f96c6..0000000 --- a/docs/ProviderRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProviderTypeEnum.md b/docs/ProviderTypeEnum.md deleted file mode 100644 index 5ae7e60..0000000 --- a/docs/ProviderTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ProviderTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProvidersAPI.md b/docs/ProvidersAPI.md deleted file mode 100644 index b362e41..0000000 --- a/docs/ProvidersAPI.md +++ /dev/null @@ -1,2868 +0,0 @@ -# ProvidersAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**providersAllDestroy**](ProvidersAPI.md#providersalldestroy) | **DELETE** /providers/all/{id}/ | -[**providersAllList**](ProvidersAPI.md#providersalllist) | **GET** /providers/all/ | -[**providersAllRetrieve**](ProvidersAPI.md#providersallretrieve) | **GET** /providers/all/{id}/ | -[**providersAllTypesList**](ProvidersAPI.md#providersalltypeslist) | **GET** /providers/all/types/ | -[**providersAllUsedByList**](ProvidersAPI.md#providersallusedbylist) | **GET** /providers/all/{id}/used_by/ | -[**providersLdapCreate**](ProvidersAPI.md#providersldapcreate) | **POST** /providers/ldap/ | -[**providersLdapDestroy**](ProvidersAPI.md#providersldapdestroy) | **DELETE** /providers/ldap/{id}/ | -[**providersLdapList**](ProvidersAPI.md#providersldaplist) | **GET** /providers/ldap/ | -[**providersLdapPartialUpdate**](ProvidersAPI.md#providersldappartialupdate) | **PATCH** /providers/ldap/{id}/ | -[**providersLdapRetrieve**](ProvidersAPI.md#providersldapretrieve) | **GET** /providers/ldap/{id}/ | -[**providersLdapUpdate**](ProvidersAPI.md#providersldapupdate) | **PUT** /providers/ldap/{id}/ | -[**providersLdapUsedByList**](ProvidersAPI.md#providersldapusedbylist) | **GET** /providers/ldap/{id}/used_by/ | -[**providersOauth2Create**](ProvidersAPI.md#providersoauth2create) | **POST** /providers/oauth2/ | -[**providersOauth2Destroy**](ProvidersAPI.md#providersoauth2destroy) | **DELETE** /providers/oauth2/{id}/ | -[**providersOauth2List**](ProvidersAPI.md#providersoauth2list) | **GET** /providers/oauth2/ | -[**providersOauth2PartialUpdate**](ProvidersAPI.md#providersoauth2partialupdate) | **PATCH** /providers/oauth2/{id}/ | -[**providersOauth2PreviewUserRetrieve**](ProvidersAPI.md#providersoauth2previewuserretrieve) | **GET** /providers/oauth2/{id}/preview_user/ | -[**providersOauth2Retrieve**](ProvidersAPI.md#providersoauth2retrieve) | **GET** /providers/oauth2/{id}/ | -[**providersOauth2SetupUrlsRetrieve**](ProvidersAPI.md#providersoauth2setupurlsretrieve) | **GET** /providers/oauth2/{id}/setup_urls/ | -[**providersOauth2Update**](ProvidersAPI.md#providersoauth2update) | **PUT** /providers/oauth2/{id}/ | -[**providersOauth2UsedByList**](ProvidersAPI.md#providersoauth2usedbylist) | **GET** /providers/oauth2/{id}/used_by/ | -[**providersProxyCreate**](ProvidersAPI.md#providersproxycreate) | **POST** /providers/proxy/ | -[**providersProxyDestroy**](ProvidersAPI.md#providersproxydestroy) | **DELETE** /providers/proxy/{id}/ | -[**providersProxyList**](ProvidersAPI.md#providersproxylist) | **GET** /providers/proxy/ | -[**providersProxyPartialUpdate**](ProvidersAPI.md#providersproxypartialupdate) | **PATCH** /providers/proxy/{id}/ | -[**providersProxyRetrieve**](ProvidersAPI.md#providersproxyretrieve) | **GET** /providers/proxy/{id}/ | -[**providersProxyUpdate**](ProvidersAPI.md#providersproxyupdate) | **PUT** /providers/proxy/{id}/ | -[**providersProxyUsedByList**](ProvidersAPI.md#providersproxyusedbylist) | **GET** /providers/proxy/{id}/used_by/ | -[**providersRadiusCreate**](ProvidersAPI.md#providersradiuscreate) | **POST** /providers/radius/ | -[**providersRadiusDestroy**](ProvidersAPI.md#providersradiusdestroy) | **DELETE** /providers/radius/{id}/ | -[**providersRadiusList**](ProvidersAPI.md#providersradiuslist) | **GET** /providers/radius/ | -[**providersRadiusPartialUpdate**](ProvidersAPI.md#providersradiuspartialupdate) | **PATCH** /providers/radius/{id}/ | -[**providersRadiusRetrieve**](ProvidersAPI.md#providersradiusretrieve) | **GET** /providers/radius/{id}/ | -[**providersRadiusUpdate**](ProvidersAPI.md#providersradiusupdate) | **PUT** /providers/radius/{id}/ | -[**providersRadiusUsedByList**](ProvidersAPI.md#providersradiususedbylist) | **GET** /providers/radius/{id}/used_by/ | -[**providersSamlCreate**](ProvidersAPI.md#providerssamlcreate) | **POST** /providers/saml/ | -[**providersSamlDestroy**](ProvidersAPI.md#providerssamldestroy) | **DELETE** /providers/saml/{id}/ | -[**providersSamlImportMetadataCreate**](ProvidersAPI.md#providerssamlimportmetadatacreate) | **POST** /providers/saml/import_metadata/ | -[**providersSamlList**](ProvidersAPI.md#providerssamllist) | **GET** /providers/saml/ | -[**providersSamlMetadataRetrieve**](ProvidersAPI.md#providerssamlmetadataretrieve) | **GET** /providers/saml/{id}/metadata/ | -[**providersSamlPartialUpdate**](ProvidersAPI.md#providerssamlpartialupdate) | **PATCH** /providers/saml/{id}/ | -[**providersSamlPreviewUserRetrieve**](ProvidersAPI.md#providerssamlpreviewuserretrieve) | **GET** /providers/saml/{id}/preview_user/ | -[**providersSamlRetrieve**](ProvidersAPI.md#providerssamlretrieve) | **GET** /providers/saml/{id}/ | -[**providersSamlUpdate**](ProvidersAPI.md#providerssamlupdate) | **PUT** /providers/saml/{id}/ | -[**providersSamlUsedByList**](ProvidersAPI.md#providerssamlusedbylist) | **GET** /providers/saml/{id}/used_by/ | -[**providersScimCreate**](ProvidersAPI.md#providersscimcreate) | **POST** /providers/scim/ | -[**providersScimDestroy**](ProvidersAPI.md#providersscimdestroy) | **DELETE** /providers/scim/{id}/ | -[**providersScimList**](ProvidersAPI.md#providersscimlist) | **GET** /providers/scim/ | -[**providersScimPartialUpdate**](ProvidersAPI.md#providersscimpartialupdate) | **PATCH** /providers/scim/{id}/ | -[**providersScimRetrieve**](ProvidersAPI.md#providersscimretrieve) | **GET** /providers/scim/{id}/ | -[**providersScimSyncStatusRetrieve**](ProvidersAPI.md#providersscimsyncstatusretrieve) | **GET** /providers/scim/{id}/sync_status/ | -[**providersScimUpdate**](ProvidersAPI.md#providersscimupdate) | **PUT** /providers/scim/{id}/ | -[**providersScimUsedByList**](ProvidersAPI.md#providersscimusedbylist) | **GET** /providers/scim/{id}/used_by/ | - - -# **providersAllDestroy** -```swift - open class func providersAllDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this provider. - -ProvidersAPI.providersAllDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersAllList** -```swift - open class func providersAllList(applicationIsnull: Bool? = nil, backchannelOnly: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedProviderList?, _ error: Error?) -> Void) -``` - - - -Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let applicationIsnull = true // Bool | (optional) -let backchannelOnly = true // Bool | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -ProvidersAPI.providersAllList(applicationIsnull: applicationIsnull, backchannelOnly: backchannelOnly, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationIsnull** | **Bool** | | [optional] - **backchannelOnly** | **Bool** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedProviderList**](PaginatedProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersAllRetrieve** -```swift - open class func providersAllRetrieve(id: Int, completion: @escaping (_ data: Provider?, _ error: Error?) -> Void) -``` - - - -Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this provider. - -ProvidersAPI.providersAllRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this provider. | - -### Return type - -[**Provider**](Provider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersAllTypesList** -```swift - open class func providersAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable provider types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -ProvidersAPI.providersAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersAllUsedByList** -```swift - open class func providersAllUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this provider. - -ProvidersAPI.providersAllUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapCreate** -```swift - open class func providersLdapCreate(lDAPProviderRequest: LDAPProviderRequest, completion: @escaping (_ data: LDAPProvider?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let lDAPProviderRequest = LDAPProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], baseDn: "baseDn_example", searchGroup: 123, certificate: 123, tlsServerName: "tlsServerName_example", uidStartNumber: 123, gidStartNumber: 123, searchMode: LDAPAPIAccessMode(), bindMode: nil, mfaSupport: false) // LDAPProviderRequest | - -ProvidersAPI.providersLdapCreate(lDAPProviderRequest: lDAPProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lDAPProviderRequest** | [**LDAPProviderRequest**](LDAPProviderRequest.md) | | - -### Return type - -[**LDAPProvider**](LDAPProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapDestroy** -```swift - open class func providersLdapDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. - -ProvidersAPI.providersLdapDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapList** -```swift - open class func providersLdapList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, baseDnIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, gidStartNumberIexact: Int? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, searchGroupGroupUuidIexact: UUID? = nil, searchGroupNameIexact: String? = nil, tlsServerNameIexact: String? = nil, uidStartNumberIexact: Int? = nil, completion: @escaping (_ data: PaginatedLDAPProviderList?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let applicationIsnull = true // Bool | (optional) -let authorizationFlowSlugIexact = "authorizationFlowSlugIexact_example" // String | (optional) -let baseDnIexact = "baseDnIexact_example" // String | (optional) -let certificateKpUuidIexact = 987 // UUID | (optional) -let certificateNameIexact = "certificateNameIexact_example" // String | (optional) -let gidStartNumberIexact = 987 // Int | (optional) -let nameIexact = "nameIexact_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let searchGroupGroupUuidIexact = 987 // UUID | (optional) -let searchGroupNameIexact = "searchGroupNameIexact_example" // String | (optional) -let tlsServerNameIexact = "tlsServerNameIexact_example" // String | (optional) -let uidStartNumberIexact = 987 // Int | (optional) - -ProvidersAPI.providersLdapList(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, baseDnIexact: baseDnIexact, certificateKpUuidIexact: certificateKpUuidIexact, certificateNameIexact: certificateNameIexact, gidStartNumberIexact: gidStartNumberIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, search: search, searchGroupGroupUuidIexact: searchGroupGroupUuidIexact, searchGroupNameIexact: searchGroupNameIexact, tlsServerNameIexact: tlsServerNameIexact, uidStartNumberIexact: uidStartNumberIexact) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationIsnull** | **Bool** | | [optional] - **authorizationFlowSlugIexact** | **String** | | [optional] - **baseDnIexact** | **String** | | [optional] - **certificateKpUuidIexact** | **UUID** | | [optional] - **certificateNameIexact** | **String** | | [optional] - **gidStartNumberIexact** | **Int** | | [optional] - **nameIexact** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **searchGroupGroupUuidIexact** | **UUID** | | [optional] - **searchGroupNameIexact** | **String** | | [optional] - **tlsServerNameIexact** | **String** | | [optional] - **uidStartNumberIexact** | **Int** | | [optional] - -### Return type - -[**PaginatedLDAPProviderList**](PaginatedLDAPProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapPartialUpdate** -```swift - open class func providersLdapPartialUpdate(id: Int, patchedLDAPProviderRequest: PatchedLDAPProviderRequest? = nil, completion: @escaping (_ data: LDAPProvider?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. -let patchedLDAPProviderRequest = PatchedLDAPProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], baseDn: "baseDn_example", searchGroup: 123, certificate: 123, tlsServerName: "tlsServerName_example", uidStartNumber: 123, gidStartNumber: 123, searchMode: LDAPAPIAccessMode(), bindMode: nil, mfaSupport: false) // PatchedLDAPProviderRequest | (optional) - -ProvidersAPI.providersLdapPartialUpdate(id: id, patchedLDAPProviderRequest: patchedLDAPProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - **patchedLDAPProviderRequest** | [**PatchedLDAPProviderRequest**](PatchedLDAPProviderRequest.md) | | [optional] - -### Return type - -[**LDAPProvider**](LDAPProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapRetrieve** -```swift - open class func providersLdapRetrieve(id: Int, completion: @escaping (_ data: LDAPProvider?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. - -ProvidersAPI.providersLdapRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - -### Return type - -[**LDAPProvider**](LDAPProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapUpdate** -```swift - open class func providersLdapUpdate(id: Int, lDAPProviderRequest: LDAPProviderRequest, completion: @escaping (_ data: LDAPProvider?, _ error: Error?) -> Void) -``` - - - -LDAPProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. -let lDAPProviderRequest = LDAPProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], baseDn: "baseDn_example", searchGroup: 123, certificate: 123, tlsServerName: "tlsServerName_example", uidStartNumber: 123, gidStartNumber: 123, searchMode: LDAPAPIAccessMode(), bindMode: nil, mfaSupport: false) // LDAPProviderRequest | - -ProvidersAPI.providersLdapUpdate(id: id, lDAPProviderRequest: lDAPProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - **lDAPProviderRequest** | [**LDAPProviderRequest**](LDAPProviderRequest.md) | | - -### Return type - -[**LDAPProvider**](LDAPProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersLdapUsedByList** -```swift - open class func providersLdapUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this LDAP Provider. - -ProvidersAPI.providersLdapUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this LDAP Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2Create** -```swift - open class func providersOauth2Create(oAuth2ProviderRequest: OAuth2ProviderRequest, completion: @escaping (_ data: OAuth2Provider?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let oAuth2ProviderRequest = OAuth2ProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientType: ClientTypeEnum(), clientId: "clientId_example", clientSecret: "clientSecret_example", accessCodeValidity: "accessCodeValidity_example", accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example", includeClaimsInIdToken: false, signingKey: 123, redirectUris: "redirectUris_example", subMode: SubModeEnum(), issuerMode: IssuerModeEnum(), jwksSources: [123]) // OAuth2ProviderRequest | - -ProvidersAPI.providersOauth2Create(oAuth2ProviderRequest: oAuth2ProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **oAuth2ProviderRequest** | [**OAuth2ProviderRequest**](OAuth2ProviderRequest.md) | | - -### Return type - -[**OAuth2Provider**](OAuth2Provider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2Destroy** -```swift - open class func providersOauth2Destroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. - -ProvidersAPI.providersOauth2Destroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2List** -```swift - open class func providersOauth2List(accessCodeValidity: String? = nil, accessTokenValidity: String? = nil, application: UUID? = nil, authorizationFlow: UUID? = nil, clientId: String? = nil, clientType: ClientType_providersOauth2List? = nil, includeClaimsInIdToken: Bool? = nil, issuerMode: IssuerMode_providersOauth2List? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, redirectUris: String? = nil, refreshTokenValidity: String? = nil, search: String? = nil, signingKey: UUID? = nil, subMode: SubMode_providersOauth2List? = nil, completion: @escaping (_ data: PaginatedOAuth2ProviderList?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let accessCodeValidity = "accessCodeValidity_example" // String | (optional) -let accessTokenValidity = "accessTokenValidity_example" // String | (optional) -let application = 987 // UUID | (optional) -let authorizationFlow = 987 // UUID | (optional) -let clientId = "clientId_example" // String | (optional) -let clientType = "clientType_example" // String | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public (optional) -let includeClaimsInIdToken = true // Bool | (optional) -let issuerMode = "issuerMode_example" // String | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let propertyMappings = [123] // [UUID] | (optional) -let redirectUris = "redirectUris_example" // String | (optional) -let refreshTokenValidity = "refreshTokenValidity_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let signingKey = 987 // UUID | (optional) -let subMode = "subMode_example" // String | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. (optional) - -ProvidersAPI.providersOauth2List(accessCodeValidity: accessCodeValidity, accessTokenValidity: accessTokenValidity, application: application, authorizationFlow: authorizationFlow, clientId: clientId, clientType: clientType, includeClaimsInIdToken: includeClaimsInIdToken, issuerMode: issuerMode, name: name, ordering: ordering, page: page, pageSize: pageSize, propertyMappings: propertyMappings, redirectUris: redirectUris, refreshTokenValidity: refreshTokenValidity, search: search, signingKey: signingKey, subMode: subMode) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accessCodeValidity** | **String** | | [optional] - **accessTokenValidity** | **String** | | [optional] - **application** | **UUID** | | [optional] - **authorizationFlow** | **UUID** | | [optional] - **clientId** | **String** | | [optional] - **clientType** | **String** | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] - **includeClaimsInIdToken** | **Bool** | | [optional] - **issuerMode** | **String** | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **propertyMappings** | [**[UUID]**](UUID.md) | | [optional] - **redirectUris** | **String** | | [optional] - **refreshTokenValidity** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **signingKey** | **UUID** | | [optional] - **subMode** | **String** | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_uuid` - Based on user UUID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] - -### Return type - -[**PaginatedOAuth2ProviderList**](PaginatedOAuth2ProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2PartialUpdate** -```swift - open class func providersOauth2PartialUpdate(id: Int, patchedOAuth2ProviderRequest: PatchedOAuth2ProviderRequest? = nil, completion: @escaping (_ data: OAuth2Provider?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. -let patchedOAuth2ProviderRequest = PatchedOAuth2ProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientType: ClientTypeEnum(), clientId: "clientId_example", clientSecret: "clientSecret_example", accessCodeValidity: "accessCodeValidity_example", accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example", includeClaimsInIdToken: false, signingKey: 123, redirectUris: "redirectUris_example", subMode: SubModeEnum(), issuerMode: IssuerModeEnum(), jwksSources: [123]) // PatchedOAuth2ProviderRequest | (optional) - -ProvidersAPI.providersOauth2PartialUpdate(id: id, patchedOAuth2ProviderRequest: patchedOAuth2ProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - **patchedOAuth2ProviderRequest** | [**PatchedOAuth2ProviderRequest**](PatchedOAuth2ProviderRequest.md) | | [optional] - -### Return type - -[**OAuth2Provider**](OAuth2Provider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2PreviewUserRetrieve** -```swift - open class func providersOauth2PreviewUserRetrieve(id: Int, completion: @escaping (_ data: PropertyMappingPreview?, _ error: Error?) -> Void) -``` - - - -Preview user data for provider - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. - -ProvidersAPI.providersOauth2PreviewUserRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - -### Return type - -[**PropertyMappingPreview**](PropertyMappingPreview.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2Retrieve** -```swift - open class func providersOauth2Retrieve(id: Int, completion: @escaping (_ data: OAuth2Provider?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. - -ProvidersAPI.providersOauth2Retrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - -### Return type - -[**OAuth2Provider**](OAuth2Provider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2SetupUrlsRetrieve** -```swift - open class func providersOauth2SetupUrlsRetrieve(id: Int, completion: @escaping (_ data: OAuth2ProviderSetupURLs?, _ error: Error?) -> Void) -``` - - - -Get Providers setup URLs - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. - -ProvidersAPI.providersOauth2SetupUrlsRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - -### Return type - -[**OAuth2ProviderSetupURLs**](OAuth2ProviderSetupURLs.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2Update** -```swift - open class func providersOauth2Update(id: Int, oAuth2ProviderRequest: OAuth2ProviderRequest, completion: @escaping (_ data: OAuth2Provider?, _ error: Error?) -> Void) -``` - - - -OAuth2Provider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. -let oAuth2ProviderRequest = OAuth2ProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientType: ClientTypeEnum(), clientId: "clientId_example", clientSecret: "clientSecret_example", accessCodeValidity: "accessCodeValidity_example", accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example", includeClaimsInIdToken: false, signingKey: 123, redirectUris: "redirectUris_example", subMode: SubModeEnum(), issuerMode: IssuerModeEnum(), jwksSources: [123]) // OAuth2ProviderRequest | - -ProvidersAPI.providersOauth2Update(id: id, oAuth2ProviderRequest: oAuth2ProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - **oAuth2ProviderRequest** | [**OAuth2ProviderRequest**](OAuth2ProviderRequest.md) | | - -### Return type - -[**OAuth2Provider**](OAuth2Provider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersOauth2UsedByList** -```swift - open class func providersOauth2UsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this OAuth2/OpenID Provider. - -ProvidersAPI.providersOauth2UsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this OAuth2/OpenID Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyCreate** -```swift - open class func providersProxyCreate(proxyProviderRequest: ProxyProviderRequest, completion: @escaping (_ data: ProxyProvider?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let proxyProviderRequest = ProxyProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], internalHost: "internalHost_example", externalHost: "externalHost_example", internalHostSslValidation: false, certificate: 123, skipPathRegex: "skipPathRegex_example", basicAuthEnabled: false, basicAuthPasswordAttribute: "basicAuthPasswordAttribute_example", basicAuthUserAttribute: "basicAuthUserAttribute_example", mode: ProxyMode(), interceptHeaderAuth: false, cookieDomain: "cookieDomain_example", jwksSources: [123], accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example") // ProxyProviderRequest | - -ProvidersAPI.providersProxyCreate(proxyProviderRequest: proxyProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **proxyProviderRequest** | [**ProxyProviderRequest**](ProxyProviderRequest.md) | | - -### Return type - -[**ProxyProvider**](ProxyProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyDestroy** -```swift - open class func providersProxyDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. - -ProvidersAPI.providersProxyDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyList** -```swift - open class func providersProxyList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, basicAuthEnabledIexact: Bool? = nil, basicAuthPasswordAttributeIexact: String? = nil, basicAuthUserAttributeIexact: String? = nil, certificateKpUuidIexact: UUID? = nil, certificateNameIexact: String? = nil, cookieDomainIexact: String? = nil, externalHostIexact: String? = nil, internalHostIexact: String? = nil, internalHostSslValidationIexact: Bool? = nil, modeIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappingsIexact: [UUID]? = nil, redirectUrisIexact: String? = nil, search: String? = nil, skipPathRegexIexact: String? = nil, completion: @escaping (_ data: PaginatedProxyProviderList?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let applicationIsnull = true // Bool | (optional) -let authorizationFlowSlugIexact = "authorizationFlowSlugIexact_example" // String | (optional) -let basicAuthEnabledIexact = true // Bool | (optional) -let basicAuthPasswordAttributeIexact = "basicAuthPasswordAttributeIexact_example" // String | (optional) -let basicAuthUserAttributeIexact = "basicAuthUserAttributeIexact_example" // String | (optional) -let certificateKpUuidIexact = 987 // UUID | (optional) -let certificateNameIexact = "certificateNameIexact_example" // String | (optional) -let cookieDomainIexact = "cookieDomainIexact_example" // String | (optional) -let externalHostIexact = "externalHostIexact_example" // String | (optional) -let internalHostIexact = "internalHostIexact_example" // String | (optional) -let internalHostSslValidationIexact = true // Bool | (optional) -let modeIexact = "modeIexact_example" // String | (optional) -let nameIexact = "nameIexact_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let propertyMappingsIexact = [123] // [UUID] | (optional) -let redirectUrisIexact = "redirectUrisIexact_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let skipPathRegexIexact = "skipPathRegexIexact_example" // String | (optional) - -ProvidersAPI.providersProxyList(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, basicAuthEnabledIexact: basicAuthEnabledIexact, basicAuthPasswordAttributeIexact: basicAuthPasswordAttributeIexact, basicAuthUserAttributeIexact: basicAuthUserAttributeIexact, certificateKpUuidIexact: certificateKpUuidIexact, certificateNameIexact: certificateNameIexact, cookieDomainIexact: cookieDomainIexact, externalHostIexact: externalHostIexact, internalHostIexact: internalHostIexact, internalHostSslValidationIexact: internalHostSslValidationIexact, modeIexact: modeIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, propertyMappingsIexact: propertyMappingsIexact, redirectUrisIexact: redirectUrisIexact, search: search, skipPathRegexIexact: skipPathRegexIexact) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationIsnull** | **Bool** | | [optional] - **authorizationFlowSlugIexact** | **String** | | [optional] - **basicAuthEnabledIexact** | **Bool** | | [optional] - **basicAuthPasswordAttributeIexact** | **String** | | [optional] - **basicAuthUserAttributeIexact** | **String** | | [optional] - **certificateKpUuidIexact** | **UUID** | | [optional] - **certificateNameIexact** | **String** | | [optional] - **cookieDomainIexact** | **String** | | [optional] - **externalHostIexact** | **String** | | [optional] - **internalHostIexact** | **String** | | [optional] - **internalHostSslValidationIexact** | **Bool** | | [optional] - **modeIexact** | **String** | | [optional] - **nameIexact** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **propertyMappingsIexact** | [**[UUID]**](UUID.md) | | [optional] - **redirectUrisIexact** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **skipPathRegexIexact** | **String** | | [optional] - -### Return type - -[**PaginatedProxyProviderList**](PaginatedProxyProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyPartialUpdate** -```swift - open class func providersProxyPartialUpdate(id: Int, patchedProxyProviderRequest: PatchedProxyProviderRequest? = nil, completion: @escaping (_ data: ProxyProvider?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. -let patchedProxyProviderRequest = PatchedProxyProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], internalHost: "internalHost_example", externalHost: "externalHost_example", internalHostSslValidation: false, certificate: 123, skipPathRegex: "skipPathRegex_example", basicAuthEnabled: false, basicAuthPasswordAttribute: "basicAuthPasswordAttribute_example", basicAuthUserAttribute: "basicAuthUserAttribute_example", mode: ProxyMode(), interceptHeaderAuth: false, cookieDomain: "cookieDomain_example", jwksSources: [123], accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example") // PatchedProxyProviderRequest | (optional) - -ProvidersAPI.providersProxyPartialUpdate(id: id, patchedProxyProviderRequest: patchedProxyProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - **patchedProxyProviderRequest** | [**PatchedProxyProviderRequest**](PatchedProxyProviderRequest.md) | | [optional] - -### Return type - -[**ProxyProvider**](ProxyProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyRetrieve** -```swift - open class func providersProxyRetrieve(id: Int, completion: @escaping (_ data: ProxyProvider?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. - -ProvidersAPI.providersProxyRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - -### Return type - -[**ProxyProvider**](ProxyProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyUpdate** -```swift - open class func providersProxyUpdate(id: Int, proxyProviderRequest: ProxyProviderRequest, completion: @escaping (_ data: ProxyProvider?, _ error: Error?) -> Void) -``` - - - -ProxyProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. -let proxyProviderRequest = ProxyProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], internalHost: "internalHost_example", externalHost: "externalHost_example", internalHostSslValidation: false, certificate: 123, skipPathRegex: "skipPathRegex_example", basicAuthEnabled: false, basicAuthPasswordAttribute: "basicAuthPasswordAttribute_example", basicAuthUserAttribute: "basicAuthUserAttribute_example", mode: ProxyMode(), interceptHeaderAuth: false, cookieDomain: "cookieDomain_example", jwksSources: [123], accessTokenValidity: "accessTokenValidity_example", refreshTokenValidity: "refreshTokenValidity_example") // ProxyProviderRequest | - -ProvidersAPI.providersProxyUpdate(id: id, proxyProviderRequest: proxyProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - **proxyProviderRequest** | [**ProxyProviderRequest**](ProxyProviderRequest.md) | | - -### Return type - -[**ProxyProvider**](ProxyProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersProxyUsedByList** -```swift - open class func providersProxyUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Proxy Provider. - -ProvidersAPI.providersProxyUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Proxy Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusCreate** -```swift - open class func providersRadiusCreate(radiusProviderRequest: RadiusProviderRequest, completion: @escaping (_ data: RadiusProvider?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let radiusProviderRequest = RadiusProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientNetworks: "clientNetworks_example", sharedSecret: "sharedSecret_example", mfaSupport: false) // RadiusProviderRequest | - -ProvidersAPI.providersRadiusCreate(radiusProviderRequest: radiusProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **radiusProviderRequest** | [**RadiusProviderRequest**](RadiusProviderRequest.md) | | - -### Return type - -[**RadiusProvider**](RadiusProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusDestroy** -```swift - open class func providersRadiusDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. - -ProvidersAPI.providersRadiusDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusList** -```swift - open class func providersRadiusList(applicationIsnull: Bool? = nil, authorizationFlowSlugIexact: String? = nil, clientNetworksIexact: String? = nil, nameIexact: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedRadiusProviderList?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let applicationIsnull = true // Bool | (optional) -let authorizationFlowSlugIexact = "authorizationFlowSlugIexact_example" // String | (optional) -let clientNetworksIexact = "clientNetworksIexact_example" // String | (optional) -let nameIexact = "nameIexact_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -ProvidersAPI.providersRadiusList(applicationIsnull: applicationIsnull, authorizationFlowSlugIexact: authorizationFlowSlugIexact, clientNetworksIexact: clientNetworksIexact, nameIexact: nameIexact, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationIsnull** | **Bool** | | [optional] - **authorizationFlowSlugIexact** | **String** | | [optional] - **clientNetworksIexact** | **String** | | [optional] - **nameIexact** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedRadiusProviderList**](PaginatedRadiusProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusPartialUpdate** -```swift - open class func providersRadiusPartialUpdate(id: Int, patchedRadiusProviderRequest: PatchedRadiusProviderRequest? = nil, completion: @escaping (_ data: RadiusProvider?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. -let patchedRadiusProviderRequest = PatchedRadiusProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientNetworks: "clientNetworks_example", sharedSecret: "sharedSecret_example", mfaSupport: false) // PatchedRadiusProviderRequest | (optional) - -ProvidersAPI.providersRadiusPartialUpdate(id: id, patchedRadiusProviderRequest: patchedRadiusProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - **patchedRadiusProviderRequest** | [**PatchedRadiusProviderRequest**](PatchedRadiusProviderRequest.md) | | [optional] - -### Return type - -[**RadiusProvider**](RadiusProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusRetrieve** -```swift - open class func providersRadiusRetrieve(id: Int, completion: @escaping (_ data: RadiusProvider?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. - -ProvidersAPI.providersRadiusRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - -### Return type - -[**RadiusProvider**](RadiusProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusUpdate** -```swift - open class func providersRadiusUpdate(id: Int, radiusProviderRequest: RadiusProviderRequest, completion: @escaping (_ data: RadiusProvider?, _ error: Error?) -> Void) -``` - - - -RadiusProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. -let radiusProviderRequest = RadiusProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], clientNetworks: "clientNetworks_example", sharedSecret: "sharedSecret_example", mfaSupport: false) // RadiusProviderRequest | - -ProvidersAPI.providersRadiusUpdate(id: id, radiusProviderRequest: radiusProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - **radiusProviderRequest** | [**RadiusProviderRequest**](RadiusProviderRequest.md) | | - -### Return type - -[**RadiusProvider**](RadiusProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersRadiusUsedByList** -```swift - open class func providersRadiusUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this Radius Provider. - -ProvidersAPI.providersRadiusUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this Radius Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlCreate** -```swift - open class func providersSamlCreate(sAMLProviderRequest: SAMLProviderRequest, completion: @escaping (_ data: SAMLProvider?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sAMLProviderRequest = SAMLProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], acsUrl: "acsUrl_example", audience: "audience_example", issuer: "issuer_example", assertionValidNotBefore: "assertionValidNotBefore_example", assertionValidNotOnOrAfter: "assertionValidNotOnOrAfter_example", sessionValidNotOnOrAfter: "sessionValidNotOnOrAfter_example", nameIdMapping: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), signingKp: 123, verificationKp: 123, spBinding: SpBindingEnum(), defaultRelayState: "defaultRelayState_example") // SAMLProviderRequest | - -ProvidersAPI.providersSamlCreate(sAMLProviderRequest: sAMLProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sAMLProviderRequest** | [**SAMLProviderRequest**](SAMLProviderRequest.md) | | - -### Return type - -[**SAMLProvider**](SAMLProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlDestroy** -```swift - open class func providersSamlDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. - -ProvidersAPI.providersSamlDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlImportMetadataCreate** -```swift - open class func providersSamlImportMetadataCreate(name: String, authorizationFlow: UUID, file: URL, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Create provider from SAML Metadata - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | -let authorizationFlow = 987 // UUID | -let file = URL(string: "https://example.com")! // URL | - -ProvidersAPI.providersSamlImportMetadataCreate(name: name, authorizationFlow: authorizationFlow, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | - **authorizationFlow** | **UUID** | | - **file** | **URL** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlList** -```swift - open class func providersSamlList(acsUrl: String? = nil, assertionValidNotBefore: String? = nil, assertionValidNotOnOrAfter: String? = nil, audience: String? = nil, authenticationFlow: UUID? = nil, authorizationFlow: UUID? = nil, backchannelApplication: UUID? = nil, defaultRelayState: String? = nil, digestAlgorithm: DigestAlgorithm_providersSamlList? = nil, isBackchannel: Bool? = nil, issuer: String? = nil, name: String? = nil, nameIdMapping: UUID? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, propertyMappings: [UUID]? = nil, search: String? = nil, sessionValidNotOnOrAfter: String? = nil, signatureAlgorithm: SignatureAlgorithm_providersSamlList? = nil, signingKp: UUID? = nil, spBinding: SpBinding_providersSamlList? = nil, verificationKp: UUID? = nil, completion: @escaping (_ data: PaginatedSAMLProviderList?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let acsUrl = "acsUrl_example" // String | (optional) -let assertionValidNotBefore = "assertionValidNotBefore_example" // String | (optional) -let assertionValidNotOnOrAfter = "assertionValidNotOnOrAfter_example" // String | (optional) -let audience = "audience_example" // String | (optional) -let authenticationFlow = 987 // UUID | (optional) -let authorizationFlow = 987 // UUID | (optional) -let backchannelApplication = 987 // UUID | (optional) -let defaultRelayState = "defaultRelayState_example" // String | (optional) -let digestAlgorithm = "digestAlgorithm_example" // String | * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) -let isBackchannel = true // Bool | (optional) -let issuer = "issuer_example" // String | (optional) -let name = "name_example" // String | (optional) -let nameIdMapping = 987 // UUID | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let propertyMappings = [123] // [UUID] | (optional) -let search = "search_example" // String | A search term. (optional) -let sessionValidNotOnOrAfter = "sessionValidNotOnOrAfter_example" // String | (optional) -let signatureAlgorithm = "signatureAlgorithm_example" // String | * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) -let signingKp = 987 // UUID | (optional) -let spBinding = "spBinding_example" // String | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post (optional) -let verificationKp = 987 // UUID | (optional) - -ProvidersAPI.providersSamlList(acsUrl: acsUrl, assertionValidNotBefore: assertionValidNotBefore, assertionValidNotOnOrAfter: assertionValidNotOnOrAfter, audience: audience, authenticationFlow: authenticationFlow, authorizationFlow: authorizationFlow, backchannelApplication: backchannelApplication, defaultRelayState: defaultRelayState, digestAlgorithm: digestAlgorithm, isBackchannel: isBackchannel, issuer: issuer, name: name, nameIdMapping: nameIdMapping, ordering: ordering, page: page, pageSize: pageSize, propertyMappings: propertyMappings, search: search, sessionValidNotOnOrAfter: sessionValidNotOnOrAfter, signatureAlgorithm: signatureAlgorithm, signingKp: signingKp, spBinding: spBinding, verificationKp: verificationKp) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **acsUrl** | **String** | | [optional] - **assertionValidNotBefore** | **String** | | [optional] - **assertionValidNotOnOrAfter** | **String** | | [optional] - **audience** | **String** | | [optional] - **authenticationFlow** | **UUID** | | [optional] - **authorizationFlow** | **UUID** | | [optional] - **backchannelApplication** | **UUID** | | [optional] - **defaultRelayState** | **String** | | [optional] - **digestAlgorithm** | **String** | * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 | [optional] - **isBackchannel** | **Bool** | | [optional] - **issuer** | **String** | | [optional] - **name** | **String** | | [optional] - **nameIdMapping** | **UUID** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **propertyMappings** | [**[UUID]**](UUID.md) | | [optional] - **search** | **String** | A search term. | [optional] - **sessionValidNotOnOrAfter** | **String** | | [optional] - **signatureAlgorithm** | **String** | * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 | [optional] - **signingKp** | **UUID** | | [optional] - **spBinding** | **String** | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] - **verificationKp** | **UUID** | | [optional] - -### Return type - -[**PaginatedSAMLProviderList**](PaginatedSAMLProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlMetadataRetrieve** -```swift - open class func providersSamlMetadataRetrieve(id: Int, download: Bool? = nil, forceBinding: ForceBinding_providersSamlMetadataRetrieve? = nil, completion: @escaping (_ data: SAMLMetadata?, _ error: Error?) -> Void) -``` - - - -Return metadata as XML string - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. -let download = true // Bool | (optional) -let forceBinding = "forceBinding_example" // String | Optionally force the metadata to only include one binding. (optional) - -ProvidersAPI.providersSamlMetadataRetrieve(id: id, download: download, forceBinding: forceBinding) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - **download** | **Bool** | | [optional] - **forceBinding** | **String** | Optionally force the metadata to only include one binding. | [optional] - -### Return type - -[**SAMLMetadata**](SAMLMetadata.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlPartialUpdate** -```swift - open class func providersSamlPartialUpdate(id: Int, patchedSAMLProviderRequest: PatchedSAMLProviderRequest? = nil, completion: @escaping (_ data: SAMLProvider?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. -let patchedSAMLProviderRequest = PatchedSAMLProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], acsUrl: "acsUrl_example", audience: "audience_example", issuer: "issuer_example", assertionValidNotBefore: "assertionValidNotBefore_example", assertionValidNotOnOrAfter: "assertionValidNotOnOrAfter_example", sessionValidNotOnOrAfter: "sessionValidNotOnOrAfter_example", nameIdMapping: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), signingKp: 123, verificationKp: 123, spBinding: SpBindingEnum(), defaultRelayState: "defaultRelayState_example") // PatchedSAMLProviderRequest | (optional) - -ProvidersAPI.providersSamlPartialUpdate(id: id, patchedSAMLProviderRequest: patchedSAMLProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - **patchedSAMLProviderRequest** | [**PatchedSAMLProviderRequest**](PatchedSAMLProviderRequest.md) | | [optional] - -### Return type - -[**SAMLProvider**](SAMLProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlPreviewUserRetrieve** -```swift - open class func providersSamlPreviewUserRetrieve(id: Int, completion: @escaping (_ data: PropertyMappingPreview?, _ error: Error?) -> Void) -``` - - - -Preview user data for provider - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. - -ProvidersAPI.providersSamlPreviewUserRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - -### Return type - -[**PropertyMappingPreview**](PropertyMappingPreview.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlRetrieve** -```swift - open class func providersSamlRetrieve(id: Int, completion: @escaping (_ data: SAMLProvider?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. - -ProvidersAPI.providersSamlRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - -### Return type - -[**SAMLProvider**](SAMLProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlUpdate** -```swift - open class func providersSamlUpdate(id: Int, sAMLProviderRequest: SAMLProviderRequest, completion: @escaping (_ data: SAMLProvider?, _ error: Error?) -> Void) -``` - - - -SAMLProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. -let sAMLProviderRequest = SAMLProviderRequest(name: "name_example", authenticationFlow: 123, authorizationFlow: 123, propertyMappings: [123], acsUrl: "acsUrl_example", audience: "audience_example", issuer: "issuer_example", assertionValidNotBefore: "assertionValidNotBefore_example", assertionValidNotOnOrAfter: "assertionValidNotOnOrAfter_example", sessionValidNotOnOrAfter: "sessionValidNotOnOrAfter_example", nameIdMapping: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), signingKp: 123, verificationKp: 123, spBinding: SpBindingEnum(), defaultRelayState: "defaultRelayState_example") // SAMLProviderRequest | - -ProvidersAPI.providersSamlUpdate(id: id, sAMLProviderRequest: sAMLProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - **sAMLProviderRequest** | [**SAMLProviderRequest**](SAMLProviderRequest.md) | | - -### Return type - -[**SAMLProvider**](SAMLProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersSamlUsedByList** -```swift - open class func providersSamlUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SAML Provider. - -ProvidersAPI.providersSamlUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SAML Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimCreate** -```swift - open class func providersScimCreate(sCIMProviderRequest: SCIMProviderRequest, completion: @escaping (_ data: SCIMProvider?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sCIMProviderRequest = SCIMProviderRequest(name: "name_example", propertyMappings: [123], propertyMappingsGroup: [123], url: "url_example", token: "token_example", excludeUsersServiceAccount: false, filterGroup: 123) // SCIMProviderRequest | - -ProvidersAPI.providersScimCreate(sCIMProviderRequest: sCIMProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sCIMProviderRequest** | [**SCIMProviderRequest**](SCIMProviderRequest.md) | | - -### Return type - -[**SCIMProvider**](SCIMProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimDestroy** -```swift - open class func providersScimDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. - -ProvidersAPI.providersScimDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimList** -```swift - open class func providersScimList(excludeUsersServiceAccount: Bool? = nil, filterGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, url: String? = nil, completion: @escaping (_ data: PaginatedSCIMProviderList?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let excludeUsersServiceAccount = true // Bool | (optional) -let filterGroup = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let url = "url_example" // String | (optional) - -ProvidersAPI.providersScimList(excludeUsersServiceAccount: excludeUsersServiceAccount, filterGroup: filterGroup, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, url: url) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **excludeUsersServiceAccount** | **Bool** | | [optional] - **filterGroup** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **url** | **String** | | [optional] - -### Return type - -[**PaginatedSCIMProviderList**](PaginatedSCIMProviderList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimPartialUpdate** -```swift - open class func providersScimPartialUpdate(id: Int, patchedSCIMProviderRequest: PatchedSCIMProviderRequest? = nil, completion: @escaping (_ data: SCIMProvider?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. -let patchedSCIMProviderRequest = PatchedSCIMProviderRequest(name: "name_example", propertyMappings: [123], propertyMappingsGroup: [123], url: "url_example", token: "token_example", excludeUsersServiceAccount: false, filterGroup: 123) // PatchedSCIMProviderRequest | (optional) - -ProvidersAPI.providersScimPartialUpdate(id: id, patchedSCIMProviderRequest: patchedSCIMProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - **patchedSCIMProviderRequest** | [**PatchedSCIMProviderRequest**](PatchedSCIMProviderRequest.md) | | [optional] - -### Return type - -[**SCIMProvider**](SCIMProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimRetrieve** -```swift - open class func providersScimRetrieve(id: Int, completion: @escaping (_ data: SCIMProvider?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. - -ProvidersAPI.providersScimRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - -### Return type - -[**SCIMProvider**](SCIMProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimSyncStatusRetrieve** -```swift - open class func providersScimSyncStatusRetrieve(id: Int, completion: @escaping (_ data: Task?, _ error: Error?) -> Void) -``` - - - -Get provider's sync status - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. - -ProvidersAPI.providersScimSyncStatusRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimUpdate** -```swift - open class func providersScimUpdate(id: Int, sCIMProviderRequest: SCIMProviderRequest, completion: @escaping (_ data: SCIMProvider?, _ error: Error?) -> Void) -``` - - - -SCIMProvider Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. -let sCIMProviderRequest = SCIMProviderRequest(name: "name_example", propertyMappings: [123], propertyMappingsGroup: [123], url: "url_example", token: "token_example", excludeUsersServiceAccount: false, filterGroup: 123) // SCIMProviderRequest | - -ProvidersAPI.providersScimUpdate(id: id, sCIMProviderRequest: sCIMProviderRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - **sCIMProviderRequest** | [**SCIMProviderRequest**](SCIMProviderRequest.md) | | - -### Return type - -[**SCIMProvider**](SCIMProvider.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **providersScimUsedByList** -```swift - open class func providersScimUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this SCIM Provider. - -ProvidersAPI.providersScimUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this SCIM Provider. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ProxyMode.md b/docs/ProxyMode.md deleted file mode 100644 index 9dd9b5b..0000000 --- a/docs/ProxyMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# ProxyMode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProxyOutpostConfig.md b/docs/ProxyOutpostConfig.md deleted file mode 100644 index deb961a..0000000 --- a/docs/ProxyOutpostConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# ProxyOutpostConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**internalHost** | **String** | | [optional] -**externalHost** | **String** | | -**internalHostSslValidation** | **Bool** | Validate SSL Certificates of upstream servers | [optional] -**clientId** | **String** | | [optional] -**clientSecret** | **String** | | [optional] -**oidcConfiguration** | [**OpenIDConnectConfiguration**](OpenIDConnectConfiguration.md) | | [readonly] -**cookieSecret** | **String** | | [optional] -**certificate** | **UUID** | | [optional] -**skipPathRegex** | **String** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] -**basicAuthEnabled** | **Bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] -**basicAuthPasswordAttribute** | **String** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] -**basicAuthUserAttribute** | **String** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**mode** | [**ProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] -**cookieDomain** | **String** | | [optional] -**accessTokenValidity** | **Double** | Get token validity as second count | [readonly] -**interceptHeaderAuth** | **Bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] -**scopesToRequest** | **[String]** | Get all the scope names the outpost should request, including custom-defined ones | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProxyProvider.md b/docs/ProxyProvider.md deleted file mode 100644 index 16f89e8..0000000 --- a/docs/ProxyProvider.md +++ /dev/null @@ -1,39 +0,0 @@ -# ProxyProvider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**clientId** | **String** | | [readonly] -**internalHost** | **String** | | [optional] -**externalHost** | **String** | | -**internalHostSslValidation** | **Bool** | Validate SSL Certificates of upstream servers | [optional] -**certificate** | **UUID** | | [optional] -**skipPathRegex** | **String** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] -**basicAuthEnabled** | **Bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] -**basicAuthPasswordAttribute** | **String** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] -**basicAuthUserAttribute** | **String** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**mode** | [**ProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] -**interceptHeaderAuth** | **Bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] -**redirectUris** | **String** | | [readonly] -**cookieDomain** | **String** | | [optional] -**jwksSources** | **[UUID]** | | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**outpostSet** | **[String]** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProxyProviderRequest.md b/docs/ProxyProviderRequest.md deleted file mode 100644 index fed15d1..0000000 --- a/docs/ProxyProviderRequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# ProxyProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**internalHost** | **String** | | [optional] -**externalHost** | **String** | | -**internalHostSslValidation** | **Bool** | Validate SSL Certificates of upstream servers | [optional] -**certificate** | **UUID** | | [optional] -**skipPathRegex** | **String** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] -**basicAuthEnabled** | **Bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] -**basicAuthPasswordAttribute** | **String** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] -**basicAuthUserAttribute** | **String** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**mode** | [**ProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] -**interceptHeaderAuth** | **Bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] -**cookieDomain** | **String** | | [optional] -**jwksSources** | **[UUID]** | | [optional] -**accessTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**refreshTokenValidity** | **String** | Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RadiusOutpostConfig.md b/docs/RadiusOutpostConfig.md deleted file mode 100644 index 890b809..0000000 --- a/docs/RadiusOutpostConfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# RadiusOutpostConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**applicationSlug** | **String** | | -**authFlowSlug** | **String** | | -**clientNetworks** | **String** | List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. | [optional] -**sharedSecret** | **String** | Shared secret between clients and server to hash packets. | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RadiusProvider.md b/docs/RadiusProvider.md deleted file mode 100644 index c4b991e..0000000 --- a/docs/RadiusProvider.md +++ /dev/null @@ -1,26 +0,0 @@ -# RadiusProvider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**clientNetworks** | **String** | List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. | [optional] -**sharedSecret** | **String** | Shared secret between clients and server to hash packets. | [optional] -**outpostSet** | **[String]** | | [readonly] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RadiusProviderRequest.md b/docs/RadiusProviderRequest.md deleted file mode 100644 index b989d00..0000000 --- a/docs/RadiusProviderRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# RadiusProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**clientNetworks** | **String** | List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped. | [optional] -**sharedSecret** | **String** | Shared secret between clients and server to hash packets. | [optional] -**mfaSupport** | **Bool** | When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RbacAPI.md b/docs/RbacAPI.md deleted file mode 100644 index 0e19fe4..0000000 --- a/docs/RbacAPI.md +++ /dev/null @@ -1,930 +0,0 @@ -# RbacAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**rbacPermissionsAssignedByRolesAssignCreate**](RbacAPI.md#rbacpermissionsassignedbyrolesassigncreate) | **POST** /rbac/permissions/assigned_by_roles/{uuid}/assign/ | -[**rbacPermissionsAssignedByRolesList**](RbacAPI.md#rbacpermissionsassignedbyroleslist) | **GET** /rbac/permissions/assigned_by_roles/ | -[**rbacPermissionsAssignedByRolesUnassignPartialUpdate**](RbacAPI.md#rbacpermissionsassignedbyrolesunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_roles/{uuid}/unassign/ | -[**rbacPermissionsAssignedByUsersAssignCreate**](RbacAPI.md#rbacpermissionsassignedbyusersassigncreate) | **POST** /rbac/permissions/assigned_by_users/{id}/assign/ | -[**rbacPermissionsAssignedByUsersList**](RbacAPI.md#rbacpermissionsassignedbyuserslist) | **GET** /rbac/permissions/assigned_by_users/ | -[**rbacPermissionsAssignedByUsersUnassignPartialUpdate**](RbacAPI.md#rbacpermissionsassignedbyusersunassignpartialupdate) | **PATCH** /rbac/permissions/assigned_by_users/{id}/unassign/ | -[**rbacPermissionsList**](RbacAPI.md#rbacpermissionslist) | **GET** /rbac/permissions/ | -[**rbacPermissionsRetrieve**](RbacAPI.md#rbacpermissionsretrieve) | **GET** /rbac/permissions/{id}/ | -[**rbacPermissionsRolesList**](RbacAPI.md#rbacpermissionsroleslist) | **GET** /rbac/permissions/roles/ | -[**rbacPermissionsUsersList**](RbacAPI.md#rbacpermissionsuserslist) | **GET** /rbac/permissions/users/ | -[**rbacRolesCreate**](RbacAPI.md#rbacrolescreate) | **POST** /rbac/roles/ | -[**rbacRolesDestroy**](RbacAPI.md#rbacrolesdestroy) | **DELETE** /rbac/roles/{uuid}/ | -[**rbacRolesList**](RbacAPI.md#rbacroleslist) | **GET** /rbac/roles/ | -[**rbacRolesPartialUpdate**](RbacAPI.md#rbacrolespartialupdate) | **PATCH** /rbac/roles/{uuid}/ | -[**rbacRolesRetrieve**](RbacAPI.md#rbacrolesretrieve) | **GET** /rbac/roles/{uuid}/ | -[**rbacRolesUpdate**](RbacAPI.md#rbacrolesupdate) | **PUT** /rbac/roles/{uuid}/ | -[**rbacRolesUsedByList**](RbacAPI.md#rbacrolesusedbylist) | **GET** /rbac/roles/{uuid}/used_by/ | - - -# **rbacPermissionsAssignedByRolesAssignCreate** -```swift - open class func rbacPermissionsAssignedByRolesAssignCreate(uuid: UUID, permissionAssignRequest: PermissionAssignRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Assign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. -let permissionAssignRequest = PermissionAssignRequest(permissions: ["permissions_example"], model: ModelEnum(), objectPk: "objectPk_example") // PermissionAssignRequest | - -RbacAPI.rbacPermissionsAssignedByRolesAssignCreate(uuid: uuid, permissionAssignRequest: permissionAssignRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - **permissionAssignRequest** | [**PermissionAssignRequest**](PermissionAssignRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsAssignedByRolesList** -```swift - open class func rbacPermissionsAssignedByRolesList(model: Model_rbacPermissionsAssignedByRolesList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedRoleAssignedObjectPermissionList?, _ error: Error?) -> Void) -``` - - - -Get assigned object permissions for a single object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let model = "model_example" // String | * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License -let objectPk = "objectPk_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -RbacAPI.rbacPermissionsAssignedByRolesList(model: model, objectPk: objectPk, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **model** | **String** | * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License | - **objectPk** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedRoleAssignedObjectPermissionList**](PaginatedRoleAssignedObjectPermissionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsAssignedByRolesUnassignPartialUpdate** -```swift - open class func rbacPermissionsAssignedByRolesUnassignPartialUpdate(uuid: UUID, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Unassign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. -let patchedPermissionAssignRequest = PatchedPermissionAssignRequest(permissions: ["permissions_example"], model: ModelEnum(), objectPk: "objectPk_example") // PatchedPermissionAssignRequest | (optional) - -RbacAPI.rbacPermissionsAssignedByRolesUnassignPartialUpdate(uuid: uuid, patchedPermissionAssignRequest: patchedPermissionAssignRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - **patchedPermissionAssignRequest** | [**PatchedPermissionAssignRequest**](PatchedPermissionAssignRequest.md) | | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsAssignedByUsersAssignCreate** -```swift - open class func rbacPermissionsAssignedByUsersAssignCreate(id: Int, permissionAssignRequest: PermissionAssignRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Assign permission(s) to user - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. -let permissionAssignRequest = PermissionAssignRequest(permissions: ["permissions_example"], model: ModelEnum(), objectPk: "objectPk_example") // PermissionAssignRequest | - -RbacAPI.rbacPermissionsAssignedByUsersAssignCreate(id: id, permissionAssignRequest: permissionAssignRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - **permissionAssignRequest** | [**PermissionAssignRequest**](PermissionAssignRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsAssignedByUsersList** -```swift - open class func rbacPermissionsAssignedByUsersList(model: Model_rbacPermissionsAssignedByUsersList, objectPk: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedUserAssignedObjectPermissionList?, _ error: Error?) -> Void) -``` - - - -Get assigned object permissions for a single object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let model = "model_example" // String | * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License -let objectPk = "objectPk_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -RbacAPI.rbacPermissionsAssignedByUsersList(model: model, objectPk: objectPk, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **model** | **String** | * `authentik_crypto.certificatekeypair` - Certificate-Key Pair * `authentik_events.event` - Event * `authentik_events.notificationtransport` - Notification Transport * `authentik_events.notification` - Notification * `authentik_events.notificationrule` - Notification Rule * `authentik_events.notificationwebhookmapping` - Webhook Mapping * `authentik_flows.flow` - Flow * `authentik_flows.flowstagebinding` - Flow Stage Binding * `authentik_outposts.dockerserviceconnection` - Docker Service-Connection * `authentik_outposts.kubernetesserviceconnection` - Kubernetes Service-Connection * `authentik_outposts.outpost` - Outpost * `authentik_policies_dummy.dummypolicy` - Dummy Policy * `authentik_policies_event_matcher.eventmatcherpolicy` - Event Matcher Policy * `authentik_policies_expiry.passwordexpirypolicy` - Password Expiry Policy * `authentik_policies_expression.expressionpolicy` - Expression Policy * `authentik_policies_password.passwordpolicy` - Password Policy * `authentik_policies_reputation.reputationpolicy` - Reputation Policy * `authentik_policies_reputation.reputation` - Reputation Score * `authentik_policies.policybinding` - Policy Binding * `authentik_providers_ldap.ldapprovider` - LDAP Provider * `authentik_providers_oauth2.scopemapping` - Scope Mapping * `authentik_providers_oauth2.oauth2provider` - OAuth2/OpenID Provider * `authentik_providers_oauth2.authorizationcode` - Authorization Code * `authentik_providers_oauth2.accesstoken` - OAuth2 Access Token * `authentik_providers_oauth2.refreshtoken` - OAuth2 Refresh Token * `authentik_providers_proxy.proxyprovider` - Proxy Provider * `authentik_providers_radius.radiusprovider` - Radius Provider * `authentik_providers_saml.samlprovider` - SAML Provider * `authentik_providers_saml.samlpropertymapping` - SAML Property Mapping * `authentik_providers_scim.scimprovider` - SCIM Provider * `authentik_providers_scim.scimmapping` - SCIM Mapping * `authentik_rbac.role` - Role * `authentik_sources_ldap.ldapsource` - LDAP Source * `authentik_sources_ldap.ldappropertymapping` - LDAP Property Mapping * `authentik_sources_oauth.oauthsource` - OAuth Source * `authentik_sources_oauth.useroauthsourceconnection` - User OAuth Source Connection * `authentik_sources_plex.plexsource` - Plex Source * `authentik_sources_plex.plexsourceconnection` - User Plex Source Connection * `authentik_sources_saml.samlsource` - SAML Source * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage * `authentik_stages_authenticator_static.staticdevice` - Static Device * `authentik_stages_authenticator_totp.authenticatortotpstage` - TOTP Authenticator Setup Stage * `authentik_stages_authenticator_totp.totpdevice` - TOTP Device * `authentik_stages_authenticator_validate.authenticatorvalidatestage` - Authenticator Validation Stage * `authentik_stages_authenticator_webauthn.authenticatewebauthnstage` - WebAuthn Authenticator Setup Stage * `authentik_stages_authenticator_webauthn.webauthndevice` - WebAuthn Device * `authentik_stages_captcha.captchastage` - Captcha Stage * `authentik_stages_consent.consentstage` - Consent Stage * `authentik_stages_consent.userconsent` - User Consent * `authentik_stages_deny.denystage` - Deny Stage * `authentik_stages_dummy.dummystage` - Dummy Stage * `authentik_stages_email.emailstage` - Email Stage * `authentik_stages_identification.identificationstage` - Identification Stage * `authentik_stages_invitation.invitationstage` - Invitation Stage * `authentik_stages_invitation.invitation` - Invitation * `authentik_stages_password.passwordstage` - Password Stage * `authentik_stages_prompt.prompt` - Prompt * `authentik_stages_prompt.promptstage` - Prompt Stage * `authentik_stages_user_delete.userdeletestage` - User Delete Stage * `authentik_stages_user_login.userloginstage` - User Login Stage * `authentik_stages_user_logout.userlogoutstage` - User Logout Stage * `authentik_stages_user_write.userwritestage` - User Write Stage * `authentik_tenants.tenant` - Tenant * `authentik_blueprints.blueprintinstance` - Blueprint Instance * `authentik_core.group` - Group * `authentik_core.user` - User * `authentik_core.application` - Application * `authentik_core.token` - Token * `authentik_enterprise.license` - License | - **objectPk** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedUserAssignedObjectPermissionList**](PaginatedUserAssignedObjectPermissionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsAssignedByUsersUnassignPartialUpdate** -```swift - open class func rbacPermissionsAssignedByUsersUnassignPartialUpdate(id: Int, patchedPermissionAssignRequest: PatchedPermissionAssignRequest? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Unassign permission(s) to user. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User. -let patchedPermissionAssignRequest = PatchedPermissionAssignRequest(permissions: ["permissions_example"], model: ModelEnum(), objectPk: "objectPk_example") // PatchedPermissionAssignRequest | (optional) - -RbacAPI.rbacPermissionsAssignedByUsersUnassignPartialUpdate(id: id, patchedPermissionAssignRequest: patchedPermissionAssignRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User. | - **patchedPermissionAssignRequest** | [**PatchedPermissionAssignRequest**](PatchedPermissionAssignRequest.md) | | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsList** -```swift - open class func rbacPermissionsList(codename: String? = nil, contentTypeAppLabel: String? = nil, contentTypeModel: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, role: String? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedPermissionList?, _ error: Error?) -> Void) -``` - - - -Read-only list of all permissions, filterable by model and app - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let codename = "codename_example" // String | (optional) -let contentTypeAppLabel = "contentTypeAppLabel_example" // String | (optional) -let contentTypeModel = "contentTypeModel_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let role = "role_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -RbacAPI.rbacPermissionsList(codename: codename, contentTypeAppLabel: contentTypeAppLabel, contentTypeModel: contentTypeModel, ordering: ordering, page: page, pageSize: pageSize, role: role, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **codename** | **String** | | [optional] - **contentTypeAppLabel** | **String** | | [optional] - **contentTypeModel** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **role** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedPermissionList**](PaginatedPermissionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsRetrieve** -```swift - open class func rbacPermissionsRetrieve(id: Int, completion: @escaping (_ data: Permission?, _ error: Error?) -> Void) -``` - - - -Read-only list of all permissions, filterable by model and app - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this permission. - -RbacAPI.rbacPermissionsRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this permission. | - -### Return type - -[**Permission**](Permission.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsRolesList** -```swift - open class func rbacPermissionsRolesList(uuid: UUID, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedExtraRoleObjectPermissionList?, _ error: Error?) -> Void) -``` - - - -Get a role's assigned object permissions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -RbacAPI.rbacPermissionsRolesList(uuid: uuid, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | | - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedExtraRoleObjectPermissionList**](PaginatedExtraRoleObjectPermissionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacPermissionsUsersList** -```swift - open class func rbacPermissionsUsersList(userId: Int, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedExtraUserObjectPermissionList?, _ error: Error?) -> Void) -``` - - - -Get a users's assigned object permissions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userId = 987 // Int | -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -RbacAPI.rbacPermissionsUsersList(userId: userId, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **Int** | | - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedExtraUserObjectPermissionList**](PaginatedExtraUserObjectPermissionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesCreate** -```swift - open class func rbacRolesCreate(roleRequest: RoleRequest, completion: @escaping (_ data: Role?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let roleRequest = RoleRequest(name: "name_example") // RoleRequest | - -RbacAPI.rbacRolesCreate(roleRequest: roleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **roleRequest** | [**RoleRequest**](RoleRequest.md) | | - -### Return type - -[**Role**](Role.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesDestroy** -```swift - open class func rbacRolesDestroy(uuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. - -RbacAPI.rbacRolesDestroy(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesList** -```swift - open class func rbacRolesList(groupName: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedRoleList?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let groupName = "groupName_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -RbacAPI.rbacRolesList(groupName: groupName, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **groupName** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedRoleList**](PaginatedRoleList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesPartialUpdate** -```swift - open class func rbacRolesPartialUpdate(uuid: UUID, patchedRoleRequest: PatchedRoleRequest? = nil, completion: @escaping (_ data: Role?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. -let patchedRoleRequest = PatchedRoleRequest(name: "name_example") // PatchedRoleRequest | (optional) - -RbacAPI.rbacRolesPartialUpdate(uuid: uuid, patchedRoleRequest: patchedRoleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - **patchedRoleRequest** | [**PatchedRoleRequest**](PatchedRoleRequest.md) | | [optional] - -### Return type - -[**Role**](Role.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesRetrieve** -```swift - open class func rbacRolesRetrieve(uuid: UUID, completion: @escaping (_ data: Role?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. - -RbacAPI.rbacRolesRetrieve(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - -### Return type - -[**Role**](Role.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesUpdate** -```swift - open class func rbacRolesUpdate(uuid: UUID, roleRequest: RoleRequest, completion: @escaping (_ data: Role?, _ error: Error?) -> Void) -``` - - - -Role viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. -let roleRequest = RoleRequest(name: "name_example") // RoleRequest | - -RbacAPI.rbacRolesUpdate(uuid: uuid, roleRequest: roleRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - **roleRequest** | [**RoleRequest**](RoleRequest.md) | | - -### Return type - -[**Role**](Role.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rbacRolesUsedByList** -```swift - open class func rbacRolesUsedByList(uuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let uuid = 987 // UUID | A UUID string identifying this Role. - -RbacAPI.rbacRolesUsedByList(uuid: uuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uuid** | **UUID** | A UUID string identifying this Role. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/RedirectChallenge.md b/docs/RedirectChallenge.md deleted file mode 100644 index 1a7e8d5..0000000 --- a/docs/RedirectChallenge.md +++ /dev/null @@ -1,14 +0,0 @@ -# RedirectChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "xak-flow-redirect"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**to** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Reputation.md b/docs/Reputation.md deleted file mode 100644 index e72c7dd..0000000 --- a/docs/Reputation.md +++ /dev/null @@ -1,15 +0,0 @@ -# Reputation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [optional] -**identifier** | **String** | | -**ip** | **String** | | -**ipGeoData** | [String: AnyCodable] | | [optional] -**score** | **Int64** | | [optional] -**updated** | **Date** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ReputationPolicy.md b/docs/ReputationPolicy.md deleted file mode 100644 index 35b2acd..0000000 --- a/docs/ReputationPolicy.md +++ /dev/null @@ -1,20 +0,0 @@ -# ReputationPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**boundTo** | **Int** | Return objects policy is bound to | [readonly] -**checkIp** | **Bool** | | [optional] -**checkUsername** | **Bool** | | [optional] -**threshold** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ReputationPolicyRequest.md b/docs/ReputationPolicyRequest.md deleted file mode 100644 index f362963..0000000 --- a/docs/ReputationPolicyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReputationPolicyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**executionLogging** | **Bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**checkIp** | **Bool** | | [optional] -**checkUsername** | **Bool** | | [optional] -**threshold** | **Int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResidentKeyRequirementEnum.md b/docs/ResidentKeyRequirementEnum.md deleted file mode 100644 index a2131c4..0000000 --- a/docs/ResidentKeyRequirementEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResidentKeyRequirementEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Role.md b/docs/Role.md deleted file mode 100644 index 0b1b242..0000000 --- a/docs/Role.md +++ /dev/null @@ -1,11 +0,0 @@ -# Role - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RoleAssignedObjectPermission.md b/docs/RoleAssignedObjectPermission.md deleted file mode 100644 index df37a11..0000000 --- a/docs/RoleAssignedObjectPermission.md +++ /dev/null @@ -1,12 +0,0 @@ -# RoleAssignedObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rolePk** | **String** | | [readonly] -**name** | **String** | | [readonly] -**permissions** | [RoleObjectPermission] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RoleObjectPermission.md b/docs/RoleObjectPermission.md deleted file mode 100644 index e8de2df..0000000 --- a/docs/RoleObjectPermission.md +++ /dev/null @@ -1,15 +0,0 @@ -# RoleObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int** | | [readonly] -**codename** | **String** | | [readonly] -**model** | **String** | | [readonly] -**appLabel** | **String** | | [readonly] -**objectPk** | **String** | | [readonly] -**name** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RoleRequest.md b/docs/RoleRequest.md deleted file mode 100644 index c7e646e..0000000 --- a/docs/RoleRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# RoleRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RootAPI.md b/docs/RootAPI.md deleted file mode 100644 index 6f1e597..0000000 --- a/docs/RootAPI.md +++ /dev/null @@ -1,54 +0,0 @@ -# RootAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**rootConfigRetrieve**](RootAPI.md#rootconfigretrieve) | **GET** /root/config/ | - - -# **rootConfigRetrieve** -```swift - open class func rootConfigRetrieve(completion: @escaping (_ data: Config?, _ error: Error?) -> Void) -``` - - - -Retrieve public configuration options - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -RootAPI.rootConfigRetrieve() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Config**](Config.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/SAMLMetadata.md b/docs/SAMLMetadata.md deleted file mode 100644 index f97b4e1..0000000 --- a/docs/SAMLMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# SAMLMetadata - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**metadata** | **String** | | [readonly] -**downloadUrl** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLPropertyMapping.md b/docs/SAMLPropertyMapping.md deleted file mode 100644 index ec68126..0000000 --- a/docs/SAMLPropertyMapping.md +++ /dev/null @@ -1,19 +0,0 @@ -# SAMLPropertyMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**component** | **String** | Get object's component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**samlName** | **String** | | -**friendlyName** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLPropertyMappingRequest.md b/docs/SAMLPropertyMappingRequest.md deleted file mode 100644 index e616b67..0000000 --- a/docs/SAMLPropertyMappingRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# SAMLPropertyMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**samlName** | **String** | | -**friendlyName** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLProvider.md b/docs/SAMLProvider.md deleted file mode 100644 index 7e0e9c6..0000000 --- a/docs/SAMLProvider.md +++ /dev/null @@ -1,41 +0,0 @@ -# SAMLProvider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedApplicationName** | **String** | Application's display Name. | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**acsUrl** | **String** | | -**audience** | **String** | Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. | [optional] -**issuer** | **String** | Also known as EntityID | [optional] -**assertionValidNotBefore** | **String** | Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). | [optional] -**assertionValidNotOnOrAfter** | **String** | Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**sessionValidNotOnOrAfter** | **String** | Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**nameIdMapping** | **UUID** | Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**spBinding** | [**SpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] -**defaultRelayState** | **String** | Default relay_state value for IDP-initiated logins | [optional] -**urlDownloadMetadata** | **String** | Get metadata download URL | [readonly] -**urlSsoPost** | **String** | Get SSO Post URL | [readonly] -**urlSsoRedirect** | **String** | Get SSO Redirect URL | [readonly] -**urlSsoInit** | **String** | Get SSO IDP-Initiated URL | [readonly] -**urlSloPost** | **String** | Get SLO POST URL | [readonly] -**urlSloRedirect** | **String** | Get SLO redirect URL | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLProviderRequest.md b/docs/SAMLProviderRequest.md deleted file mode 100644 index 84a0ba4..0000000 --- a/docs/SAMLProviderRequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# SAMLProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**authenticationFlow** | **UUID** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**authorizationFlow** | **UUID** | Flow used when authorizing this provider. | -**propertyMappings** | **[UUID]** | | [optional] -**acsUrl** | **String** | | -**audience** | **String** | Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. | [optional] -**issuer** | **String** | Also known as EntityID | [optional] -**assertionValidNotBefore** | **String** | Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). | [optional] -**assertionValidNotOnOrAfter** | **String** | Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**sessionValidNotOnOrAfter** | **String** | Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] -**nameIdMapping** | **UUID** | Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**spBinding** | [**SpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] -**defaultRelayState** | **String** | Default relay_state value for IDP-initiated logins | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLSource.md b/docs/SAMLSource.md deleted file mode 100644 index 0b9f7ef..0000000 --- a/docs/SAMLSource.md +++ /dev/null @@ -1,36 +0,0 @@ -# SAMLSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**userPathTemplate** | **String** | | [optional] -**icon** | **String** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] -**preAuthenticationFlow** | **UUID** | Flow used before authentication. | -**issuer** | **String** | Also known as Entity ID. Defaults the Metadata URL. | [optional] -**ssoUrl** | **String** | URL that the initial Login request is sent to. | -**sloUrl** | **String** | Optional URL if your IDP supports Single-Logout. | [optional] -**allowIdpInitiated** | **Bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**nameIdPolicy** | [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] -**bindingType** | [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Identity Provider. | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**temporaryUserDeleteAfter** | **String** | Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SAMLSourceRequest.md b/docs/SAMLSourceRequest.md deleted file mode 100644 index f617e4b..0000000 --- a/docs/SAMLSourceRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# SAMLSourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] -**preAuthenticationFlow** | **UUID** | Flow used before authentication. | -**issuer** | **String** | Also known as Entity ID. Defaults the Metadata URL. | [optional] -**ssoUrl** | **String** | URL that the initial Login request is sent to. | -**sloUrl** | **String** | Optional URL if your IDP supports Single-Logout. | [optional] -**allowIdpInitiated** | **Bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**nameIdPolicy** | [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] -**bindingType** | [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] -**verificationKp** | **UUID** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**signingKp** | **UUID** | Keypair used to sign outgoing Responses going to the Identity Provider. | [optional] -**digestAlgorithm** | [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] -**signatureAlgorithm** | [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] -**temporaryUserDeleteAfter** | **String** | Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SCIMMapping.md b/docs/SCIMMapping.md deleted file mode 100644 index 844ff9f..0000000 --- a/docs/SCIMMapping.md +++ /dev/null @@ -1,17 +0,0 @@ -# SCIMMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**component** | **String** | Get object's component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SCIMMappingRequest.md b/docs/SCIMMappingRequest.md deleted file mode 100644 index 91a8a11..0000000 --- a/docs/SCIMMappingRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# SCIMMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SCIMProvider.md b/docs/SCIMProvider.md deleted file mode 100644 index 6bd1c66..0000000 --- a/docs/SCIMProvider.md +++ /dev/null @@ -1,23 +0,0 @@ -# SCIMProvider - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**assignedBackchannelApplicationSlug** | **String** | Internal application name, used in URLs. | [readonly] -**assignedBackchannelApplicationName** | **String** | Application's display Name. | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**url** | **String** | Base URL to SCIM requests, usually ends in /v2 | -**token** | **String** | Authentication token | -**excludeUsersServiceAccount** | **Bool** | | [optional] -**filterGroup** | **UUID** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SCIMProviderRequest.md b/docs/SCIMProviderRequest.md deleted file mode 100644 index eec8659..0000000 --- a/docs/SCIMProviderRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# SCIMProviderRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**propertyMappings** | **[UUID]** | | [optional] -**propertyMappingsGroup** | **[UUID]** | Property mappings used for group creation/updating. | [optional] -**url** | **String** | Base URL to SCIM requests, usually ends in /v2 | -**token** | **String** | Authentication token | -**excludeUsersServiceAccount** | **Bool** | | [optional] -**filterGroup** | **UUID** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SMSDevice.md b/docs/SMSDevice.md deleted file mode 100644 index f19575c..0000000 --- a/docs/SMSDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# SMSDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | -**pk** | **Int** | | [readonly] -**phoneNumber** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SMSDeviceRequest.md b/docs/SMSDeviceRequest.md deleted file mode 100644 index 376dd1a..0000000 --- a/docs/SMSDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# SMSDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SchemaAPI.md b/docs/SchemaAPI.md deleted file mode 100644 index 10e2423..0000000 --- a/docs/SchemaAPI.md +++ /dev/null @@ -1,60 +0,0 @@ -# SchemaAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**schemaRetrieve**](SchemaAPI.md#schemaretrieve) | **GET** /schema/ | - - -# **schemaRetrieve** -```swift - open class func schemaRetrieve(format: Format_schemaRetrieve? = nil, lang: Lang_schemaRetrieve? = nil, completion: @escaping (_ data: [String: AnyCodable]?, _ error: Error?) -> Void) -``` - - - -OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let format = "format_example" // String | (optional) -let lang = "lang_example" // String | (optional) - -SchemaAPI.schemaRetrieve(format: format, lang: lang) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **format** | **String** | | [optional] - **lang** | **String** | | [optional] - -### Return type - -[**[String: AnyCodable]**](AnyCodable.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/vnd.oai.openapi, application/yaml, application/vnd.oai.openapi+json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ScopeMapping.md b/docs/ScopeMapping.md deleted file mode 100644 index c2b6d7d..0000000 --- a/docs/ScopeMapping.md +++ /dev/null @@ -1,19 +0,0 @@ -# ScopeMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**component** | **String** | Get object's component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**scopeName** | **String** | Scope name requested by the client | -**description** | **String** | Description shown to the user when consenting. If left empty, the user won't be informed. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScopeMappingRequest.md b/docs/ScopeMappingRequest.md deleted file mode 100644 index bcb7cf3..0000000 --- a/docs/ScopeMappingRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScopeMappingRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**name** | **String** | | -**expression** | **String** | | -**scopeName** | **String** | Scope name requested by the client | -**description** | **String** | Description shown to the user when consenting. If left empty, the user won't be informed. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SelectableStage.md b/docs/SelectableStage.md deleted file mode 100644 index c675e85..0000000 --- a/docs/SelectableStage.md +++ /dev/null @@ -1,13 +0,0 @@ -# SelectableStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | -**name** | **String** | | -**verboseName** | **String** | | -**metaModelName** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ServiceConnection.md b/docs/ServiceConnection.md deleted file mode 100644 index cd80be6..0000000 --- a/docs/ServiceConnection.md +++ /dev/null @@ -1,16 +0,0 @@ -# ServiceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**component** | **String** | Return component used to edit this object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ServiceConnectionRequest.md b/docs/ServiceConnectionRequest.md deleted file mode 100644 index 69340d2..0000000 --- a/docs/ServiceConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ServiceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**local** | **Bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ServiceConnectionState.md b/docs/ServiceConnectionState.md deleted file mode 100644 index 9e6631e..0000000 --- a/docs/ServiceConnectionState.md +++ /dev/null @@ -1,11 +0,0 @@ -# ServiceConnectionState - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**healthy** | **Bool** | | [readonly] -**version** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SessionUser.md b/docs/SessionUser.md deleted file mode 100644 index ec9f072..0000000 --- a/docs/SessionUser.md +++ /dev/null @@ -1,11 +0,0 @@ -# SessionUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [**UserSelf**](UserSelf.md) | | -**original** | [**UserSelf**](UserSelf.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SeverityEnum.md b/docs/SeverityEnum.md deleted file mode 100644 index 666608a..0000000 --- a/docs/SeverityEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# SeverityEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ShellChallenge.md b/docs/ShellChallenge.md deleted file mode 100644 index 819518b..0000000 --- a/docs/ShellChallenge.md +++ /dev/null @@ -1,14 +0,0 @@ -# ShellChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "xak-flow-shell"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**body** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SignatureAlgorithmEnum.md b/docs/SignatureAlgorithmEnum.md deleted file mode 100644 index 6a07706..0000000 --- a/docs/SignatureAlgorithmEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# SignatureAlgorithmEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Source.md b/docs/Source.md deleted file mode 100644 index e233ef1..0000000 --- a/docs/Source.md +++ /dev/null @@ -1,24 +0,0 @@ -# Source - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**component** | **String** | Get object component so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**userPathTemplate** | **String** | | [optional] -**icon** | **String** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SourceRequest.md b/docs/SourceRequest.md deleted file mode 100644 index 77683fa..0000000 --- a/docs/SourceRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# SourceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Source's display Name. | -**slug** | **String** | Internal source name, used in URLs. | -**enabled** | **Bool** | | [optional] -**authenticationFlow** | **UUID** | Flow to use when authenticating existing users. | [optional] -**enrollmentFlow** | **UUID** | Flow to use when enrolling new users. | [optional] -**policyEngineMode** | [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**userMatchingMode** | [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**userPathTemplate** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SourceType.md b/docs/SourceType.md deleted file mode 100644 index 9c2b86a..0000000 --- a/docs/SourceType.md +++ /dev/null @@ -1,18 +0,0 @@ -# SourceType - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**slug** | **String** | | -**urlsCustomizable** | **Bool** | | -**requestTokenUrl** | **String** | | [readonly] -**authorizationUrl** | **String** | | [readonly] -**accessTokenUrl** | **String** | | [readonly] -**profileUrl** | **String** | | [readonly] -**oidcWellKnownUrl** | **String** | | [readonly] -**oidcJwksUrl** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SourcesAPI.md b/docs/SourcesAPI.md deleted file mode 100644 index 533b9ce..0000000 --- a/docs/SourcesAPI.md +++ /dev/null @@ -1,3688 +0,0 @@ -# SourcesAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**sourcesAllDestroy**](SourcesAPI.md#sourcesalldestroy) | **DELETE** /sources/all/{slug}/ | -[**sourcesAllList**](SourcesAPI.md#sourcesalllist) | **GET** /sources/all/ | -[**sourcesAllRetrieve**](SourcesAPI.md#sourcesallretrieve) | **GET** /sources/all/{slug}/ | -[**sourcesAllSetIconCreate**](SourcesAPI.md#sourcesallseticoncreate) | **POST** /sources/all/{slug}/set_icon/ | -[**sourcesAllSetIconUrlCreate**](SourcesAPI.md#sourcesallseticonurlcreate) | **POST** /sources/all/{slug}/set_icon_url/ | -[**sourcesAllTypesList**](SourcesAPI.md#sourcesalltypeslist) | **GET** /sources/all/types/ | -[**sourcesAllUsedByList**](SourcesAPI.md#sourcesallusedbylist) | **GET** /sources/all/{slug}/used_by/ | -[**sourcesAllUserSettingsList**](SourcesAPI.md#sourcesallusersettingslist) | **GET** /sources/all/user_settings/ | -[**sourcesLdapCreate**](SourcesAPI.md#sourcesldapcreate) | **POST** /sources/ldap/ | -[**sourcesLdapDebugRetrieve**](SourcesAPI.md#sourcesldapdebugretrieve) | **GET** /sources/ldap/{slug}/debug/ | -[**sourcesLdapDestroy**](SourcesAPI.md#sourcesldapdestroy) | **DELETE** /sources/ldap/{slug}/ | -[**sourcesLdapList**](SourcesAPI.md#sourcesldaplist) | **GET** /sources/ldap/ | -[**sourcesLdapPartialUpdate**](SourcesAPI.md#sourcesldappartialupdate) | **PATCH** /sources/ldap/{slug}/ | -[**sourcesLdapRetrieve**](SourcesAPI.md#sourcesldapretrieve) | **GET** /sources/ldap/{slug}/ | -[**sourcesLdapSyncStatusRetrieve**](SourcesAPI.md#sourcesldapsyncstatusretrieve) | **GET** /sources/ldap/{slug}/sync_status/ | -[**sourcesLdapUpdate**](SourcesAPI.md#sourcesldapupdate) | **PUT** /sources/ldap/{slug}/ | -[**sourcesLdapUsedByList**](SourcesAPI.md#sourcesldapusedbylist) | **GET** /sources/ldap/{slug}/used_by/ | -[**sourcesOauthCreate**](SourcesAPI.md#sourcesoauthcreate) | **POST** /sources/oauth/ | -[**sourcesOauthDestroy**](SourcesAPI.md#sourcesoauthdestroy) | **DELETE** /sources/oauth/{slug}/ | -[**sourcesOauthList**](SourcesAPI.md#sourcesoauthlist) | **GET** /sources/oauth/ | -[**sourcesOauthPartialUpdate**](SourcesAPI.md#sourcesoauthpartialupdate) | **PATCH** /sources/oauth/{slug}/ | -[**sourcesOauthRetrieve**](SourcesAPI.md#sourcesoauthretrieve) | **GET** /sources/oauth/{slug}/ | -[**sourcesOauthSourceTypesList**](SourcesAPI.md#sourcesoauthsourcetypeslist) | **GET** /sources/oauth/source_types/ | -[**sourcesOauthUpdate**](SourcesAPI.md#sourcesoauthupdate) | **PUT** /sources/oauth/{slug}/ | -[**sourcesOauthUsedByList**](SourcesAPI.md#sourcesoauthusedbylist) | **GET** /sources/oauth/{slug}/used_by/ | -[**sourcesPlexCreate**](SourcesAPI.md#sourcesplexcreate) | **POST** /sources/plex/ | -[**sourcesPlexDestroy**](SourcesAPI.md#sourcesplexdestroy) | **DELETE** /sources/plex/{slug}/ | -[**sourcesPlexList**](SourcesAPI.md#sourcesplexlist) | **GET** /sources/plex/ | -[**sourcesPlexPartialUpdate**](SourcesAPI.md#sourcesplexpartialupdate) | **PATCH** /sources/plex/{slug}/ | -[**sourcesPlexRedeemTokenAuthenticatedCreate**](SourcesAPI.md#sourcesplexredeemtokenauthenticatedcreate) | **POST** /sources/plex/redeem_token_authenticated/ | -[**sourcesPlexRedeemTokenCreate**](SourcesAPI.md#sourcesplexredeemtokencreate) | **POST** /sources/plex/redeem_token/ | -[**sourcesPlexRetrieve**](SourcesAPI.md#sourcesplexretrieve) | **GET** /sources/plex/{slug}/ | -[**sourcesPlexUpdate**](SourcesAPI.md#sourcesplexupdate) | **PUT** /sources/plex/{slug}/ | -[**sourcesPlexUsedByList**](SourcesAPI.md#sourcesplexusedbylist) | **GET** /sources/plex/{slug}/used_by/ | -[**sourcesSamlCreate**](SourcesAPI.md#sourcessamlcreate) | **POST** /sources/saml/ | -[**sourcesSamlDestroy**](SourcesAPI.md#sourcessamldestroy) | **DELETE** /sources/saml/{slug}/ | -[**sourcesSamlList**](SourcesAPI.md#sourcessamllist) | **GET** /sources/saml/ | -[**sourcesSamlMetadataRetrieve**](SourcesAPI.md#sourcessamlmetadataretrieve) | **GET** /sources/saml/{slug}/metadata/ | -[**sourcesSamlPartialUpdate**](SourcesAPI.md#sourcessamlpartialupdate) | **PATCH** /sources/saml/{slug}/ | -[**sourcesSamlRetrieve**](SourcesAPI.md#sourcessamlretrieve) | **GET** /sources/saml/{slug}/ | -[**sourcesSamlUpdate**](SourcesAPI.md#sourcessamlupdate) | **PUT** /sources/saml/{slug}/ | -[**sourcesSamlUsedByList**](SourcesAPI.md#sourcessamlusedbylist) | **GET** /sources/saml/{slug}/used_by/ | -[**sourcesUserConnectionsAllDestroy**](SourcesAPI.md#sourcesuserconnectionsalldestroy) | **DELETE** /sources/user_connections/all/{id}/ | -[**sourcesUserConnectionsAllList**](SourcesAPI.md#sourcesuserconnectionsalllist) | **GET** /sources/user_connections/all/ | -[**sourcesUserConnectionsAllPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsallpartialupdate) | **PATCH** /sources/user_connections/all/{id}/ | -[**sourcesUserConnectionsAllRetrieve**](SourcesAPI.md#sourcesuserconnectionsallretrieve) | **GET** /sources/user_connections/all/{id}/ | -[**sourcesUserConnectionsAllUpdate**](SourcesAPI.md#sourcesuserconnectionsallupdate) | **PUT** /sources/user_connections/all/{id}/ | -[**sourcesUserConnectionsAllUsedByList**](SourcesAPI.md#sourcesuserconnectionsallusedbylist) | **GET** /sources/user_connections/all/{id}/used_by/ | -[**sourcesUserConnectionsOauthCreate**](SourcesAPI.md#sourcesuserconnectionsoauthcreate) | **POST** /sources/user_connections/oauth/ | -[**sourcesUserConnectionsOauthDestroy**](SourcesAPI.md#sourcesuserconnectionsoauthdestroy) | **DELETE** /sources/user_connections/oauth/{id}/ | -[**sourcesUserConnectionsOauthList**](SourcesAPI.md#sourcesuserconnectionsoauthlist) | **GET** /sources/user_connections/oauth/ | -[**sourcesUserConnectionsOauthPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsoauthpartialupdate) | **PATCH** /sources/user_connections/oauth/{id}/ | -[**sourcesUserConnectionsOauthRetrieve**](SourcesAPI.md#sourcesuserconnectionsoauthretrieve) | **GET** /sources/user_connections/oauth/{id}/ | -[**sourcesUserConnectionsOauthUpdate**](SourcesAPI.md#sourcesuserconnectionsoauthupdate) | **PUT** /sources/user_connections/oauth/{id}/ | -[**sourcesUserConnectionsOauthUsedByList**](SourcesAPI.md#sourcesuserconnectionsoauthusedbylist) | **GET** /sources/user_connections/oauth/{id}/used_by/ | -[**sourcesUserConnectionsPlexCreate**](SourcesAPI.md#sourcesuserconnectionsplexcreate) | **POST** /sources/user_connections/plex/ | -[**sourcesUserConnectionsPlexDestroy**](SourcesAPI.md#sourcesuserconnectionsplexdestroy) | **DELETE** /sources/user_connections/plex/{id}/ | -[**sourcesUserConnectionsPlexList**](SourcesAPI.md#sourcesuserconnectionsplexlist) | **GET** /sources/user_connections/plex/ | -[**sourcesUserConnectionsPlexPartialUpdate**](SourcesAPI.md#sourcesuserconnectionsplexpartialupdate) | **PATCH** /sources/user_connections/plex/{id}/ | -[**sourcesUserConnectionsPlexRetrieve**](SourcesAPI.md#sourcesuserconnectionsplexretrieve) | **GET** /sources/user_connections/plex/{id}/ | -[**sourcesUserConnectionsPlexUpdate**](SourcesAPI.md#sourcesuserconnectionsplexupdate) | **PUT** /sources/user_connections/plex/{id}/ | -[**sourcesUserConnectionsPlexUsedByList**](SourcesAPI.md#sourcesuserconnectionsplexusedbylist) | **GET** /sources/user_connections/plex/{id}/used_by/ | -[**sourcesUserConnectionsSamlCreate**](SourcesAPI.md#sourcesuserconnectionssamlcreate) | **POST** /sources/user_connections/saml/ | -[**sourcesUserConnectionsSamlDestroy**](SourcesAPI.md#sourcesuserconnectionssamldestroy) | **DELETE** /sources/user_connections/saml/{id}/ | -[**sourcesUserConnectionsSamlList**](SourcesAPI.md#sourcesuserconnectionssamllist) | **GET** /sources/user_connections/saml/ | -[**sourcesUserConnectionsSamlPartialUpdate**](SourcesAPI.md#sourcesuserconnectionssamlpartialupdate) | **PATCH** /sources/user_connections/saml/{id}/ | -[**sourcesUserConnectionsSamlRetrieve**](SourcesAPI.md#sourcesuserconnectionssamlretrieve) | **GET** /sources/user_connections/saml/{id}/ | -[**sourcesUserConnectionsSamlUpdate**](SourcesAPI.md#sourcesuserconnectionssamlupdate) | **PUT** /sources/user_connections/saml/{id}/ | -[**sourcesUserConnectionsSamlUsedByList**](SourcesAPI.md#sourcesuserconnectionssamlusedbylist) | **GET** /sources/user_connections/saml/{id}/used_by/ | - - -# **sourcesAllDestroy** -```swift - open class func sourcesAllDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesAllDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllList** -```swift - open class func sourcesAllList(managed: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, slug: String? = nil, completion: @escaping (_ data: PaginatedSourceList?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let managed = "managed_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let slug = "slug_example" // String | (optional) - -SourcesAPI.sourcesAllList(managed: managed, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **managed** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **slug** | **String** | | [optional] - -### Return type - -[**PaginatedSourceList**](PaginatedSourceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllRetrieve** -```swift - open class func sourcesAllRetrieve(slug: String, completion: @escaping (_ data: Source?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesAllRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**Source**](Source.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllSetIconCreate** -```swift - open class func sourcesAllSetIconCreate(slug: String, file: URL? = nil, clear: Bool? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set source icon - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let file = URL(string: "https://example.com")! // URL | (optional) -let clear = true // Bool | (optional) (default to false) - -SourcesAPI.sourcesAllSetIconCreate(slug: slug, file: file, clear: clear) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **file** | **URL** | | [optional] - **clear** | **Bool** | | [optional] [default to false] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllSetIconUrlCreate** -```swift - open class func sourcesAllSetIconUrlCreate(slug: String, filePathRequest: FilePathRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Set source icon (as URL) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let filePathRequest = FilePathRequest(url: "url_example") // FilePathRequest | - -SourcesAPI.sourcesAllSetIconUrlCreate(slug: slug, filePathRequest: filePathRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **filePathRequest** | [**FilePathRequest**](FilePathRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllTypesList** -```swift - open class func sourcesAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable source types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -SourcesAPI.sourcesAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllUsedByList** -```swift - open class func sourcesAllUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesAllUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesAllUserSettingsList** -```swift - open class func sourcesAllUserSettingsList(completion: @escaping (_ data: [UserSetting]?, _ error: Error?) -> Void) -``` - - - -Get all sources the user can configure - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -SourcesAPI.sourcesAllUserSettingsList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[UserSetting]**](UserSetting.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapCreate** -```swift - open class func sourcesLdapCreate(lDAPSourceRequest: LDAPSourceRequest, completion: @escaping (_ data: LDAPSource?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let lDAPSourceRequest = LDAPSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", serverUri: "serverUri_example", peerCertificate: 123, clientCertificate: 123, bindCn: "bindCn_example", bindPassword: "bindPassword_example", startTls: false, sni: false, baseDn: "baseDn_example", additionalUserDn: "additionalUserDn_example", additionalGroupDn: "additionalGroupDn_example", userObjectFilter: "userObjectFilter_example", groupObjectFilter: "groupObjectFilter_example", groupMembershipField: "groupMembershipField_example", objectUniquenessField: "objectUniquenessField_example", syncUsers: false, syncUsersPassword: false, syncGroups: false, syncParentGroup: 123, propertyMappings: [123], propertyMappingsGroup: [123]) // LDAPSourceRequest | - -SourcesAPI.sourcesLdapCreate(lDAPSourceRequest: lDAPSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lDAPSourceRequest** | [**LDAPSourceRequest**](LDAPSourceRequest.md) | | - -### Return type - -[**LDAPSource**](LDAPSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapDebugRetrieve** -```swift - open class func sourcesLdapDebugRetrieve(slug: String, completion: @escaping (_ data: LDAPDebug?, _ error: Error?) -> Void) -``` - - - -Get raw LDAP data to debug - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesLdapDebugRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**LDAPDebug**](LDAPDebug.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapDestroy** -```swift - open class func sourcesLdapDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesLdapDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapList** -```swift - open class func sourcesLdapList(additionalGroupDn: String? = nil, additionalUserDn: String? = nil, baseDn: String? = nil, bindCn: String? = nil, clientCertificate: UUID? = nil, enabled: Bool? = nil, groupMembershipField: String? = nil, groupObjectFilter: String? = nil, name: String? = nil, objectUniquenessField: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, peerCertificate: UUID? = nil, propertyMappings: [UUID]? = nil, propertyMappingsGroup: [UUID]? = nil, search: String? = nil, serverUri: String? = nil, slug: String? = nil, sni: Bool? = nil, startTls: Bool? = nil, syncGroups: Bool? = nil, syncParentGroup: UUID? = nil, syncUsers: Bool? = nil, syncUsersPassword: Bool? = nil, userObjectFilter: String? = nil, completion: @escaping (_ data: PaginatedLDAPSourceList?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let additionalGroupDn = "additionalGroupDn_example" // String | (optional) -let additionalUserDn = "additionalUserDn_example" // String | (optional) -let baseDn = "baseDn_example" // String | (optional) -let bindCn = "bindCn_example" // String | (optional) -let clientCertificate = 987 // UUID | (optional) -let enabled = true // Bool | (optional) -let groupMembershipField = "groupMembershipField_example" // String | (optional) -let groupObjectFilter = "groupObjectFilter_example" // String | (optional) -let name = "name_example" // String | (optional) -let objectUniquenessField = "objectUniquenessField_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let peerCertificate = 987 // UUID | (optional) -let propertyMappings = [123] // [UUID] | (optional) -let propertyMappingsGroup = [123] // [UUID] | (optional) -let search = "search_example" // String | A search term. (optional) -let serverUri = "serverUri_example" // String | (optional) -let slug = "slug_example" // String | (optional) -let sni = true // Bool | (optional) -let startTls = true // Bool | (optional) -let syncGroups = true // Bool | (optional) -let syncParentGroup = 987 // UUID | (optional) -let syncUsers = true // Bool | (optional) -let syncUsersPassword = true // Bool | (optional) -let userObjectFilter = "userObjectFilter_example" // String | (optional) - -SourcesAPI.sourcesLdapList(additionalGroupDn: additionalGroupDn, additionalUserDn: additionalUserDn, baseDn: baseDn, bindCn: bindCn, clientCertificate: clientCertificate, enabled: enabled, groupMembershipField: groupMembershipField, groupObjectFilter: groupObjectFilter, name: name, objectUniquenessField: objectUniquenessField, ordering: ordering, page: page, pageSize: pageSize, peerCertificate: peerCertificate, propertyMappings: propertyMappings, propertyMappingsGroup: propertyMappingsGroup, search: search, serverUri: serverUri, slug: slug, sni: sni, startTls: startTls, syncGroups: syncGroups, syncParentGroup: syncParentGroup, syncUsers: syncUsers, syncUsersPassword: syncUsersPassword, userObjectFilter: userObjectFilter) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **additionalGroupDn** | **String** | | [optional] - **additionalUserDn** | **String** | | [optional] - **baseDn** | **String** | | [optional] - **bindCn** | **String** | | [optional] - **clientCertificate** | **UUID** | | [optional] - **enabled** | **Bool** | | [optional] - **groupMembershipField** | **String** | | [optional] - **groupObjectFilter** | **String** | | [optional] - **name** | **String** | | [optional] - **objectUniquenessField** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **peerCertificate** | **UUID** | | [optional] - **propertyMappings** | [**[UUID]**](UUID.md) | | [optional] - **propertyMappingsGroup** | [**[UUID]**](UUID.md) | | [optional] - **search** | **String** | A search term. | [optional] - **serverUri** | **String** | | [optional] - **slug** | **String** | | [optional] - **sni** | **Bool** | | [optional] - **startTls** | **Bool** | | [optional] - **syncGroups** | **Bool** | | [optional] - **syncParentGroup** | **UUID** | | [optional] - **syncUsers** | **Bool** | | [optional] - **syncUsersPassword** | **Bool** | | [optional] - **userObjectFilter** | **String** | | [optional] - -### Return type - -[**PaginatedLDAPSourceList**](PaginatedLDAPSourceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapPartialUpdate** -```swift - open class func sourcesLdapPartialUpdate(slug: String, patchedLDAPSourceRequest: PatchedLDAPSourceRequest? = nil, completion: @escaping (_ data: LDAPSource?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedLDAPSourceRequest = PatchedLDAPSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", serverUri: "serverUri_example", peerCertificate: 123, clientCertificate: 123, bindCn: "bindCn_example", bindPassword: "bindPassword_example", startTls: false, sni: false, baseDn: "baseDn_example", additionalUserDn: "additionalUserDn_example", additionalGroupDn: "additionalGroupDn_example", userObjectFilter: "userObjectFilter_example", groupObjectFilter: "groupObjectFilter_example", groupMembershipField: "groupMembershipField_example", objectUniquenessField: "objectUniquenessField_example", syncUsers: false, syncUsersPassword: false, syncGroups: false, syncParentGroup: 123, propertyMappings: [123], propertyMappingsGroup: [123]) // PatchedLDAPSourceRequest | (optional) - -SourcesAPI.sourcesLdapPartialUpdate(slug: slug, patchedLDAPSourceRequest: patchedLDAPSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedLDAPSourceRequest** | [**PatchedLDAPSourceRequest**](PatchedLDAPSourceRequest.md) | | [optional] - -### Return type - -[**LDAPSource**](LDAPSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapRetrieve** -```swift - open class func sourcesLdapRetrieve(slug: String, completion: @escaping (_ data: LDAPSource?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesLdapRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**LDAPSource**](LDAPSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapSyncStatusRetrieve** -```swift - open class func sourcesLdapSyncStatusRetrieve(slug: String, completion: @escaping (_ data: LDAPSyncStatus?, _ error: Error?) -> Void) -``` - - - -Get source's sync status - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesLdapSyncStatusRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**LDAPSyncStatus**](LDAPSyncStatus.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapUpdate** -```swift - open class func sourcesLdapUpdate(slug: String, lDAPSourceRequest: LDAPSourceRequest, completion: @escaping (_ data: LDAPSource?, _ error: Error?) -> Void) -``` - - - -LDAP Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let lDAPSourceRequest = LDAPSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", serverUri: "serverUri_example", peerCertificate: 123, clientCertificate: 123, bindCn: "bindCn_example", bindPassword: "bindPassword_example", startTls: false, sni: false, baseDn: "baseDn_example", additionalUserDn: "additionalUserDn_example", additionalGroupDn: "additionalGroupDn_example", userObjectFilter: "userObjectFilter_example", groupObjectFilter: "groupObjectFilter_example", groupMembershipField: "groupMembershipField_example", objectUniquenessField: "objectUniquenessField_example", syncUsers: false, syncUsersPassword: false, syncGroups: false, syncParentGroup: 123, propertyMappings: [123], propertyMappingsGroup: [123]) // LDAPSourceRequest | - -SourcesAPI.sourcesLdapUpdate(slug: slug, lDAPSourceRequest: lDAPSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **lDAPSourceRequest** | [**LDAPSourceRequest**](LDAPSourceRequest.md) | | - -### Return type - -[**LDAPSource**](LDAPSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesLdapUsedByList** -```swift - open class func sourcesLdapUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesLdapUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthCreate** -```swift - open class func sourcesOauthCreate(oAuthSourceRequest: OAuthSourceRequest, completion: @escaping (_ data: OAuthSource?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let oAuthSourceRequest = OAuthSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", providerType: ProviderTypeEnum(), requestTokenUrl: "requestTokenUrl_example", authorizationUrl: "authorizationUrl_example", accessTokenUrl: "accessTokenUrl_example", profileUrl: "profileUrl_example", consumerKey: "consumerKey_example", consumerSecret: "consumerSecret_example", additionalScopes: "additionalScopes_example", oidcWellKnownUrl: "oidcWellKnownUrl_example", oidcJwksUrl: "oidcJwksUrl_example", oidcJwks: "TODO") // OAuthSourceRequest | - -SourcesAPI.sourcesOauthCreate(oAuthSourceRequest: oAuthSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **oAuthSourceRequest** | [**OAuthSourceRequest**](OAuthSourceRequest.md) | | - -### Return type - -[**OAuthSource**](OAuthSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthDestroy** -```swift - open class func sourcesOauthDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesOauthDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthList** -```swift - open class func sourcesOauthList(accessTokenUrl: String? = nil, additionalScopes: String? = nil, authenticationFlow: UUID? = nil, authorizationUrl: String? = nil, consumerKey: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, hasJwks: Bool? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesOauthList? = nil, profileUrl: String? = nil, providerType: String? = nil, requestTokenUrl: String? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesOauthList? = nil, completion: @escaping (_ data: PaginatedOAuthSourceList?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let accessTokenUrl = "accessTokenUrl_example" // String | (optional) -let additionalScopes = "additionalScopes_example" // String | (optional) -let authenticationFlow = 987 // UUID | (optional) -let authorizationUrl = "authorizationUrl_example" // String | (optional) -let consumerKey = "consumerKey_example" // String | (optional) -let enabled = true // Bool | (optional) -let enrollmentFlow = 987 // UUID | (optional) -let hasJwks = true // Bool | Only return sources with JWKS data (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyEngineMode = "policyEngineMode_example" // String | * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) -let profileUrl = "profileUrl_example" // String | (optional) -let providerType = "providerType_example" // String | (optional) -let requestTokenUrl = "requestTokenUrl_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let slug = "slug_example" // String | (optional) -let userMatchingMode = "userMatchingMode_example" // String | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - -SourcesAPI.sourcesOauthList(accessTokenUrl: accessTokenUrl, additionalScopes: additionalScopes, authenticationFlow: authenticationFlow, authorizationUrl: authorizationUrl, consumerKey: consumerKey, enabled: enabled, enrollmentFlow: enrollmentFlow, hasJwks: hasJwks, name: name, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, profileUrl: profileUrl, providerType: providerType, requestTokenUrl: requestTokenUrl, search: search, slug: slug, userMatchingMode: userMatchingMode) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accessTokenUrl** | **String** | | [optional] - **additionalScopes** | **String** | | [optional] - **authenticationFlow** | **UUID** | | [optional] - **authorizationUrl** | **String** | | [optional] - **consumerKey** | **String** | | [optional] - **enabled** | **Bool** | | [optional] - **enrollmentFlow** | **UUID** | | [optional] - **hasJwks** | **Bool** | Only return sources with JWKS data | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyEngineMode** | **String** | * `all` - all, all policies must pass * `any` - any, any policy must pass | [optional] - **profileUrl** | **String** | | [optional] - **providerType** | **String** | | [optional] - **requestTokenUrl** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **slug** | **String** | | [optional] - **userMatchingMode** | **String** | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] - -### Return type - -[**PaginatedOAuthSourceList**](PaginatedOAuthSourceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthPartialUpdate** -```swift - open class func sourcesOauthPartialUpdate(slug: String, patchedOAuthSourceRequest: PatchedOAuthSourceRequest? = nil, completion: @escaping (_ data: OAuthSource?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedOAuthSourceRequest = PatchedOAuthSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", providerType: ProviderTypeEnum(), requestTokenUrl: "requestTokenUrl_example", authorizationUrl: "authorizationUrl_example", accessTokenUrl: "accessTokenUrl_example", profileUrl: "profileUrl_example", consumerKey: "consumerKey_example", consumerSecret: "consumerSecret_example", additionalScopes: "additionalScopes_example", oidcWellKnownUrl: "oidcWellKnownUrl_example", oidcJwksUrl: "oidcJwksUrl_example", oidcJwks: "TODO") // PatchedOAuthSourceRequest | (optional) - -SourcesAPI.sourcesOauthPartialUpdate(slug: slug, patchedOAuthSourceRequest: patchedOAuthSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedOAuthSourceRequest** | [**PatchedOAuthSourceRequest**](PatchedOAuthSourceRequest.md) | | [optional] - -### Return type - -[**OAuthSource**](OAuthSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthRetrieve** -```swift - open class func sourcesOauthRetrieve(slug: String, completion: @escaping (_ data: OAuthSource?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesOauthRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**OAuthSource**](OAuthSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthSourceTypesList** -```swift - open class func sourcesOauthSourceTypesList(name: String? = nil, completion: @escaping (_ data: [SourceType]?, _ error: Error?) -> Void) -``` - - - -Get all creatable source types. If ?name is set, only returns the type for . If isn't found, returns the default type. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) - -SourcesAPI.sourcesOauthSourceTypesList(name: name) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - -### Return type - -[**[SourceType]**](SourceType.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthUpdate** -```swift - open class func sourcesOauthUpdate(slug: String, oAuthSourceRequest: OAuthSourceRequest, completion: @escaping (_ data: OAuthSource?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let oAuthSourceRequest = OAuthSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", providerType: ProviderTypeEnum(), requestTokenUrl: "requestTokenUrl_example", authorizationUrl: "authorizationUrl_example", accessTokenUrl: "accessTokenUrl_example", profileUrl: "profileUrl_example", consumerKey: "consumerKey_example", consumerSecret: "consumerSecret_example", additionalScopes: "additionalScopes_example", oidcWellKnownUrl: "oidcWellKnownUrl_example", oidcJwksUrl: "oidcJwksUrl_example", oidcJwks: "TODO") // OAuthSourceRequest | - -SourcesAPI.sourcesOauthUpdate(slug: slug, oAuthSourceRequest: oAuthSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **oAuthSourceRequest** | [**OAuthSourceRequest**](OAuthSourceRequest.md) | | - -### Return type - -[**OAuthSource**](OAuthSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesOauthUsedByList** -```swift - open class func sourcesOauthUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesOauthUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexCreate** -```swift - open class func sourcesPlexCreate(plexSourceRequest: PlexSourceRequest, completion: @escaping (_ data: PlexSource?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let plexSourceRequest = PlexSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", clientId: "clientId_example", allowedServers: ["allowedServers_example"], allowFriends: false, plexToken: "plexToken_example") // PlexSourceRequest | - -SourcesAPI.sourcesPlexCreate(plexSourceRequest: plexSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plexSourceRequest** | [**PlexSourceRequest**](PlexSourceRequest.md) | | - -### Return type - -[**PlexSource**](PlexSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexDestroy** -```swift - open class func sourcesPlexDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesPlexDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexList** -```swift - open class func sourcesPlexList(allowFriends: Bool? = nil, authenticationFlow: UUID? = nil, clientId: String? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesPlexList? = nil, search: String? = nil, slug: String? = nil, userMatchingMode: UserMatchingMode_sourcesPlexList? = nil, completion: @escaping (_ data: PaginatedPlexSourceList?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let allowFriends = true // Bool | (optional) -let authenticationFlow = 987 // UUID | (optional) -let clientId = "clientId_example" // String | (optional) -let enabled = true // Bool | (optional) -let enrollmentFlow = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyEngineMode = "policyEngineMode_example" // String | * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) -let search = "search_example" // String | A search term. (optional) -let slug = "slug_example" // String | (optional) -let userMatchingMode = "userMatchingMode_example" // String | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) - -SourcesAPI.sourcesPlexList(allowFriends: allowFriends, authenticationFlow: authenticationFlow, clientId: clientId, enabled: enabled, enrollmentFlow: enrollmentFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, search: search, slug: slug, userMatchingMode: userMatchingMode) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowFriends** | **Bool** | | [optional] - **authenticationFlow** | **UUID** | | [optional] - **clientId** | **String** | | [optional] - **enabled** | **Bool** | | [optional] - **enrollmentFlow** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyEngineMode** | **String** | * `all` - all, all policies must pass * `any` - any, any policy must pass | [optional] - **search** | **String** | A search term. | [optional] - **slug** | **String** | | [optional] - **userMatchingMode** | **String** | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] - -### Return type - -[**PaginatedPlexSourceList**](PaginatedPlexSourceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexPartialUpdate** -```swift - open class func sourcesPlexPartialUpdate(slug: String, patchedPlexSourceRequest: PatchedPlexSourceRequest? = nil, completion: @escaping (_ data: PlexSource?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedPlexSourceRequest = PatchedPlexSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", clientId: "clientId_example", allowedServers: ["allowedServers_example"], allowFriends: false, plexToken: "plexToken_example") // PatchedPlexSourceRequest | (optional) - -SourcesAPI.sourcesPlexPartialUpdate(slug: slug, patchedPlexSourceRequest: patchedPlexSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedPlexSourceRequest** | [**PatchedPlexSourceRequest**](PatchedPlexSourceRequest.md) | | [optional] - -### Return type - -[**PlexSource**](PlexSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexRedeemTokenAuthenticatedCreate** -```swift - open class func sourcesPlexRedeemTokenAuthenticatedCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Redeem a plex token for an authenticated user, creating a connection - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let plexTokenRedeemRequest = PlexTokenRedeemRequest(plexToken: "plexToken_example") // PlexTokenRedeemRequest | -let slug = "slug_example" // String | (optional) - -SourcesAPI.sourcesPlexRedeemTokenAuthenticatedCreate(plexTokenRedeemRequest: plexTokenRedeemRequest, slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plexTokenRedeemRequest** | [**PlexTokenRedeemRequest**](PlexTokenRedeemRequest.md) | | - **slug** | **String** | | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexRedeemTokenCreate** -```swift - open class func sourcesPlexRedeemTokenCreate(plexTokenRedeemRequest: PlexTokenRedeemRequest, slug: String? = nil, completion: @escaping (_ data: RedirectChallenge?, _ error: Error?) -> Void) -``` - - - -Redeem a plex token, check it's access to resources against what's allowed for the source, and redirect to an authentication/enrollment flow. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let plexTokenRedeemRequest = PlexTokenRedeemRequest(plexToken: "plexToken_example") // PlexTokenRedeemRequest | -let slug = "slug_example" // String | (optional) - -SourcesAPI.sourcesPlexRedeemTokenCreate(plexTokenRedeemRequest: plexTokenRedeemRequest, slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plexTokenRedeemRequest** | [**PlexTokenRedeemRequest**](PlexTokenRedeemRequest.md) | | - **slug** | **String** | | [optional] - -### Return type - -[**RedirectChallenge**](RedirectChallenge.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexRetrieve** -```swift - open class func sourcesPlexRetrieve(slug: String, completion: @escaping (_ data: PlexSource?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesPlexRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**PlexSource**](PlexSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexUpdate** -```swift - open class func sourcesPlexUpdate(slug: String, plexSourceRequest: PlexSourceRequest, completion: @escaping (_ data: PlexSource?, _ error: Error?) -> Void) -``` - - - -Plex source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let plexSourceRequest = PlexSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", clientId: "clientId_example", allowedServers: ["allowedServers_example"], allowFriends: false, plexToken: "plexToken_example") // PlexSourceRequest | - -SourcesAPI.sourcesPlexUpdate(slug: slug, plexSourceRequest: plexSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **plexSourceRequest** | [**PlexSourceRequest**](PlexSourceRequest.md) | | - -### Return type - -[**PlexSource**](PlexSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesPlexUsedByList** -```swift - open class func sourcesPlexUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesPlexUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlCreate** -```swift - open class func sourcesSamlCreate(sAMLSourceRequest: SAMLSourceRequest, completion: @escaping (_ data: SAMLSource?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let sAMLSourceRequest = SAMLSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", preAuthenticationFlow: 123, issuer: "issuer_example", ssoUrl: "ssoUrl_example", sloUrl: "sloUrl_example", allowIdpInitiated: false, nameIdPolicy: NameIdPolicyEnum(), bindingType: BindingTypeEnum(), verificationKp: 123, signingKp: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), temporaryUserDeleteAfter: "temporaryUserDeleteAfter_example") // SAMLSourceRequest | - -SourcesAPI.sourcesSamlCreate(sAMLSourceRequest: sAMLSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sAMLSourceRequest** | [**SAMLSourceRequest**](SAMLSourceRequest.md) | | - -### Return type - -[**SAMLSource**](SAMLSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlDestroy** -```swift - open class func sourcesSamlDestroy(slug: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesSamlDestroy(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlList** -```swift - open class func sourcesSamlList(allowIdpInitiated: Bool? = nil, authenticationFlow: UUID? = nil, bindingType: BindingType_sourcesSamlList? = nil, digestAlgorithm: DigestAlgorithm_sourcesSamlList? = nil, enabled: Bool? = nil, enrollmentFlow: UUID? = nil, issuer: String? = nil, managed: String? = nil, name: String? = nil, nameIdPolicy: NameIdPolicy_sourcesSamlList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, policyEngineMode: PolicyEngineMode_sourcesSamlList? = nil, preAuthenticationFlow: UUID? = nil, search: String? = nil, signatureAlgorithm: SignatureAlgorithm_sourcesSamlList? = nil, signingKp: UUID? = nil, sloUrl: String? = nil, slug: String? = nil, ssoUrl: String? = nil, temporaryUserDeleteAfter: String? = nil, userMatchingMode: UserMatchingMode_sourcesSamlList? = nil, verificationKp: UUID? = nil, completion: @escaping (_ data: PaginatedSAMLSourceList?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let allowIdpInitiated = true // Bool | (optional) -let authenticationFlow = 987 // UUID | (optional) -let bindingType = "bindingType_example" // String | * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation (optional) -let digestAlgorithm = "digestAlgorithm_example" // String | * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 (optional) -let enabled = true // Bool | (optional) -let enrollmentFlow = 987 // UUID | (optional) -let issuer = "issuer_example" // String | (optional) -let managed = "managed_example" // String | (optional) -let name = "name_example" // String | (optional) -let nameIdPolicy = "nameIdPolicy_example" // String | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let policyEngineMode = "policyEngineMode_example" // String | * `all` - all, all policies must pass * `any` - any, any policy must pass (optional) -let preAuthenticationFlow = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) -let signatureAlgorithm = "signatureAlgorithm_example" // String | * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 (optional) -let signingKp = 987 // UUID | (optional) -let sloUrl = "sloUrl_example" // String | (optional) -let slug = "slug_example" // String | (optional) -let ssoUrl = "ssoUrl_example" // String | (optional) -let temporaryUserDeleteAfter = "temporaryUserDeleteAfter_example" // String | (optional) -let userMatchingMode = "userMatchingMode_example" // String | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. (optional) -let verificationKp = 987 // UUID | (optional) - -SourcesAPI.sourcesSamlList(allowIdpInitiated: allowIdpInitiated, authenticationFlow: authenticationFlow, bindingType: bindingType, digestAlgorithm: digestAlgorithm, enabled: enabled, enrollmentFlow: enrollmentFlow, issuer: issuer, managed: managed, name: name, nameIdPolicy: nameIdPolicy, ordering: ordering, page: page, pageSize: pageSize, policyEngineMode: policyEngineMode, preAuthenticationFlow: preAuthenticationFlow, search: search, signatureAlgorithm: signatureAlgorithm, signingKp: signingKp, sloUrl: sloUrl, slug: slug, ssoUrl: ssoUrl, temporaryUserDeleteAfter: temporaryUserDeleteAfter, userMatchingMode: userMatchingMode, verificationKp: verificationKp) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowIdpInitiated** | **Bool** | | [optional] - **authenticationFlow** | **UUID** | | [optional] - **bindingType** | **String** | * `REDIRECT` - Redirect Binding * `POST` - POST Binding * `POST_AUTO` - POST Binding with auto-confirmation | [optional] - **digestAlgorithm** | **String** | * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512 | [optional] - **enabled** | **Bool** | | [optional] - **enrollmentFlow** | **UUID** | | [optional] - **issuer** | **String** | | [optional] - **managed** | **String** | | [optional] - **name** | **String** | | [optional] - **nameIdPolicy** | **String** | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **policyEngineMode** | **String** | * `all` - all, all policies must pass * `any` - any, any policy must pass | [optional] - **preAuthenticationFlow** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - **signatureAlgorithm** | **String** | * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1 | [optional] - **signingKp** | **UUID** | | [optional] - **sloUrl** | **String** | | [optional] - **slug** | **String** | | [optional] - **ssoUrl** | **String** | | [optional] - **temporaryUserDeleteAfter** | **String** | | [optional] - **userMatchingMode** | **String** | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] - **verificationKp** | **UUID** | | [optional] - -### Return type - -[**PaginatedSAMLSourceList**](PaginatedSAMLSourceList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlMetadataRetrieve** -```swift - open class func sourcesSamlMetadataRetrieve(slug: String, completion: @escaping (_ data: SAMLMetadata?, _ error: Error?) -> Void) -``` - - - -Return metadata as XML string - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesSamlMetadataRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**SAMLMetadata**](SAMLMetadata.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlPartialUpdate** -```swift - open class func sourcesSamlPartialUpdate(slug: String, patchedSAMLSourceRequest: PatchedSAMLSourceRequest? = nil, completion: @escaping (_ data: SAMLSource?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let patchedSAMLSourceRequest = PatchedSAMLSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", preAuthenticationFlow: 123, issuer: "issuer_example", ssoUrl: "ssoUrl_example", sloUrl: "sloUrl_example", allowIdpInitiated: false, nameIdPolicy: NameIdPolicyEnum(), bindingType: BindingTypeEnum(), verificationKp: 123, signingKp: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), temporaryUserDeleteAfter: "temporaryUserDeleteAfter_example") // PatchedSAMLSourceRequest | (optional) - -SourcesAPI.sourcesSamlPartialUpdate(slug: slug, patchedSAMLSourceRequest: patchedSAMLSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **patchedSAMLSourceRequest** | [**PatchedSAMLSourceRequest**](PatchedSAMLSourceRequest.md) | | [optional] - -### Return type - -[**SAMLSource**](SAMLSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlRetrieve** -```swift - open class func sourcesSamlRetrieve(slug: String, completion: @escaping (_ data: SAMLSource?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesSamlRetrieve(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**SAMLSource**](SAMLSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlUpdate** -```swift - open class func sourcesSamlUpdate(slug: String, sAMLSourceRequest: SAMLSourceRequest, completion: @escaping (_ data: SAMLSource?, _ error: Error?) -> Void) -``` - - - -SAMLSource Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | -let sAMLSourceRequest = SAMLSourceRequest(name: "name_example", slug: "slug_example", enabled: false, authenticationFlow: 123, enrollmentFlow: 123, policyEngineMode: PolicyEngineMode(), userMatchingMode: UserMatchingModeEnum(), userPathTemplate: "userPathTemplate_example", preAuthenticationFlow: 123, issuer: "issuer_example", ssoUrl: "ssoUrl_example", sloUrl: "sloUrl_example", allowIdpInitiated: false, nameIdPolicy: NameIdPolicyEnum(), bindingType: BindingTypeEnum(), verificationKp: 123, signingKp: 123, digestAlgorithm: DigestAlgorithmEnum(), signatureAlgorithm: SignatureAlgorithmEnum(), temporaryUserDeleteAfter: "temporaryUserDeleteAfter_example") // SAMLSourceRequest | - -SourcesAPI.sourcesSamlUpdate(slug: slug, sAMLSourceRequest: sAMLSourceRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - **sAMLSourceRequest** | [**SAMLSourceRequest**](SAMLSourceRequest.md) | | - -### Return type - -[**SAMLSource**](SAMLSource.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesSamlUsedByList** -```swift - open class func sourcesSamlUsedByList(slug: String, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let slug = "slug_example" // String | - -SourcesAPI.sourcesSamlUsedByList(slug: slug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **slug** | **String** | | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllDestroy** -```swift - open class func sourcesUserConnectionsAllDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -User-source connection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this user source connection. - -SourcesAPI.sourcesUserConnectionsAllDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this user source connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllList** -```swift - open class func sourcesUserConnectionsAllList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, user: Int? = nil, completion: @escaping (_ data: PaginatedUserSourceConnectionList?, _ error: Error?) -> Void) -``` - - - -User-source connection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let user = 987 // Int | (optional) - -SourcesAPI.sourcesUserConnectionsAllList(ordering: ordering, page: page, pageSize: pageSize, search: search, user: user) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **user** | **Int** | | [optional] - -### Return type - -[**PaginatedUserSourceConnectionList**](PaginatedUserSourceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllPartialUpdate** -```swift - open class func sourcesUserConnectionsAllPartialUpdate(id: Int, completion: @escaping (_ data: UserSourceConnection?, _ error: Error?) -> Void) -``` - - - -User-source connection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this user source connection. - -SourcesAPI.sourcesUserConnectionsAllPartialUpdate(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this user source connection. | - -### Return type - -[**UserSourceConnection**](UserSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllRetrieve** -```swift - open class func sourcesUserConnectionsAllRetrieve(id: Int, completion: @escaping (_ data: UserSourceConnection?, _ error: Error?) -> Void) -``` - - - -User-source connection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this user source connection. - -SourcesAPI.sourcesUserConnectionsAllRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this user source connection. | - -### Return type - -[**UserSourceConnection**](UserSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllUpdate** -```swift - open class func sourcesUserConnectionsAllUpdate(id: Int, completion: @escaping (_ data: UserSourceConnection?, _ error: Error?) -> Void) -``` - - - -User-source connection Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this user source connection. - -SourcesAPI.sourcesUserConnectionsAllUpdate(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this user source connection. | - -### Return type - -[**UserSourceConnection**](UserSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsAllUsedByList** -```swift - open class func sourcesUserConnectionsAllUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this user source connection. - -SourcesAPI.sourcesUserConnectionsAllUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this user source connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthCreate** -```swift - open class func sourcesUserConnectionsOauthCreate(userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest, completion: @escaping (_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userOAuthSourceConnectionRequest = UserOAuthSourceConnectionRequest(user: 123, identifier: "identifier_example", accessToken: "accessToken_example") // UserOAuthSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsOauthCreate(userOAuthSourceConnectionRequest: userOAuthSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userOAuthSourceConnectionRequest** | [**UserOAuthSourceConnectionRequest**](UserOAuthSourceConnectionRequest.md) | | - -### Return type - -[**UserOAuthSourceConnection**](UserOAuthSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthDestroy** -```swift - open class func sourcesUserConnectionsOauthDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User OAuth Source Connection. - -SourcesAPI.sourcesUserConnectionsOauthDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User OAuth Source Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthList** -```swift - open class func sourcesUserConnectionsOauthList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, completion: @escaping (_ data: PaginatedUserOAuthSourceConnectionList?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let sourceSlug = "sourceSlug_example" // String | (optional) - -SourcesAPI.sourcesUserConnectionsOauthList(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **sourceSlug** | **String** | | [optional] - -### Return type - -[**PaginatedUserOAuthSourceConnectionList**](PaginatedUserOAuthSourceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthPartialUpdate** -```swift - open class func sourcesUserConnectionsOauthPartialUpdate(id: Int, patchedUserOAuthSourceConnectionRequest: PatchedUserOAuthSourceConnectionRequest? = nil, completion: @escaping (_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User OAuth Source Connection. -let patchedUserOAuthSourceConnectionRequest = PatchedUserOAuthSourceConnectionRequest(user: 123, identifier: "identifier_example", accessToken: "accessToken_example") // PatchedUserOAuthSourceConnectionRequest | (optional) - -SourcesAPI.sourcesUserConnectionsOauthPartialUpdate(id: id, patchedUserOAuthSourceConnectionRequest: patchedUserOAuthSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User OAuth Source Connection. | - **patchedUserOAuthSourceConnectionRequest** | [**PatchedUserOAuthSourceConnectionRequest**](PatchedUserOAuthSourceConnectionRequest.md) | | [optional] - -### Return type - -[**UserOAuthSourceConnection**](UserOAuthSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthRetrieve** -```swift - open class func sourcesUserConnectionsOauthRetrieve(id: Int, completion: @escaping (_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User OAuth Source Connection. - -SourcesAPI.sourcesUserConnectionsOauthRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User OAuth Source Connection. | - -### Return type - -[**UserOAuthSourceConnection**](UserOAuthSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthUpdate** -```swift - open class func sourcesUserConnectionsOauthUpdate(id: Int, userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest, completion: @escaping (_ data: UserOAuthSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User OAuth Source Connection. -let userOAuthSourceConnectionRequest = UserOAuthSourceConnectionRequest(user: 123, identifier: "identifier_example", accessToken: "accessToken_example") // UserOAuthSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsOauthUpdate(id: id, userOAuthSourceConnectionRequest: userOAuthSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User OAuth Source Connection. | - **userOAuthSourceConnectionRequest** | [**UserOAuthSourceConnectionRequest**](UserOAuthSourceConnectionRequest.md) | | - -### Return type - -[**UserOAuthSourceConnection**](UserOAuthSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsOauthUsedByList** -```swift - open class func sourcesUserConnectionsOauthUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User OAuth Source Connection. - -SourcesAPI.sourcesUserConnectionsOauthUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User OAuth Source Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexCreate** -```swift - open class func sourcesUserConnectionsPlexCreate(plexSourceConnectionRequest: PlexSourceConnectionRequest, completion: @escaping (_ data: PlexSourceConnection?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let plexSourceConnectionRequest = PlexSourceConnectionRequest(identifier: "identifier_example", plexToken: "plexToken_example") // PlexSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsPlexCreate(plexSourceConnectionRequest: plexSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plexSourceConnectionRequest** | [**PlexSourceConnectionRequest**](PlexSourceConnectionRequest.md) | | - -### Return type - -[**PlexSourceConnection**](PlexSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexDestroy** -```swift - open class func sourcesUserConnectionsPlexDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Plex Source Connection. - -SourcesAPI.sourcesUserConnectionsPlexDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Plex Source Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexList** -```swift - open class func sourcesUserConnectionsPlexList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, completion: @escaping (_ data: PaginatedPlexSourceConnectionList?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let sourceSlug = "sourceSlug_example" // String | (optional) - -SourcesAPI.sourcesUserConnectionsPlexList(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **sourceSlug** | **String** | | [optional] - -### Return type - -[**PaginatedPlexSourceConnectionList**](PaginatedPlexSourceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexPartialUpdate** -```swift - open class func sourcesUserConnectionsPlexPartialUpdate(id: Int, patchedPlexSourceConnectionRequest: PatchedPlexSourceConnectionRequest? = nil, completion: @escaping (_ data: PlexSourceConnection?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Plex Source Connection. -let patchedPlexSourceConnectionRequest = PatchedPlexSourceConnectionRequest(identifier: "identifier_example", plexToken: "plexToken_example") // PatchedPlexSourceConnectionRequest | (optional) - -SourcesAPI.sourcesUserConnectionsPlexPartialUpdate(id: id, patchedPlexSourceConnectionRequest: patchedPlexSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Plex Source Connection. | - **patchedPlexSourceConnectionRequest** | [**PatchedPlexSourceConnectionRequest**](PatchedPlexSourceConnectionRequest.md) | | [optional] - -### Return type - -[**PlexSourceConnection**](PlexSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexRetrieve** -```swift - open class func sourcesUserConnectionsPlexRetrieve(id: Int, completion: @escaping (_ data: PlexSourceConnection?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Plex Source Connection. - -SourcesAPI.sourcesUserConnectionsPlexRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Plex Source Connection. | - -### Return type - -[**PlexSourceConnection**](PlexSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexUpdate** -```swift - open class func sourcesUserConnectionsPlexUpdate(id: Int, plexSourceConnectionRequest: PlexSourceConnectionRequest, completion: @escaping (_ data: PlexSourceConnection?, _ error: Error?) -> Void) -``` - - - -Plex Source connection Serializer - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Plex Source Connection. -let plexSourceConnectionRequest = PlexSourceConnectionRequest(identifier: "identifier_example", plexToken: "plexToken_example") // PlexSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsPlexUpdate(id: id, plexSourceConnectionRequest: plexSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Plex Source Connection. | - **plexSourceConnectionRequest** | [**PlexSourceConnectionRequest**](PlexSourceConnectionRequest.md) | | - -### Return type - -[**PlexSourceConnection**](PlexSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsPlexUsedByList** -```swift - open class func sourcesUserConnectionsPlexUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User Plex Source Connection. - -SourcesAPI.sourcesUserConnectionsPlexUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User Plex Source Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlCreate** -```swift - open class func sourcesUserConnectionsSamlCreate(userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest, completion: @escaping (_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userSAMLSourceConnectionRequest = UserSAMLSourceConnectionRequest(user: 123, identifier: "identifier_example") // UserSAMLSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsSamlCreate(userSAMLSourceConnectionRequest: userSAMLSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userSAMLSourceConnectionRequest** | [**UserSAMLSourceConnectionRequest**](UserSAMLSourceConnectionRequest.md) | | - -### Return type - -[**UserSAMLSourceConnection**](UserSAMLSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlDestroy** -```swift - open class func sourcesUserConnectionsSamlDestroy(id: Int, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User SAML Source Connection. - -SourcesAPI.sourcesUserConnectionsSamlDestroy(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User SAML Source Connection. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlList** -```swift - open class func sourcesUserConnectionsSamlList(ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, sourceSlug: String? = nil, completion: @escaping (_ data: PaginatedUserSAMLSourceConnectionList?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let sourceSlug = "sourceSlug_example" // String | (optional) - -SourcesAPI.sourcesUserConnectionsSamlList(ordering: ordering, page: page, pageSize: pageSize, search: search, sourceSlug: sourceSlug) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **sourceSlug** | **String** | | [optional] - -### Return type - -[**PaginatedUserSAMLSourceConnectionList**](PaginatedUserSAMLSourceConnectionList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlPartialUpdate** -```swift - open class func sourcesUserConnectionsSamlPartialUpdate(id: Int, patchedUserSAMLSourceConnectionRequest: PatchedUserSAMLSourceConnectionRequest? = nil, completion: @escaping (_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User SAML Source Connection. -let patchedUserSAMLSourceConnectionRequest = PatchedUserSAMLSourceConnectionRequest(user: 123, identifier: "identifier_example") // PatchedUserSAMLSourceConnectionRequest | (optional) - -SourcesAPI.sourcesUserConnectionsSamlPartialUpdate(id: id, patchedUserSAMLSourceConnectionRequest: patchedUserSAMLSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User SAML Source Connection. | - **patchedUserSAMLSourceConnectionRequest** | [**PatchedUserSAMLSourceConnectionRequest**](PatchedUserSAMLSourceConnectionRequest.md) | | [optional] - -### Return type - -[**UserSAMLSourceConnection**](UserSAMLSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlRetrieve** -```swift - open class func sourcesUserConnectionsSamlRetrieve(id: Int, completion: @escaping (_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User SAML Source Connection. - -SourcesAPI.sourcesUserConnectionsSamlRetrieve(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User SAML Source Connection. | - -### Return type - -[**UserSAMLSourceConnection**](UserSAMLSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlUpdate** -```swift - open class func sourcesUserConnectionsSamlUpdate(id: Int, userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest, completion: @escaping (_ data: UserSAMLSourceConnection?, _ error: Error?) -> Void) -``` - - - -Source Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User SAML Source Connection. -let userSAMLSourceConnectionRequest = UserSAMLSourceConnectionRequest(user: 123, identifier: "identifier_example") // UserSAMLSourceConnectionRequest | - -SourcesAPI.sourcesUserConnectionsSamlUpdate(id: id, userSAMLSourceConnectionRequest: userSAMLSourceConnectionRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User SAML Source Connection. | - **userSAMLSourceConnectionRequest** | [**UserSAMLSourceConnectionRequest**](UserSAMLSourceConnectionRequest.md) | | - -### Return type - -[**UserSAMLSourceConnection**](UserSAMLSourceConnection.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sourcesUserConnectionsSamlUsedByList** -```swift - open class func sourcesUserConnectionsSamlUsedByList(id: Int, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let id = 987 // Int | A unique integer value identifying this User SAML Source Connection. - -SourcesAPI.sourcesUserConnectionsSamlUsedByList(id: id) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Int** | A unique integer value identifying this User SAML Source Connection. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/SpBindingEnum.md b/docs/SpBindingEnum.md deleted file mode 100644 index f1d8b50..0000000 --- a/docs/SpBindingEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# SpBindingEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Stage.md b/docs/Stage.md deleted file mode 100644 index 5e1f575..0000000 --- a/docs/Stage.md +++ /dev/null @@ -1,16 +0,0 @@ -# Stage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StagePrompt.md b/docs/StagePrompt.md deleted file mode 100644 index f0a91fc..0000000 --- a/docs/StagePrompt.md +++ /dev/null @@ -1,18 +0,0 @@ -# StagePrompt - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fieldKey** | **String** | | -**label** | **String** | | -**type** | [**PromptTypeEnum**](PromptTypeEnum.md) | | -**_required** | **Bool** | | -**placeholder** | **String** | | -**initialValue** | **String** | | -**order** | **Int** | | -**subText** | **String** | | -**choices** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StageRequest.md b/docs/StageRequest.md deleted file mode 100644 index abaf433..0000000 --- a/docs/StageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StagesAPI.md b/docs/StagesAPI.md deleted file mode 100644 index 7efb8d9..0000000 --- a/docs/StagesAPI.md +++ /dev/null @@ -1,8328 +0,0 @@ -# StagesAPI - -All URIs are relative to *http://localhost/api/v3* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**stagesAllDestroy**](StagesAPI.md#stagesalldestroy) | **DELETE** /stages/all/{stage_uuid}/ | -[**stagesAllList**](StagesAPI.md#stagesalllist) | **GET** /stages/all/ | -[**stagesAllRetrieve**](StagesAPI.md#stagesallretrieve) | **GET** /stages/all/{stage_uuid}/ | -[**stagesAllTypesList**](StagesAPI.md#stagesalltypeslist) | **GET** /stages/all/types/ | -[**stagesAllUsedByList**](StagesAPI.md#stagesallusedbylist) | **GET** /stages/all/{stage_uuid}/used_by/ | -[**stagesAllUserSettingsList**](StagesAPI.md#stagesallusersettingslist) | **GET** /stages/all/user_settings/ | -[**stagesAuthenticatorDuoCreate**](StagesAPI.md#stagesauthenticatorduocreate) | **POST** /stages/authenticator/duo/ | -[**stagesAuthenticatorDuoDestroy**](StagesAPI.md#stagesauthenticatorduodestroy) | **DELETE** /stages/authenticator/duo/{stage_uuid}/ | -[**stagesAuthenticatorDuoEnrollmentStatusCreate**](StagesAPI.md#stagesauthenticatorduoenrollmentstatuscreate) | **POST** /stages/authenticator/duo/{stage_uuid}/enrollment_status/ | -[**stagesAuthenticatorDuoImportDeviceManualCreate**](StagesAPI.md#stagesauthenticatorduoimportdevicemanualcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_device_manual/ | -[**stagesAuthenticatorDuoImportDevicesAutomaticCreate**](StagesAPI.md#stagesauthenticatorduoimportdevicesautomaticcreate) | **POST** /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/ | -[**stagesAuthenticatorDuoList**](StagesAPI.md#stagesauthenticatorduolist) | **GET** /stages/authenticator/duo/ | -[**stagesAuthenticatorDuoPartialUpdate**](StagesAPI.md#stagesauthenticatorduopartialupdate) | **PATCH** /stages/authenticator/duo/{stage_uuid}/ | -[**stagesAuthenticatorDuoRetrieve**](StagesAPI.md#stagesauthenticatorduoretrieve) | **GET** /stages/authenticator/duo/{stage_uuid}/ | -[**stagesAuthenticatorDuoUpdate**](StagesAPI.md#stagesauthenticatorduoupdate) | **PUT** /stages/authenticator/duo/{stage_uuid}/ | -[**stagesAuthenticatorDuoUsedByList**](StagesAPI.md#stagesauthenticatorduousedbylist) | **GET** /stages/authenticator/duo/{stage_uuid}/used_by/ | -[**stagesAuthenticatorSmsCreate**](StagesAPI.md#stagesauthenticatorsmscreate) | **POST** /stages/authenticator/sms/ | -[**stagesAuthenticatorSmsDestroy**](StagesAPI.md#stagesauthenticatorsmsdestroy) | **DELETE** /stages/authenticator/sms/{stage_uuid}/ | -[**stagesAuthenticatorSmsList**](StagesAPI.md#stagesauthenticatorsmslist) | **GET** /stages/authenticator/sms/ | -[**stagesAuthenticatorSmsPartialUpdate**](StagesAPI.md#stagesauthenticatorsmspartialupdate) | **PATCH** /stages/authenticator/sms/{stage_uuid}/ | -[**stagesAuthenticatorSmsRetrieve**](StagesAPI.md#stagesauthenticatorsmsretrieve) | **GET** /stages/authenticator/sms/{stage_uuid}/ | -[**stagesAuthenticatorSmsUpdate**](StagesAPI.md#stagesauthenticatorsmsupdate) | **PUT** /stages/authenticator/sms/{stage_uuid}/ | -[**stagesAuthenticatorSmsUsedByList**](StagesAPI.md#stagesauthenticatorsmsusedbylist) | **GET** /stages/authenticator/sms/{stage_uuid}/used_by/ | -[**stagesAuthenticatorStaticCreate**](StagesAPI.md#stagesauthenticatorstaticcreate) | **POST** /stages/authenticator/static/ | -[**stagesAuthenticatorStaticDestroy**](StagesAPI.md#stagesauthenticatorstaticdestroy) | **DELETE** /stages/authenticator/static/{stage_uuid}/ | -[**stagesAuthenticatorStaticList**](StagesAPI.md#stagesauthenticatorstaticlist) | **GET** /stages/authenticator/static/ | -[**stagesAuthenticatorStaticPartialUpdate**](StagesAPI.md#stagesauthenticatorstaticpartialupdate) | **PATCH** /stages/authenticator/static/{stage_uuid}/ | -[**stagesAuthenticatorStaticRetrieve**](StagesAPI.md#stagesauthenticatorstaticretrieve) | **GET** /stages/authenticator/static/{stage_uuid}/ | -[**stagesAuthenticatorStaticUpdate**](StagesAPI.md#stagesauthenticatorstaticupdate) | **PUT** /stages/authenticator/static/{stage_uuid}/ | -[**stagesAuthenticatorStaticUsedByList**](StagesAPI.md#stagesauthenticatorstaticusedbylist) | **GET** /stages/authenticator/static/{stage_uuid}/used_by/ | -[**stagesAuthenticatorTotpCreate**](StagesAPI.md#stagesauthenticatortotpcreate) | **POST** /stages/authenticator/totp/ | -[**stagesAuthenticatorTotpDestroy**](StagesAPI.md#stagesauthenticatortotpdestroy) | **DELETE** /stages/authenticator/totp/{stage_uuid}/ | -[**stagesAuthenticatorTotpList**](StagesAPI.md#stagesauthenticatortotplist) | **GET** /stages/authenticator/totp/ | -[**stagesAuthenticatorTotpPartialUpdate**](StagesAPI.md#stagesauthenticatortotppartialupdate) | **PATCH** /stages/authenticator/totp/{stage_uuid}/ | -[**stagesAuthenticatorTotpRetrieve**](StagesAPI.md#stagesauthenticatortotpretrieve) | **GET** /stages/authenticator/totp/{stage_uuid}/ | -[**stagesAuthenticatorTotpUpdate**](StagesAPI.md#stagesauthenticatortotpupdate) | **PUT** /stages/authenticator/totp/{stage_uuid}/ | -[**stagesAuthenticatorTotpUsedByList**](StagesAPI.md#stagesauthenticatortotpusedbylist) | **GET** /stages/authenticator/totp/{stage_uuid}/used_by/ | -[**stagesAuthenticatorValidateCreate**](StagesAPI.md#stagesauthenticatorvalidatecreate) | **POST** /stages/authenticator/validate/ | -[**stagesAuthenticatorValidateDestroy**](StagesAPI.md#stagesauthenticatorvalidatedestroy) | **DELETE** /stages/authenticator/validate/{stage_uuid}/ | -[**stagesAuthenticatorValidateList**](StagesAPI.md#stagesauthenticatorvalidatelist) | **GET** /stages/authenticator/validate/ | -[**stagesAuthenticatorValidatePartialUpdate**](StagesAPI.md#stagesauthenticatorvalidatepartialupdate) | **PATCH** /stages/authenticator/validate/{stage_uuid}/ | -[**stagesAuthenticatorValidateRetrieve**](StagesAPI.md#stagesauthenticatorvalidateretrieve) | **GET** /stages/authenticator/validate/{stage_uuid}/ | -[**stagesAuthenticatorValidateUpdate**](StagesAPI.md#stagesauthenticatorvalidateupdate) | **PUT** /stages/authenticator/validate/{stage_uuid}/ | -[**stagesAuthenticatorValidateUsedByList**](StagesAPI.md#stagesauthenticatorvalidateusedbylist) | **GET** /stages/authenticator/validate/{stage_uuid}/used_by/ | -[**stagesAuthenticatorWebauthnCreate**](StagesAPI.md#stagesauthenticatorwebauthncreate) | **POST** /stages/authenticator/webauthn/ | -[**stagesAuthenticatorWebauthnDestroy**](StagesAPI.md#stagesauthenticatorwebauthndestroy) | **DELETE** /stages/authenticator/webauthn/{stage_uuid}/ | -[**stagesAuthenticatorWebauthnList**](StagesAPI.md#stagesauthenticatorwebauthnlist) | **GET** /stages/authenticator/webauthn/ | -[**stagesAuthenticatorWebauthnPartialUpdate**](StagesAPI.md#stagesauthenticatorwebauthnpartialupdate) | **PATCH** /stages/authenticator/webauthn/{stage_uuid}/ | -[**stagesAuthenticatorWebauthnRetrieve**](StagesAPI.md#stagesauthenticatorwebauthnretrieve) | **GET** /stages/authenticator/webauthn/{stage_uuid}/ | -[**stagesAuthenticatorWebauthnUpdate**](StagesAPI.md#stagesauthenticatorwebauthnupdate) | **PUT** /stages/authenticator/webauthn/{stage_uuid}/ | -[**stagesAuthenticatorWebauthnUsedByList**](StagesAPI.md#stagesauthenticatorwebauthnusedbylist) | **GET** /stages/authenticator/webauthn/{stage_uuid}/used_by/ | -[**stagesCaptchaCreate**](StagesAPI.md#stagescaptchacreate) | **POST** /stages/captcha/ | -[**stagesCaptchaDestroy**](StagesAPI.md#stagescaptchadestroy) | **DELETE** /stages/captcha/{stage_uuid}/ | -[**stagesCaptchaList**](StagesAPI.md#stagescaptchalist) | **GET** /stages/captcha/ | -[**stagesCaptchaPartialUpdate**](StagesAPI.md#stagescaptchapartialupdate) | **PATCH** /stages/captcha/{stage_uuid}/ | -[**stagesCaptchaRetrieve**](StagesAPI.md#stagescaptcharetrieve) | **GET** /stages/captcha/{stage_uuid}/ | -[**stagesCaptchaUpdate**](StagesAPI.md#stagescaptchaupdate) | **PUT** /stages/captcha/{stage_uuid}/ | -[**stagesCaptchaUsedByList**](StagesAPI.md#stagescaptchausedbylist) | **GET** /stages/captcha/{stage_uuid}/used_by/ | -[**stagesConsentCreate**](StagesAPI.md#stagesconsentcreate) | **POST** /stages/consent/ | -[**stagesConsentDestroy**](StagesAPI.md#stagesconsentdestroy) | **DELETE** /stages/consent/{stage_uuid}/ | -[**stagesConsentList**](StagesAPI.md#stagesconsentlist) | **GET** /stages/consent/ | -[**stagesConsentPartialUpdate**](StagesAPI.md#stagesconsentpartialupdate) | **PATCH** /stages/consent/{stage_uuid}/ | -[**stagesConsentRetrieve**](StagesAPI.md#stagesconsentretrieve) | **GET** /stages/consent/{stage_uuid}/ | -[**stagesConsentUpdate**](StagesAPI.md#stagesconsentupdate) | **PUT** /stages/consent/{stage_uuid}/ | -[**stagesConsentUsedByList**](StagesAPI.md#stagesconsentusedbylist) | **GET** /stages/consent/{stage_uuid}/used_by/ | -[**stagesDenyCreate**](StagesAPI.md#stagesdenycreate) | **POST** /stages/deny/ | -[**stagesDenyDestroy**](StagesAPI.md#stagesdenydestroy) | **DELETE** /stages/deny/{stage_uuid}/ | -[**stagesDenyList**](StagesAPI.md#stagesdenylist) | **GET** /stages/deny/ | -[**stagesDenyPartialUpdate**](StagesAPI.md#stagesdenypartialupdate) | **PATCH** /stages/deny/{stage_uuid}/ | -[**stagesDenyRetrieve**](StagesAPI.md#stagesdenyretrieve) | **GET** /stages/deny/{stage_uuid}/ | -[**stagesDenyUpdate**](StagesAPI.md#stagesdenyupdate) | **PUT** /stages/deny/{stage_uuid}/ | -[**stagesDenyUsedByList**](StagesAPI.md#stagesdenyusedbylist) | **GET** /stages/deny/{stage_uuid}/used_by/ | -[**stagesDummyCreate**](StagesAPI.md#stagesdummycreate) | **POST** /stages/dummy/ | -[**stagesDummyDestroy**](StagesAPI.md#stagesdummydestroy) | **DELETE** /stages/dummy/{stage_uuid}/ | -[**stagesDummyList**](StagesAPI.md#stagesdummylist) | **GET** /stages/dummy/ | -[**stagesDummyPartialUpdate**](StagesAPI.md#stagesdummypartialupdate) | **PATCH** /stages/dummy/{stage_uuid}/ | -[**stagesDummyRetrieve**](StagesAPI.md#stagesdummyretrieve) | **GET** /stages/dummy/{stage_uuid}/ | -[**stagesDummyUpdate**](StagesAPI.md#stagesdummyupdate) | **PUT** /stages/dummy/{stage_uuid}/ | -[**stagesDummyUsedByList**](StagesAPI.md#stagesdummyusedbylist) | **GET** /stages/dummy/{stage_uuid}/used_by/ | -[**stagesEmailCreate**](StagesAPI.md#stagesemailcreate) | **POST** /stages/email/ | -[**stagesEmailDestroy**](StagesAPI.md#stagesemaildestroy) | **DELETE** /stages/email/{stage_uuid}/ | -[**stagesEmailList**](StagesAPI.md#stagesemaillist) | **GET** /stages/email/ | -[**stagesEmailPartialUpdate**](StagesAPI.md#stagesemailpartialupdate) | **PATCH** /stages/email/{stage_uuid}/ | -[**stagesEmailRetrieve**](StagesAPI.md#stagesemailretrieve) | **GET** /stages/email/{stage_uuid}/ | -[**stagesEmailTemplatesList**](StagesAPI.md#stagesemailtemplateslist) | **GET** /stages/email/templates/ | -[**stagesEmailUpdate**](StagesAPI.md#stagesemailupdate) | **PUT** /stages/email/{stage_uuid}/ | -[**stagesEmailUsedByList**](StagesAPI.md#stagesemailusedbylist) | **GET** /stages/email/{stage_uuid}/used_by/ | -[**stagesIdentificationCreate**](StagesAPI.md#stagesidentificationcreate) | **POST** /stages/identification/ | -[**stagesIdentificationDestroy**](StagesAPI.md#stagesidentificationdestroy) | **DELETE** /stages/identification/{stage_uuid}/ | -[**stagesIdentificationList**](StagesAPI.md#stagesidentificationlist) | **GET** /stages/identification/ | -[**stagesIdentificationPartialUpdate**](StagesAPI.md#stagesidentificationpartialupdate) | **PATCH** /stages/identification/{stage_uuid}/ | -[**stagesIdentificationRetrieve**](StagesAPI.md#stagesidentificationretrieve) | **GET** /stages/identification/{stage_uuid}/ | -[**stagesIdentificationUpdate**](StagesAPI.md#stagesidentificationupdate) | **PUT** /stages/identification/{stage_uuid}/ | -[**stagesIdentificationUsedByList**](StagesAPI.md#stagesidentificationusedbylist) | **GET** /stages/identification/{stage_uuid}/used_by/ | -[**stagesInvitationInvitationsCreate**](StagesAPI.md#stagesinvitationinvitationscreate) | **POST** /stages/invitation/invitations/ | -[**stagesInvitationInvitationsDestroy**](StagesAPI.md#stagesinvitationinvitationsdestroy) | **DELETE** /stages/invitation/invitations/{invite_uuid}/ | -[**stagesInvitationInvitationsList**](StagesAPI.md#stagesinvitationinvitationslist) | **GET** /stages/invitation/invitations/ | -[**stagesInvitationInvitationsPartialUpdate**](StagesAPI.md#stagesinvitationinvitationspartialupdate) | **PATCH** /stages/invitation/invitations/{invite_uuid}/ | -[**stagesInvitationInvitationsRetrieve**](StagesAPI.md#stagesinvitationinvitationsretrieve) | **GET** /stages/invitation/invitations/{invite_uuid}/ | -[**stagesInvitationInvitationsUpdate**](StagesAPI.md#stagesinvitationinvitationsupdate) | **PUT** /stages/invitation/invitations/{invite_uuid}/ | -[**stagesInvitationInvitationsUsedByList**](StagesAPI.md#stagesinvitationinvitationsusedbylist) | **GET** /stages/invitation/invitations/{invite_uuid}/used_by/ | -[**stagesInvitationStagesCreate**](StagesAPI.md#stagesinvitationstagescreate) | **POST** /stages/invitation/stages/ | -[**stagesInvitationStagesDestroy**](StagesAPI.md#stagesinvitationstagesdestroy) | **DELETE** /stages/invitation/stages/{stage_uuid}/ | -[**stagesInvitationStagesList**](StagesAPI.md#stagesinvitationstageslist) | **GET** /stages/invitation/stages/ | -[**stagesInvitationStagesPartialUpdate**](StagesAPI.md#stagesinvitationstagespartialupdate) | **PATCH** /stages/invitation/stages/{stage_uuid}/ | -[**stagesInvitationStagesRetrieve**](StagesAPI.md#stagesinvitationstagesretrieve) | **GET** /stages/invitation/stages/{stage_uuid}/ | -[**stagesInvitationStagesUpdate**](StagesAPI.md#stagesinvitationstagesupdate) | **PUT** /stages/invitation/stages/{stage_uuid}/ | -[**stagesInvitationStagesUsedByList**](StagesAPI.md#stagesinvitationstagesusedbylist) | **GET** /stages/invitation/stages/{stage_uuid}/used_by/ | -[**stagesPasswordCreate**](StagesAPI.md#stagespasswordcreate) | **POST** /stages/password/ | -[**stagesPasswordDestroy**](StagesAPI.md#stagespassworddestroy) | **DELETE** /stages/password/{stage_uuid}/ | -[**stagesPasswordList**](StagesAPI.md#stagespasswordlist) | **GET** /stages/password/ | -[**stagesPasswordPartialUpdate**](StagesAPI.md#stagespasswordpartialupdate) | **PATCH** /stages/password/{stage_uuid}/ | -[**stagesPasswordRetrieve**](StagesAPI.md#stagespasswordretrieve) | **GET** /stages/password/{stage_uuid}/ | -[**stagesPasswordUpdate**](StagesAPI.md#stagespasswordupdate) | **PUT** /stages/password/{stage_uuid}/ | -[**stagesPasswordUsedByList**](StagesAPI.md#stagespasswordusedbylist) | **GET** /stages/password/{stage_uuid}/used_by/ | -[**stagesPromptPromptsCreate**](StagesAPI.md#stagespromptpromptscreate) | **POST** /stages/prompt/prompts/ | -[**stagesPromptPromptsDestroy**](StagesAPI.md#stagespromptpromptsdestroy) | **DELETE** /stages/prompt/prompts/{prompt_uuid}/ | -[**stagesPromptPromptsList**](StagesAPI.md#stagespromptpromptslist) | **GET** /stages/prompt/prompts/ | -[**stagesPromptPromptsPartialUpdate**](StagesAPI.md#stagespromptpromptspartialupdate) | **PATCH** /stages/prompt/prompts/{prompt_uuid}/ | -[**stagesPromptPromptsPreviewCreate**](StagesAPI.md#stagespromptpromptspreviewcreate) | **POST** /stages/prompt/prompts/preview/ | -[**stagesPromptPromptsRetrieve**](StagesAPI.md#stagespromptpromptsretrieve) | **GET** /stages/prompt/prompts/{prompt_uuid}/ | -[**stagesPromptPromptsUpdate**](StagesAPI.md#stagespromptpromptsupdate) | **PUT** /stages/prompt/prompts/{prompt_uuid}/ | -[**stagesPromptPromptsUsedByList**](StagesAPI.md#stagespromptpromptsusedbylist) | **GET** /stages/prompt/prompts/{prompt_uuid}/used_by/ | -[**stagesPromptStagesCreate**](StagesAPI.md#stagespromptstagescreate) | **POST** /stages/prompt/stages/ | -[**stagesPromptStagesDestroy**](StagesAPI.md#stagespromptstagesdestroy) | **DELETE** /stages/prompt/stages/{stage_uuid}/ | -[**stagesPromptStagesList**](StagesAPI.md#stagespromptstageslist) | **GET** /stages/prompt/stages/ | -[**stagesPromptStagesPartialUpdate**](StagesAPI.md#stagespromptstagespartialupdate) | **PATCH** /stages/prompt/stages/{stage_uuid}/ | -[**stagesPromptStagesRetrieve**](StagesAPI.md#stagespromptstagesretrieve) | **GET** /stages/prompt/stages/{stage_uuid}/ | -[**stagesPromptStagesUpdate**](StagesAPI.md#stagespromptstagesupdate) | **PUT** /stages/prompt/stages/{stage_uuid}/ | -[**stagesPromptStagesUsedByList**](StagesAPI.md#stagespromptstagesusedbylist) | **GET** /stages/prompt/stages/{stage_uuid}/used_by/ | -[**stagesUserDeleteCreate**](StagesAPI.md#stagesuserdeletecreate) | **POST** /stages/user_delete/ | -[**stagesUserDeleteDestroy**](StagesAPI.md#stagesuserdeletedestroy) | **DELETE** /stages/user_delete/{stage_uuid}/ | -[**stagesUserDeleteList**](StagesAPI.md#stagesuserdeletelist) | **GET** /stages/user_delete/ | -[**stagesUserDeletePartialUpdate**](StagesAPI.md#stagesuserdeletepartialupdate) | **PATCH** /stages/user_delete/{stage_uuid}/ | -[**stagesUserDeleteRetrieve**](StagesAPI.md#stagesuserdeleteretrieve) | **GET** /stages/user_delete/{stage_uuid}/ | -[**stagesUserDeleteUpdate**](StagesAPI.md#stagesuserdeleteupdate) | **PUT** /stages/user_delete/{stage_uuid}/ | -[**stagesUserDeleteUsedByList**](StagesAPI.md#stagesuserdeleteusedbylist) | **GET** /stages/user_delete/{stage_uuid}/used_by/ | -[**stagesUserLoginCreate**](StagesAPI.md#stagesuserlogincreate) | **POST** /stages/user_login/ | -[**stagesUserLoginDestroy**](StagesAPI.md#stagesuserlogindestroy) | **DELETE** /stages/user_login/{stage_uuid}/ | -[**stagesUserLoginList**](StagesAPI.md#stagesuserloginlist) | **GET** /stages/user_login/ | -[**stagesUserLoginPartialUpdate**](StagesAPI.md#stagesuserloginpartialupdate) | **PATCH** /stages/user_login/{stage_uuid}/ | -[**stagesUserLoginRetrieve**](StagesAPI.md#stagesuserloginretrieve) | **GET** /stages/user_login/{stage_uuid}/ | -[**stagesUserLoginUpdate**](StagesAPI.md#stagesuserloginupdate) | **PUT** /stages/user_login/{stage_uuid}/ | -[**stagesUserLoginUsedByList**](StagesAPI.md#stagesuserloginusedbylist) | **GET** /stages/user_login/{stage_uuid}/used_by/ | -[**stagesUserLogoutCreate**](StagesAPI.md#stagesuserlogoutcreate) | **POST** /stages/user_logout/ | -[**stagesUserLogoutDestroy**](StagesAPI.md#stagesuserlogoutdestroy) | **DELETE** /stages/user_logout/{stage_uuid}/ | -[**stagesUserLogoutList**](StagesAPI.md#stagesuserlogoutlist) | **GET** /stages/user_logout/ | -[**stagesUserLogoutPartialUpdate**](StagesAPI.md#stagesuserlogoutpartialupdate) | **PATCH** /stages/user_logout/{stage_uuid}/ | -[**stagesUserLogoutRetrieve**](StagesAPI.md#stagesuserlogoutretrieve) | **GET** /stages/user_logout/{stage_uuid}/ | -[**stagesUserLogoutUpdate**](StagesAPI.md#stagesuserlogoutupdate) | **PUT** /stages/user_logout/{stage_uuid}/ | -[**stagesUserLogoutUsedByList**](StagesAPI.md#stagesuserlogoutusedbylist) | **GET** /stages/user_logout/{stage_uuid}/used_by/ | -[**stagesUserWriteCreate**](StagesAPI.md#stagesuserwritecreate) | **POST** /stages/user_write/ | -[**stagesUserWriteDestroy**](StagesAPI.md#stagesuserwritedestroy) | **DELETE** /stages/user_write/{stage_uuid}/ | -[**stagesUserWriteList**](StagesAPI.md#stagesuserwritelist) | **GET** /stages/user_write/ | -[**stagesUserWritePartialUpdate**](StagesAPI.md#stagesuserwritepartialupdate) | **PATCH** /stages/user_write/{stage_uuid}/ | -[**stagesUserWriteRetrieve**](StagesAPI.md#stagesuserwriteretrieve) | **GET** /stages/user_write/{stage_uuid}/ | -[**stagesUserWriteUpdate**](StagesAPI.md#stagesuserwriteupdate) | **PUT** /stages/user_write/{stage_uuid}/ | -[**stagesUserWriteUsedByList**](StagesAPI.md#stagesuserwriteusedbylist) | **GET** /stages/user_write/{stage_uuid}/used_by/ | - - -# **stagesAllDestroy** -```swift - open class func stagesAllDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Stage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this stage. - -StagesAPI.stagesAllDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAllList** -```swift - open class func stagesAllList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedStageList?, _ error: Error?) -> Void) -``` - - - -Stage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesAllList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedStageList**](PaginatedStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAllRetrieve** -```swift - open class func stagesAllRetrieve(stageUuid: UUID, completion: @escaping (_ data: Stage?, _ error: Error?) -> Void) -``` - - - -Stage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this stage. - -StagesAPI.stagesAllRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this stage. | - -### Return type - -[**Stage**](Stage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAllTypesList** -```swift - open class func stagesAllTypesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all creatable stage types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -StagesAPI.stagesAllTypesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAllUsedByList** -```swift - open class func stagesAllUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this stage. - -StagesAPI.stagesAllUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAllUserSettingsList** -```swift - open class func stagesAllUserSettingsList(completion: @escaping (_ data: [UserSetting]?, _ error: Error?) -> Void) -``` - - - -Get all stages the user can configure - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -StagesAPI.stagesAllUserSettingsList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[UserSetting]**](UserSetting.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoCreate** -```swift - open class func stagesAuthenticatorDuoCreate(authenticatorDuoStageRequest: AuthenticatorDuoStageRequest, completion: @escaping (_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorDuoStageRequest = AuthenticatorDuoStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", clientId: "clientId_example", clientSecret: "clientSecret_example", apiHostname: "apiHostname_example", adminIntegrationKey: "adminIntegrationKey_example", adminSecretKey: "adminSecretKey_example") // AuthenticatorDuoStageRequest | - -StagesAPI.stagesAuthenticatorDuoCreate(authenticatorDuoStageRequest: authenticatorDuoStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorDuoStageRequest** | [**AuthenticatorDuoStageRequest**](AuthenticatorDuoStageRequest.md) | | - -### Return type - -[**AuthenticatorDuoStage**](AuthenticatorDuoStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoDestroy** -```swift - open class func stagesAuthenticatorDuoDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorDuoDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoEnrollmentStatusCreate** -```swift - open class func stagesAuthenticatorDuoEnrollmentStatusCreate(stageUuid: UUID, completion: @escaping (_ data: DuoDeviceEnrollmentStatus?, _ error: Error?) -> Void) -``` - - - -Check enrollment status of user details in current session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorDuoEnrollmentStatusCreate(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - -### Return type - -[**DuoDeviceEnrollmentStatus**](DuoDeviceEnrollmentStatus.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoImportDeviceManualCreate** -```swift - open class func stagesAuthenticatorDuoImportDeviceManualCreate(stageUuid: UUID, authenticatorDuoStageManualDeviceImportRequest: AuthenticatorDuoStageManualDeviceImportRequest, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Import duo devices into authentik - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. -let authenticatorDuoStageManualDeviceImportRequest = AuthenticatorDuoStageManualDeviceImportRequest(duoUserId: "duoUserId_example", username: "username_example") // AuthenticatorDuoStageManualDeviceImportRequest | - -StagesAPI.stagesAuthenticatorDuoImportDeviceManualCreate(stageUuid: stageUuid, authenticatorDuoStageManualDeviceImportRequest: authenticatorDuoStageManualDeviceImportRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - **authenticatorDuoStageManualDeviceImportRequest** | [**AuthenticatorDuoStageManualDeviceImportRequest**](AuthenticatorDuoStageManualDeviceImportRequest.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoImportDevicesAutomaticCreate** -```swift - open class func stagesAuthenticatorDuoImportDevicesAutomaticCreate(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorDuoStageDeviceImportResponse?, _ error: Error?) -> Void) -``` - - - -Import duo devices into authentik - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorDuoImportDevicesAutomaticCreate(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - -### Return type - -[**AuthenticatorDuoStageDeviceImportResponse**](AuthenticatorDuoStageDeviceImportResponse.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoList** -```swift - open class func stagesAuthenticatorDuoList(apiHostname: String? = nil, clientId: String? = nil, configureFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedAuthenticatorDuoStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let apiHostname = "apiHostname_example" // String | (optional) -let clientId = "clientId_example" // String | (optional) -let configureFlow = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesAuthenticatorDuoList(apiHostname: apiHostname, clientId: clientId, configureFlow: configureFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiHostname** | **String** | | [optional] - **clientId** | **String** | | [optional] - **configureFlow** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedAuthenticatorDuoStageList**](PaginatedAuthenticatorDuoStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoPartialUpdate** -```swift - open class func stagesAuthenticatorDuoPartialUpdate(stageUuid: UUID, patchedAuthenticatorDuoStageRequest: PatchedAuthenticatorDuoStageRequest? = nil, completion: @escaping (_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. -let patchedAuthenticatorDuoStageRequest = PatchedAuthenticatorDuoStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", clientId: "clientId_example", clientSecret: "clientSecret_example", apiHostname: "apiHostname_example", adminIntegrationKey: "adminIntegrationKey_example", adminSecretKey: "adminSecretKey_example") // PatchedAuthenticatorDuoStageRequest | (optional) - -StagesAPI.stagesAuthenticatorDuoPartialUpdate(stageUuid: stageUuid, patchedAuthenticatorDuoStageRequest: patchedAuthenticatorDuoStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - **patchedAuthenticatorDuoStageRequest** | [**PatchedAuthenticatorDuoStageRequest**](PatchedAuthenticatorDuoStageRequest.md) | | [optional] - -### Return type - -[**AuthenticatorDuoStage**](AuthenticatorDuoStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoRetrieve** -```swift - open class func stagesAuthenticatorDuoRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorDuoRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - -### Return type - -[**AuthenticatorDuoStage**](AuthenticatorDuoStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoUpdate** -```swift - open class func stagesAuthenticatorDuoUpdate(stageUuid: UUID, authenticatorDuoStageRequest: AuthenticatorDuoStageRequest, completion: @escaping (_ data: AuthenticatorDuoStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorDuoStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. -let authenticatorDuoStageRequest = AuthenticatorDuoStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", clientId: "clientId_example", clientSecret: "clientSecret_example", apiHostname: "apiHostname_example", adminIntegrationKey: "adminIntegrationKey_example", adminSecretKey: "adminSecretKey_example") // AuthenticatorDuoStageRequest | - -StagesAPI.stagesAuthenticatorDuoUpdate(stageUuid: stageUuid, authenticatorDuoStageRequest: authenticatorDuoStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - **authenticatorDuoStageRequest** | [**AuthenticatorDuoStageRequest**](AuthenticatorDuoStageRequest.md) | | - -### Return type - -[**AuthenticatorDuoStage**](AuthenticatorDuoStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorDuoUsedByList** -```swift - open class func stagesAuthenticatorDuoUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Duo Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorDuoUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Duo Authenticator Setup Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsCreate** -```swift - open class func stagesAuthenticatorSmsCreate(authenticatorSMSStageRequest: AuthenticatorSMSStageRequest, completion: @escaping (_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorSMSStageRequest = AuthenticatorSMSStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", provider: ProviderEnum(), fromNumber: "fromNumber_example", accountSid: "accountSid_example", auth: "auth_example", authPassword: "authPassword_example", authType: AuthTypeEnum(), verifyOnly: false, mapping: 123) // AuthenticatorSMSStageRequest | - -StagesAPI.stagesAuthenticatorSmsCreate(authenticatorSMSStageRequest: authenticatorSMSStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorSMSStageRequest** | [**AuthenticatorSMSStageRequest**](AuthenticatorSMSStageRequest.md) | | - -### Return type - -[**AuthenticatorSMSStage**](AuthenticatorSMSStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsDestroy** -```swift - open class func stagesAuthenticatorSmsDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this SMS Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorSmsDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this SMS Authenticator Setup Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsList** -```swift - open class func stagesAuthenticatorSmsList(accountSid: String? = nil, auth: String? = nil, authPassword: String? = nil, authType: AuthType_stagesAuthenticatorSmsList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, fromNumber: String? = nil, mapping: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, provider: Provider_stagesAuthenticatorSmsList? = nil, search: String? = nil, stageUuid: UUID? = nil, verifyOnly: Bool? = nil, completion: @escaping (_ data: PaginatedAuthenticatorSMSStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let accountSid = "accountSid_example" // String | (optional) -let auth = "auth_example" // String | (optional) -let authPassword = "authPassword_example" // String | (optional) -let authType = "authType_example" // String | * `basic` - Basic * `bearer` - Bearer (optional) -let configureFlow = 987 // UUID | (optional) -let friendlyName = "friendlyName_example" // String | (optional) -let fromNumber = "fromNumber_example" // String | (optional) -let mapping = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let provider = "provider_example" // String | * `twilio` - Twilio * `generic` - Generic (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let verifyOnly = true // Bool | (optional) - -StagesAPI.stagesAuthenticatorSmsList(accountSid: accountSid, auth: auth, authPassword: authPassword, authType: authType, configureFlow: configureFlow, friendlyName: friendlyName, fromNumber: fromNumber, mapping: mapping, name: name, ordering: ordering, page: page, pageSize: pageSize, provider: provider, search: search, stageUuid: stageUuid, verifyOnly: verifyOnly) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accountSid** | **String** | | [optional] - **auth** | **String** | | [optional] - **authPassword** | **String** | | [optional] - **authType** | **String** | * `basic` - Basic * `bearer` - Bearer | [optional] - **configureFlow** | **UUID** | | [optional] - **friendlyName** | **String** | | [optional] - **fromNumber** | **String** | | [optional] - **mapping** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **provider** | **String** | * `twilio` - Twilio * `generic` - Generic | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **verifyOnly** | **Bool** | | [optional] - -### Return type - -[**PaginatedAuthenticatorSMSStageList**](PaginatedAuthenticatorSMSStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsPartialUpdate** -```swift - open class func stagesAuthenticatorSmsPartialUpdate(stageUuid: UUID, patchedAuthenticatorSMSStageRequest: PatchedAuthenticatorSMSStageRequest? = nil, completion: @escaping (_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this SMS Authenticator Setup Stage. -let patchedAuthenticatorSMSStageRequest = PatchedAuthenticatorSMSStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", provider: ProviderEnum(), fromNumber: "fromNumber_example", accountSid: "accountSid_example", auth: "auth_example", authPassword: "authPassword_example", authType: AuthTypeEnum(), verifyOnly: false, mapping: 123) // PatchedAuthenticatorSMSStageRequest | (optional) - -StagesAPI.stagesAuthenticatorSmsPartialUpdate(stageUuid: stageUuid, patchedAuthenticatorSMSStageRequest: patchedAuthenticatorSMSStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this SMS Authenticator Setup Stage. | - **patchedAuthenticatorSMSStageRequest** | [**PatchedAuthenticatorSMSStageRequest**](PatchedAuthenticatorSMSStageRequest.md) | | [optional] - -### Return type - -[**AuthenticatorSMSStage**](AuthenticatorSMSStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsRetrieve** -```swift - open class func stagesAuthenticatorSmsRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this SMS Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorSmsRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this SMS Authenticator Setup Stage. | - -### Return type - -[**AuthenticatorSMSStage**](AuthenticatorSMSStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsUpdate** -```swift - open class func stagesAuthenticatorSmsUpdate(stageUuid: UUID, authenticatorSMSStageRequest: AuthenticatorSMSStageRequest, completion: @escaping (_ data: AuthenticatorSMSStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorSMSStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this SMS Authenticator Setup Stage. -let authenticatorSMSStageRequest = AuthenticatorSMSStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", provider: ProviderEnum(), fromNumber: "fromNumber_example", accountSid: "accountSid_example", auth: "auth_example", authPassword: "authPassword_example", authType: AuthTypeEnum(), verifyOnly: false, mapping: 123) // AuthenticatorSMSStageRequest | - -StagesAPI.stagesAuthenticatorSmsUpdate(stageUuid: stageUuid, authenticatorSMSStageRequest: authenticatorSMSStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this SMS Authenticator Setup Stage. | - **authenticatorSMSStageRequest** | [**AuthenticatorSMSStageRequest**](AuthenticatorSMSStageRequest.md) | | - -### Return type - -[**AuthenticatorSMSStage**](AuthenticatorSMSStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorSmsUsedByList** -```swift - open class func stagesAuthenticatorSmsUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this SMS Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorSmsUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this SMS Authenticator Setup Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticCreate** -```swift - open class func stagesAuthenticatorStaticCreate(authenticatorStaticStageRequest: AuthenticatorStaticStageRequest, completion: @escaping (_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorStaticStageRequest = AuthenticatorStaticStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", tokenCount: 123, tokenLength: 123) // AuthenticatorStaticStageRequest | - -StagesAPI.stagesAuthenticatorStaticCreate(authenticatorStaticStageRequest: authenticatorStaticStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorStaticStageRequest** | [**AuthenticatorStaticStageRequest**](AuthenticatorStaticStageRequest.md) | | - -### Return type - -[**AuthenticatorStaticStage**](AuthenticatorStaticStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticDestroy** -```swift - open class func stagesAuthenticatorStaticDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Static Authenticator Stage. - -StagesAPI.stagesAuthenticatorStaticDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Static Authenticator Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticList** -```swift - open class func stagesAuthenticatorStaticList(configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, tokenCount: Int? = nil, tokenLength: Int? = nil, completion: @escaping (_ data: PaginatedAuthenticatorStaticStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let configureFlow = 987 // UUID | (optional) -let friendlyName = "friendlyName_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let tokenCount = 987 // Int | (optional) -let tokenLength = 987 // Int | (optional) - -StagesAPI.stagesAuthenticatorStaticList(configureFlow: configureFlow, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, tokenCount: tokenCount, tokenLength: tokenLength) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **configureFlow** | **UUID** | | [optional] - **friendlyName** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **tokenCount** | **Int** | | [optional] - **tokenLength** | **Int** | | [optional] - -### Return type - -[**PaginatedAuthenticatorStaticStageList**](PaginatedAuthenticatorStaticStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticPartialUpdate** -```swift - open class func stagesAuthenticatorStaticPartialUpdate(stageUuid: UUID, patchedAuthenticatorStaticStageRequest: PatchedAuthenticatorStaticStageRequest? = nil, completion: @escaping (_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Static Authenticator Stage. -let patchedAuthenticatorStaticStageRequest = PatchedAuthenticatorStaticStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", tokenCount: 123, tokenLength: 123) // PatchedAuthenticatorStaticStageRequest | (optional) - -StagesAPI.stagesAuthenticatorStaticPartialUpdate(stageUuid: stageUuid, patchedAuthenticatorStaticStageRequest: patchedAuthenticatorStaticStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Static Authenticator Stage. | - **patchedAuthenticatorStaticStageRequest** | [**PatchedAuthenticatorStaticStageRequest**](PatchedAuthenticatorStaticStageRequest.md) | | [optional] - -### Return type - -[**AuthenticatorStaticStage**](AuthenticatorStaticStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticRetrieve** -```swift - open class func stagesAuthenticatorStaticRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Static Authenticator Stage. - -StagesAPI.stagesAuthenticatorStaticRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Static Authenticator Stage. | - -### Return type - -[**AuthenticatorStaticStage**](AuthenticatorStaticStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticUpdate** -```swift - open class func stagesAuthenticatorStaticUpdate(stageUuid: UUID, authenticatorStaticStageRequest: AuthenticatorStaticStageRequest, completion: @escaping (_ data: AuthenticatorStaticStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorStaticStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Static Authenticator Stage. -let authenticatorStaticStageRequest = AuthenticatorStaticStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", tokenCount: 123, tokenLength: 123) // AuthenticatorStaticStageRequest | - -StagesAPI.stagesAuthenticatorStaticUpdate(stageUuid: stageUuid, authenticatorStaticStageRequest: authenticatorStaticStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Static Authenticator Stage. | - **authenticatorStaticStageRequest** | [**AuthenticatorStaticStageRequest**](AuthenticatorStaticStageRequest.md) | | - -### Return type - -[**AuthenticatorStaticStage**](AuthenticatorStaticStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorStaticUsedByList** -```swift - open class func stagesAuthenticatorStaticUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Static Authenticator Stage. - -StagesAPI.stagesAuthenticatorStaticUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Static Authenticator Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpCreate** -```swift - open class func stagesAuthenticatorTotpCreate(authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest, completion: @escaping (_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorTOTPStageRequest = AuthenticatorTOTPStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", digits: DigitsEnum()) // AuthenticatorTOTPStageRequest | - -StagesAPI.stagesAuthenticatorTotpCreate(authenticatorTOTPStageRequest: authenticatorTOTPStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorTOTPStageRequest** | [**AuthenticatorTOTPStageRequest**](AuthenticatorTOTPStageRequest.md) | | - -### Return type - -[**AuthenticatorTOTPStage**](AuthenticatorTOTPStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpDestroy** -```swift - open class func stagesAuthenticatorTotpDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this TOTP Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorTotpDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this TOTP Authenticator Setup Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpList** -```swift - open class func stagesAuthenticatorTotpList(configureFlow: UUID? = nil, digits: Digits_stagesAuthenticatorTotpList? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedAuthenticatorTOTPStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let configureFlow = 987 // UUID | (optional) -let digits = "digits_example" // String | * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator (optional) -let friendlyName = "friendlyName_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesAuthenticatorTotpList(configureFlow: configureFlow, digits: digits, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **configureFlow** | **UUID** | | [optional] - **digits** | **String** | * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator | [optional] - **friendlyName** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedAuthenticatorTOTPStageList**](PaginatedAuthenticatorTOTPStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpPartialUpdate** -```swift - open class func stagesAuthenticatorTotpPartialUpdate(stageUuid: UUID, patchedAuthenticatorTOTPStageRequest: PatchedAuthenticatorTOTPStageRequest? = nil, completion: @escaping (_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this TOTP Authenticator Setup Stage. -let patchedAuthenticatorTOTPStageRequest = PatchedAuthenticatorTOTPStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", digits: DigitsEnum()) // PatchedAuthenticatorTOTPStageRequest | (optional) - -StagesAPI.stagesAuthenticatorTotpPartialUpdate(stageUuid: stageUuid, patchedAuthenticatorTOTPStageRequest: patchedAuthenticatorTOTPStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this TOTP Authenticator Setup Stage. | - **patchedAuthenticatorTOTPStageRequest** | [**PatchedAuthenticatorTOTPStageRequest**](PatchedAuthenticatorTOTPStageRequest.md) | | [optional] - -### Return type - -[**AuthenticatorTOTPStage**](AuthenticatorTOTPStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpRetrieve** -```swift - open class func stagesAuthenticatorTotpRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this TOTP Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorTotpRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this TOTP Authenticator Setup Stage. | - -### Return type - -[**AuthenticatorTOTPStage**](AuthenticatorTOTPStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpUpdate** -```swift - open class func stagesAuthenticatorTotpUpdate(stageUuid: UUID, authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest, completion: @escaping (_ data: AuthenticatorTOTPStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorTOTPStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this TOTP Authenticator Setup Stage. -let authenticatorTOTPStageRequest = AuthenticatorTOTPStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", digits: DigitsEnum()) // AuthenticatorTOTPStageRequest | - -StagesAPI.stagesAuthenticatorTotpUpdate(stageUuid: stageUuid, authenticatorTOTPStageRequest: authenticatorTOTPStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this TOTP Authenticator Setup Stage. | - **authenticatorTOTPStageRequest** | [**AuthenticatorTOTPStageRequest**](AuthenticatorTOTPStageRequest.md) | | - -### Return type - -[**AuthenticatorTOTPStage**](AuthenticatorTOTPStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorTotpUsedByList** -```swift - open class func stagesAuthenticatorTotpUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this TOTP Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorTotpUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this TOTP Authenticator Setup Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateCreate** -```swift - open class func stagesAuthenticatorValidateCreate(authenticatorValidateStageRequest: AuthenticatorValidateStageRequest, completion: @escaping (_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorValidateStageRequest = AuthenticatorValidateStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], notConfiguredAction: NotConfiguredActionEnum(), deviceClasses: [DeviceClassesEnum()], configurationStages: [123], lastAuthThreshold: "lastAuthThreshold_example", webauthnUserVerification: UserVerificationEnum()) // AuthenticatorValidateStageRequest | - -StagesAPI.stagesAuthenticatorValidateCreate(authenticatorValidateStageRequest: authenticatorValidateStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorValidateStageRequest** | [**AuthenticatorValidateStageRequest**](AuthenticatorValidateStageRequest.md) | | - -### Return type - -[**AuthenticatorValidateStage**](AuthenticatorValidateStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateDestroy** -```swift - open class func stagesAuthenticatorValidateDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Authenticator Validation Stage. - -StagesAPI.stagesAuthenticatorValidateDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Authenticator Validation Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateList** -```swift - open class func stagesAuthenticatorValidateList(configurationStages: [UUID]? = nil, name: String? = nil, notConfiguredAction: NotConfiguredAction_stagesAuthenticatorValidateList? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedAuthenticatorValidateStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let configurationStages = [123] // [UUID] | (optional) -let name = "name_example" // String | (optional) -let notConfiguredAction = "notConfiguredAction_example" // String | * `skip` - Skip * `deny` - Deny * `configure` - Configure (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesAuthenticatorValidateList(configurationStages: configurationStages, name: name, notConfiguredAction: notConfiguredAction, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **configurationStages** | [**[UUID]**](UUID.md) | | [optional] - **name** | **String** | | [optional] - **notConfiguredAction** | **String** | * `skip` - Skip * `deny` - Deny * `configure` - Configure | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedAuthenticatorValidateStageList**](PaginatedAuthenticatorValidateStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidatePartialUpdate** -```swift - open class func stagesAuthenticatorValidatePartialUpdate(stageUuid: UUID, patchedAuthenticatorValidateStageRequest: PatchedAuthenticatorValidateStageRequest? = nil, completion: @escaping (_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Authenticator Validation Stage. -let patchedAuthenticatorValidateStageRequest = PatchedAuthenticatorValidateStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], notConfiguredAction: NotConfiguredActionEnum(), deviceClasses: [DeviceClassesEnum()], configurationStages: [123], lastAuthThreshold: "lastAuthThreshold_example", webauthnUserVerification: UserVerificationEnum()) // PatchedAuthenticatorValidateStageRequest | (optional) - -StagesAPI.stagesAuthenticatorValidatePartialUpdate(stageUuid: stageUuid, patchedAuthenticatorValidateStageRequest: patchedAuthenticatorValidateStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Authenticator Validation Stage. | - **patchedAuthenticatorValidateStageRequest** | [**PatchedAuthenticatorValidateStageRequest**](PatchedAuthenticatorValidateStageRequest.md) | | [optional] - -### Return type - -[**AuthenticatorValidateStage**](AuthenticatorValidateStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateRetrieve** -```swift - open class func stagesAuthenticatorValidateRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Authenticator Validation Stage. - -StagesAPI.stagesAuthenticatorValidateRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Authenticator Validation Stage. | - -### Return type - -[**AuthenticatorValidateStage**](AuthenticatorValidateStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateUpdate** -```swift - open class func stagesAuthenticatorValidateUpdate(stageUuid: UUID, authenticatorValidateStageRequest: AuthenticatorValidateStageRequest, completion: @escaping (_ data: AuthenticatorValidateStage?, _ error: Error?) -> Void) -``` - - - -AuthenticatorValidateStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Authenticator Validation Stage. -let authenticatorValidateStageRequest = AuthenticatorValidateStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], notConfiguredAction: NotConfiguredActionEnum(), deviceClasses: [DeviceClassesEnum()], configurationStages: [123], lastAuthThreshold: "lastAuthThreshold_example", webauthnUserVerification: UserVerificationEnum()) // AuthenticatorValidateStageRequest | - -StagesAPI.stagesAuthenticatorValidateUpdate(stageUuid: stageUuid, authenticatorValidateStageRequest: authenticatorValidateStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Authenticator Validation Stage. | - **authenticatorValidateStageRequest** | [**AuthenticatorValidateStageRequest**](AuthenticatorValidateStageRequest.md) | | - -### Return type - -[**AuthenticatorValidateStage**](AuthenticatorValidateStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorValidateUsedByList** -```swift - open class func stagesAuthenticatorValidateUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Authenticator Validation Stage. - -StagesAPI.stagesAuthenticatorValidateUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Authenticator Validation Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnCreate** -```swift - open class func stagesAuthenticatorWebauthnCreate(authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest, completion: @escaping (_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticateWebAuthnStageRequest = AuthenticateWebAuthnStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", userVerification: UserVerificationEnum(), authenticatorAttachment: AuthenticatorAttachmentEnum(), residentKeyRequirement: ResidentKeyRequirementEnum()) // AuthenticateWebAuthnStageRequest | - -StagesAPI.stagesAuthenticatorWebauthnCreate(authenticateWebAuthnStageRequest: authenticateWebAuthnStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticateWebAuthnStageRequest** | [**AuthenticateWebAuthnStageRequest**](AuthenticateWebAuthnStageRequest.md) | | - -### Return type - -[**AuthenticateWebAuthnStage**](AuthenticateWebAuthnStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnDestroy** -```swift - open class func stagesAuthenticatorWebauthnDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this WebAuthn Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorWebauthnDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this WebAuthn Authenticator Setup Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnList** -```swift - open class func stagesAuthenticatorWebauthnList(authenticatorAttachment: AuthenticatorAttachment_stagesAuthenticatorWebauthnList? = nil, configureFlow: UUID? = nil, friendlyName: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, residentKeyRequirement: ResidentKeyRequirement_stagesAuthenticatorWebauthnList? = nil, search: String? = nil, stageUuid: UUID? = nil, userVerification: UserVerification_stagesAuthenticatorWebauthnList? = nil, completion: @escaping (_ data: PaginatedAuthenticateWebAuthnStageList?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let authenticatorAttachment = "authenticatorAttachment_example" // String | * `platform` - Platform * `cross-platform` - Cross Platform (optional) -let configureFlow = 987 // UUID | (optional) -let friendlyName = "friendlyName_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let residentKeyRequirement = "residentKeyRequirement_example" // String | * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let userVerification = "userVerification_example" // String | * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged (optional) - -StagesAPI.stagesAuthenticatorWebauthnList(authenticatorAttachment: authenticatorAttachment, configureFlow: configureFlow, friendlyName: friendlyName, name: name, ordering: ordering, page: page, pageSize: pageSize, residentKeyRequirement: residentKeyRequirement, search: search, stageUuid: stageUuid, userVerification: userVerification) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authenticatorAttachment** | **String** | * `platform` - Platform * `cross-platform` - Cross Platform | [optional] - **configureFlow** | **UUID** | | [optional] - **friendlyName** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **residentKeyRequirement** | **String** | * `discouraged` - Discouraged * `preferred` - Preferred * `required` - Required | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **userVerification** | **String** | * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] - -### Return type - -[**PaginatedAuthenticateWebAuthnStageList**](PaginatedAuthenticateWebAuthnStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnPartialUpdate** -```swift - open class func stagesAuthenticatorWebauthnPartialUpdate(stageUuid: UUID, patchedAuthenticateWebAuthnStageRequest: PatchedAuthenticateWebAuthnStageRequest? = nil, completion: @escaping (_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this WebAuthn Authenticator Setup Stage. -let patchedAuthenticateWebAuthnStageRequest = PatchedAuthenticateWebAuthnStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", userVerification: UserVerificationEnum(), authenticatorAttachment: AuthenticatorAttachmentEnum(), residentKeyRequirement: ResidentKeyRequirementEnum()) // PatchedAuthenticateWebAuthnStageRequest | (optional) - -StagesAPI.stagesAuthenticatorWebauthnPartialUpdate(stageUuid: stageUuid, patchedAuthenticateWebAuthnStageRequest: patchedAuthenticateWebAuthnStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this WebAuthn Authenticator Setup Stage. | - **patchedAuthenticateWebAuthnStageRequest** | [**PatchedAuthenticateWebAuthnStageRequest**](PatchedAuthenticateWebAuthnStageRequest.md) | | [optional] - -### Return type - -[**AuthenticateWebAuthnStage**](AuthenticateWebAuthnStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnRetrieve** -```swift - open class func stagesAuthenticatorWebauthnRetrieve(stageUuid: UUID, completion: @escaping (_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this WebAuthn Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorWebauthnRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this WebAuthn Authenticator Setup Stage. | - -### Return type - -[**AuthenticateWebAuthnStage**](AuthenticateWebAuthnStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnUpdate** -```swift - open class func stagesAuthenticatorWebauthnUpdate(stageUuid: UUID, authenticateWebAuthnStageRequest: AuthenticateWebAuthnStageRequest, completion: @escaping (_ data: AuthenticateWebAuthnStage?, _ error: Error?) -> Void) -``` - - - -AuthenticateWebAuthnStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this WebAuthn Authenticator Setup Stage. -let authenticateWebAuthnStageRequest = AuthenticateWebAuthnStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], configureFlow: 123, friendlyName: "friendlyName_example", userVerification: UserVerificationEnum(), authenticatorAttachment: AuthenticatorAttachmentEnum(), residentKeyRequirement: ResidentKeyRequirementEnum()) // AuthenticateWebAuthnStageRequest | - -StagesAPI.stagesAuthenticatorWebauthnUpdate(stageUuid: stageUuid, authenticateWebAuthnStageRequest: authenticateWebAuthnStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this WebAuthn Authenticator Setup Stage. | - **authenticateWebAuthnStageRequest** | [**AuthenticateWebAuthnStageRequest**](AuthenticateWebAuthnStageRequest.md) | | - -### Return type - -[**AuthenticateWebAuthnStage**](AuthenticateWebAuthnStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesAuthenticatorWebauthnUsedByList** -```swift - open class func stagesAuthenticatorWebauthnUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this WebAuthn Authenticator Setup Stage. - -StagesAPI.stagesAuthenticatorWebauthnUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this WebAuthn Authenticator Setup Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaCreate** -```swift - open class func stagesCaptchaCreate(captchaStageRequest: CaptchaStageRequest, completion: @escaping (_ data: CaptchaStage?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let captchaStageRequest = CaptchaStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], publicKey: "publicKey_example", privateKey: "privateKey_example", jsUrl: "jsUrl_example", apiUrl: "apiUrl_example") // CaptchaStageRequest | - -StagesAPI.stagesCaptchaCreate(captchaStageRequest: captchaStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **captchaStageRequest** | [**CaptchaStageRequest**](CaptchaStageRequest.md) | | - -### Return type - -[**CaptchaStage**](CaptchaStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaDestroy** -```swift - open class func stagesCaptchaDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Captcha Stage. - -StagesAPI.stagesCaptchaDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Captcha Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaList** -```swift - open class func stagesCaptchaList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, publicKey: String? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedCaptchaStageList?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let publicKey = "publicKey_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesCaptchaList(name: name, ordering: ordering, page: page, pageSize: pageSize, publicKey: publicKey, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **publicKey** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedCaptchaStageList**](PaginatedCaptchaStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaPartialUpdate** -```swift - open class func stagesCaptchaPartialUpdate(stageUuid: UUID, patchedCaptchaStageRequest: PatchedCaptchaStageRequest? = nil, completion: @escaping (_ data: CaptchaStage?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Captcha Stage. -let patchedCaptchaStageRequest = PatchedCaptchaStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], publicKey: "publicKey_example", privateKey: "privateKey_example", jsUrl: "jsUrl_example", apiUrl: "apiUrl_example") // PatchedCaptchaStageRequest | (optional) - -StagesAPI.stagesCaptchaPartialUpdate(stageUuid: stageUuid, patchedCaptchaStageRequest: patchedCaptchaStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Captcha Stage. | - **patchedCaptchaStageRequest** | [**PatchedCaptchaStageRequest**](PatchedCaptchaStageRequest.md) | | [optional] - -### Return type - -[**CaptchaStage**](CaptchaStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaRetrieve** -```swift - open class func stagesCaptchaRetrieve(stageUuid: UUID, completion: @escaping (_ data: CaptchaStage?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Captcha Stage. - -StagesAPI.stagesCaptchaRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Captcha Stage. | - -### Return type - -[**CaptchaStage**](CaptchaStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaUpdate** -```swift - open class func stagesCaptchaUpdate(stageUuid: UUID, captchaStageRequest: CaptchaStageRequest, completion: @escaping (_ data: CaptchaStage?, _ error: Error?) -> Void) -``` - - - -CaptchaStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Captcha Stage. -let captchaStageRequest = CaptchaStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], publicKey: "publicKey_example", privateKey: "privateKey_example", jsUrl: "jsUrl_example", apiUrl: "apiUrl_example") // CaptchaStageRequest | - -StagesAPI.stagesCaptchaUpdate(stageUuid: stageUuid, captchaStageRequest: captchaStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Captcha Stage. | - **captchaStageRequest** | [**CaptchaStageRequest**](CaptchaStageRequest.md) | | - -### Return type - -[**CaptchaStage**](CaptchaStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesCaptchaUsedByList** -```swift - open class func stagesCaptchaUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Captcha Stage. - -StagesAPI.stagesCaptchaUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Captcha Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentCreate** -```swift - open class func stagesConsentCreate(consentStageRequest: ConsentStageRequest, completion: @escaping (_ data: ConsentStage?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let consentStageRequest = ConsentStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], mode: ConsentStageModeEnum(), consentExpireIn: "consentExpireIn_example") // ConsentStageRequest | - -StagesAPI.stagesConsentCreate(consentStageRequest: consentStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentStageRequest** | [**ConsentStageRequest**](ConsentStageRequest.md) | | - -### Return type - -[**ConsentStage**](ConsentStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentDestroy** -```swift - open class func stagesConsentDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Consent Stage. - -StagesAPI.stagesConsentDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Consent Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentList** -```swift - open class func stagesConsentList(consentExpireIn: String? = nil, mode: Mode_stagesConsentList? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedConsentStageList?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let consentExpireIn = "consentExpireIn_example" // String | (optional) -let mode = "mode_example" // String | * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesConsentList(consentExpireIn: consentExpireIn, mode: mode, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentExpireIn** | **String** | | [optional] - **mode** | **String** | * `always_require` - Always Require * `permanent` - Permanent * `expiring` - Expiring | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedConsentStageList**](PaginatedConsentStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentPartialUpdate** -```swift - open class func stagesConsentPartialUpdate(stageUuid: UUID, patchedConsentStageRequest: PatchedConsentStageRequest? = nil, completion: @escaping (_ data: ConsentStage?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Consent Stage. -let patchedConsentStageRequest = PatchedConsentStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], mode: ConsentStageModeEnum(), consentExpireIn: "consentExpireIn_example") // PatchedConsentStageRequest | (optional) - -StagesAPI.stagesConsentPartialUpdate(stageUuid: stageUuid, patchedConsentStageRequest: patchedConsentStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Consent Stage. | - **patchedConsentStageRequest** | [**PatchedConsentStageRequest**](PatchedConsentStageRequest.md) | | [optional] - -### Return type - -[**ConsentStage**](ConsentStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentRetrieve** -```swift - open class func stagesConsentRetrieve(stageUuid: UUID, completion: @escaping (_ data: ConsentStage?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Consent Stage. - -StagesAPI.stagesConsentRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Consent Stage. | - -### Return type - -[**ConsentStage**](ConsentStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentUpdate** -```swift - open class func stagesConsentUpdate(stageUuid: UUID, consentStageRequest: ConsentStageRequest, completion: @escaping (_ data: ConsentStage?, _ error: Error?) -> Void) -``` - - - -ConsentStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Consent Stage. -let consentStageRequest = ConsentStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], mode: ConsentStageModeEnum(), consentExpireIn: "consentExpireIn_example") // ConsentStageRequest | - -StagesAPI.stagesConsentUpdate(stageUuid: stageUuid, consentStageRequest: consentStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Consent Stage. | - **consentStageRequest** | [**ConsentStageRequest**](ConsentStageRequest.md) | | - -### Return type - -[**ConsentStage**](ConsentStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesConsentUsedByList** -```swift - open class func stagesConsentUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Consent Stage. - -StagesAPI.stagesConsentUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Consent Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyCreate** -```swift - open class func stagesDenyCreate(denyStageRequest: DenyStageRequest, completion: @escaping (_ data: DenyStage?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let denyStageRequest = DenyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], denyMessage: "denyMessage_example") // DenyStageRequest | - -StagesAPI.stagesDenyCreate(denyStageRequest: denyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **denyStageRequest** | [**DenyStageRequest**](DenyStageRequest.md) | | - -### Return type - -[**DenyStage**](DenyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyDestroy** -```swift - open class func stagesDenyDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Deny Stage. - -StagesAPI.stagesDenyDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Deny Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyList** -```swift - open class func stagesDenyList(denyMessage: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedDenyStageList?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let denyMessage = "denyMessage_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesDenyList(denyMessage: denyMessage, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **denyMessage** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedDenyStageList**](PaginatedDenyStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyPartialUpdate** -```swift - open class func stagesDenyPartialUpdate(stageUuid: UUID, patchedDenyStageRequest: PatchedDenyStageRequest? = nil, completion: @escaping (_ data: DenyStage?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Deny Stage. -let patchedDenyStageRequest = PatchedDenyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], denyMessage: "denyMessage_example") // PatchedDenyStageRequest | (optional) - -StagesAPI.stagesDenyPartialUpdate(stageUuid: stageUuid, patchedDenyStageRequest: patchedDenyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Deny Stage. | - **patchedDenyStageRequest** | [**PatchedDenyStageRequest**](PatchedDenyStageRequest.md) | | [optional] - -### Return type - -[**DenyStage**](DenyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyRetrieve** -```swift - open class func stagesDenyRetrieve(stageUuid: UUID, completion: @escaping (_ data: DenyStage?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Deny Stage. - -StagesAPI.stagesDenyRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Deny Stage. | - -### Return type - -[**DenyStage**](DenyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyUpdate** -```swift - open class func stagesDenyUpdate(stageUuid: UUID, denyStageRequest: DenyStageRequest, completion: @escaping (_ data: DenyStage?, _ error: Error?) -> Void) -``` - - - -DenyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Deny Stage. -let denyStageRequest = DenyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], denyMessage: "denyMessage_example") // DenyStageRequest | - -StagesAPI.stagesDenyUpdate(stageUuid: stageUuid, denyStageRequest: denyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Deny Stage. | - **denyStageRequest** | [**DenyStageRequest**](DenyStageRequest.md) | | - -### Return type - -[**DenyStage**](DenyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDenyUsedByList** -```swift - open class func stagesDenyUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Deny Stage. - -StagesAPI.stagesDenyUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Deny Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyCreate** -```swift - open class func stagesDummyCreate(dummyStageRequest: DummyStageRequest, completion: @escaping (_ data: DummyStage?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let dummyStageRequest = DummyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], throwError: false) // DummyStageRequest | - -StagesAPI.stagesDummyCreate(dummyStageRequest: dummyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dummyStageRequest** | [**DummyStageRequest**](DummyStageRequest.md) | | - -### Return type - -[**DummyStage**](DummyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyDestroy** -```swift - open class func stagesDummyDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Dummy Stage. - -StagesAPI.stagesDummyDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Dummy Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyList** -```swift - open class func stagesDummyList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, throwError: Bool? = nil, completion: @escaping (_ data: PaginatedDummyStageList?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let throwError = true // Bool | (optional) - -StagesAPI.stagesDummyList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, throwError: throwError) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **throwError** | **Bool** | | [optional] - -### Return type - -[**PaginatedDummyStageList**](PaginatedDummyStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyPartialUpdate** -```swift - open class func stagesDummyPartialUpdate(stageUuid: UUID, patchedDummyStageRequest: PatchedDummyStageRequest? = nil, completion: @escaping (_ data: DummyStage?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Dummy Stage. -let patchedDummyStageRequest = PatchedDummyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], throwError: false) // PatchedDummyStageRequest | (optional) - -StagesAPI.stagesDummyPartialUpdate(stageUuid: stageUuid, patchedDummyStageRequest: patchedDummyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Dummy Stage. | - **patchedDummyStageRequest** | [**PatchedDummyStageRequest**](PatchedDummyStageRequest.md) | | [optional] - -### Return type - -[**DummyStage**](DummyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyRetrieve** -```swift - open class func stagesDummyRetrieve(stageUuid: UUID, completion: @escaping (_ data: DummyStage?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Dummy Stage. - -StagesAPI.stagesDummyRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Dummy Stage. | - -### Return type - -[**DummyStage**](DummyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyUpdate** -```swift - open class func stagesDummyUpdate(stageUuid: UUID, dummyStageRequest: DummyStageRequest, completion: @escaping (_ data: DummyStage?, _ error: Error?) -> Void) -``` - - - -DummyStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Dummy Stage. -let dummyStageRequest = DummyStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], throwError: false) // DummyStageRequest | - -StagesAPI.stagesDummyUpdate(stageUuid: stageUuid, dummyStageRequest: dummyStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Dummy Stage. | - **dummyStageRequest** | [**DummyStageRequest**](DummyStageRequest.md) | | - -### Return type - -[**DummyStage**](DummyStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesDummyUsedByList** -```swift - open class func stagesDummyUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Dummy Stage. - -StagesAPI.stagesDummyUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Dummy Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailCreate** -```swift - open class func stagesEmailCreate(emailStageRequest: EmailStageRequest, completion: @escaping (_ data: EmailStage?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let emailStageRequest = EmailStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], useGlobalSettings: false, host: "host_example", port: 123, username: "username_example", password: "password_example", useTls: false, useSsl: false, timeout: 123, fromAddress: "fromAddress_example", tokenExpiry: 123, subject: "subject_example", template: "template_example", activateUserOnSuccess: false) // EmailStageRequest | - -StagesAPI.stagesEmailCreate(emailStageRequest: emailStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **emailStageRequest** | [**EmailStageRequest**](EmailStageRequest.md) | | - -### Return type - -[**EmailStage**](EmailStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailDestroy** -```swift - open class func stagesEmailDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Email Stage. - -StagesAPI.stagesEmailDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Email Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailList** -```swift - open class func stagesEmailList(activateUserOnSuccess: Bool? = nil, fromAddress: String? = nil, host: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, port: Int? = nil, search: String? = nil, subject: String? = nil, template: String? = nil, timeout: Int? = nil, tokenExpiry: Int? = nil, useGlobalSettings: Bool? = nil, useSsl: Bool? = nil, useTls: Bool? = nil, username: String? = nil, completion: @escaping (_ data: PaginatedEmailStageList?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let activateUserOnSuccess = true // Bool | (optional) -let fromAddress = "fromAddress_example" // String | (optional) -let host = "host_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let port = 987 // Int | (optional) -let search = "search_example" // String | A search term. (optional) -let subject = "subject_example" // String | (optional) -let template = "template_example" // String | (optional) -let timeout = 987 // Int | (optional) -let tokenExpiry = 987 // Int | (optional) -let useGlobalSettings = true // Bool | (optional) -let useSsl = true // Bool | (optional) -let useTls = true // Bool | (optional) -let username = "username_example" // String | (optional) - -StagesAPI.stagesEmailList(activateUserOnSuccess: activateUserOnSuccess, fromAddress: fromAddress, host: host, name: name, ordering: ordering, page: page, pageSize: pageSize, port: port, search: search, subject: subject, template: template, timeout: timeout, tokenExpiry: tokenExpiry, useGlobalSettings: useGlobalSettings, useSsl: useSsl, useTls: useTls, username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **activateUserOnSuccess** | **Bool** | | [optional] - **fromAddress** | **String** | | [optional] - **host** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **port** | **Int** | | [optional] - **search** | **String** | A search term. | [optional] - **subject** | **String** | | [optional] - **template** | **String** | | [optional] - **timeout** | **Int** | | [optional] - **tokenExpiry** | **Int** | | [optional] - **useGlobalSettings** | **Bool** | | [optional] - **useSsl** | **Bool** | | [optional] - **useTls** | **Bool** | | [optional] - **username** | **String** | | [optional] - -### Return type - -[**PaginatedEmailStageList**](PaginatedEmailStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailPartialUpdate** -```swift - open class func stagesEmailPartialUpdate(stageUuid: UUID, patchedEmailStageRequest: PatchedEmailStageRequest? = nil, completion: @escaping (_ data: EmailStage?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Email Stage. -let patchedEmailStageRequest = PatchedEmailStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], useGlobalSettings: false, host: "host_example", port: 123, username: "username_example", password: "password_example", useTls: false, useSsl: false, timeout: 123, fromAddress: "fromAddress_example", tokenExpiry: 123, subject: "subject_example", template: "template_example", activateUserOnSuccess: false) // PatchedEmailStageRequest | (optional) - -StagesAPI.stagesEmailPartialUpdate(stageUuid: stageUuid, patchedEmailStageRequest: patchedEmailStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Email Stage. | - **patchedEmailStageRequest** | [**PatchedEmailStageRequest**](PatchedEmailStageRequest.md) | | [optional] - -### Return type - -[**EmailStage**](EmailStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailRetrieve** -```swift - open class func stagesEmailRetrieve(stageUuid: UUID, completion: @escaping (_ data: EmailStage?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Email Stage. - -StagesAPI.stagesEmailRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Email Stage. | - -### Return type - -[**EmailStage**](EmailStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailTemplatesList** -```swift - open class func stagesEmailTemplatesList(completion: @escaping (_ data: [TypeCreate]?, _ error: Error?) -> Void) -``` - - - -Get all available templates, including custom templates - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - - -StagesAPI.stagesEmailTemplatesList() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[TypeCreate]**](TypeCreate.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailUpdate** -```swift - open class func stagesEmailUpdate(stageUuid: UUID, emailStageRequest: EmailStageRequest, completion: @escaping (_ data: EmailStage?, _ error: Error?) -> Void) -``` - - - -EmailStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Email Stage. -let emailStageRequest = EmailStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], useGlobalSettings: false, host: "host_example", port: 123, username: "username_example", password: "password_example", useTls: false, useSsl: false, timeout: 123, fromAddress: "fromAddress_example", tokenExpiry: 123, subject: "subject_example", template: "template_example", activateUserOnSuccess: false) // EmailStageRequest | - -StagesAPI.stagesEmailUpdate(stageUuid: stageUuid, emailStageRequest: emailStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Email Stage. | - **emailStageRequest** | [**EmailStageRequest**](EmailStageRequest.md) | | - -### Return type - -[**EmailStage**](EmailStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesEmailUsedByList** -```swift - open class func stagesEmailUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Email Stage. - -StagesAPI.stagesEmailUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Email Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationCreate** -```swift - open class func stagesIdentificationCreate(identificationStageRequest: IdentificationStageRequest, completion: @escaping (_ data: IdentificationStage?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let identificationStageRequest = IdentificationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userFields: [UserFieldsEnum()], passwordStage: 123, caseInsensitiveMatching: false, showMatchedUser: false, enrollmentFlow: 123, recoveryFlow: 123, passwordlessFlow: 123, sources: [123], showSourceLabels: false, pretendUserExists: false) // IdentificationStageRequest | - -StagesAPI.stagesIdentificationCreate(identificationStageRequest: identificationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **identificationStageRequest** | [**IdentificationStageRequest**](IdentificationStageRequest.md) | | - -### Return type - -[**IdentificationStage**](IdentificationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationDestroy** -```swift - open class func stagesIdentificationDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Identification Stage. - -StagesAPI.stagesIdentificationDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Identification Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationList** -```swift - open class func stagesIdentificationList(caseInsensitiveMatching: Bool? = nil, enrollmentFlow: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, passwordStage: UUID? = nil, passwordlessFlow: UUID? = nil, recoveryFlow: UUID? = nil, search: String? = nil, showMatchedUser: Bool? = nil, showSourceLabels: Bool? = nil, completion: @escaping (_ data: PaginatedIdentificationStageList?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let caseInsensitiveMatching = true // Bool | (optional) -let enrollmentFlow = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let passwordStage = 987 // UUID | (optional) -let passwordlessFlow = 987 // UUID | (optional) -let recoveryFlow = 987 // UUID | (optional) -let search = "search_example" // String | A search term. (optional) -let showMatchedUser = true // Bool | (optional) -let showSourceLabels = true // Bool | (optional) - -StagesAPI.stagesIdentificationList(caseInsensitiveMatching: caseInsensitiveMatching, enrollmentFlow: enrollmentFlow, name: name, ordering: ordering, page: page, pageSize: pageSize, passwordStage: passwordStage, passwordlessFlow: passwordlessFlow, recoveryFlow: recoveryFlow, search: search, showMatchedUser: showMatchedUser, showSourceLabels: showSourceLabels) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **caseInsensitiveMatching** | **Bool** | | [optional] - **enrollmentFlow** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **passwordStage** | **UUID** | | [optional] - **passwordlessFlow** | **UUID** | | [optional] - **recoveryFlow** | **UUID** | | [optional] - **search** | **String** | A search term. | [optional] - **showMatchedUser** | **Bool** | | [optional] - **showSourceLabels** | **Bool** | | [optional] - -### Return type - -[**PaginatedIdentificationStageList**](PaginatedIdentificationStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationPartialUpdate** -```swift - open class func stagesIdentificationPartialUpdate(stageUuid: UUID, patchedIdentificationStageRequest: PatchedIdentificationStageRequest? = nil, completion: @escaping (_ data: IdentificationStage?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Identification Stage. -let patchedIdentificationStageRequest = PatchedIdentificationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userFields: [UserFieldsEnum()], passwordStage: 123, caseInsensitiveMatching: false, showMatchedUser: false, enrollmentFlow: 123, recoveryFlow: 123, passwordlessFlow: 123, sources: [123], showSourceLabels: false, pretendUserExists: false) // PatchedIdentificationStageRequest | (optional) - -StagesAPI.stagesIdentificationPartialUpdate(stageUuid: stageUuid, patchedIdentificationStageRequest: patchedIdentificationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Identification Stage. | - **patchedIdentificationStageRequest** | [**PatchedIdentificationStageRequest**](PatchedIdentificationStageRequest.md) | | [optional] - -### Return type - -[**IdentificationStage**](IdentificationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationRetrieve** -```swift - open class func stagesIdentificationRetrieve(stageUuid: UUID, completion: @escaping (_ data: IdentificationStage?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Identification Stage. - -StagesAPI.stagesIdentificationRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Identification Stage. | - -### Return type - -[**IdentificationStage**](IdentificationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationUpdate** -```swift - open class func stagesIdentificationUpdate(stageUuid: UUID, identificationStageRequest: IdentificationStageRequest, completion: @escaping (_ data: IdentificationStage?, _ error: Error?) -> Void) -``` - - - -IdentificationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Identification Stage. -let identificationStageRequest = IdentificationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userFields: [UserFieldsEnum()], passwordStage: 123, caseInsensitiveMatching: false, showMatchedUser: false, enrollmentFlow: 123, recoveryFlow: 123, passwordlessFlow: 123, sources: [123], showSourceLabels: false, pretendUserExists: false) // IdentificationStageRequest | - -StagesAPI.stagesIdentificationUpdate(stageUuid: stageUuid, identificationStageRequest: identificationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Identification Stage. | - **identificationStageRequest** | [**IdentificationStageRequest**](IdentificationStageRequest.md) | | - -### Return type - -[**IdentificationStage**](IdentificationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesIdentificationUsedByList** -```swift - open class func stagesIdentificationUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Identification Stage. - -StagesAPI.stagesIdentificationUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Identification Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsCreate** -```swift - open class func stagesInvitationInvitationsCreate(invitationRequest: InvitationRequest, completion: @escaping (_ data: Invitation?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let invitationRequest = InvitationRequest(name: "name_example", expires: Date(), fixedData: "TODO", singleUse: false, flow: 123) // InvitationRequest | - -StagesAPI.stagesInvitationInvitationsCreate(invitationRequest: invitationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **invitationRequest** | [**InvitationRequest**](InvitationRequest.md) | | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsDestroy** -```swift - open class func stagesInvitationInvitationsDestroy(inviteUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let inviteUuid = 987 // UUID | A UUID string identifying this Invitation. - -StagesAPI.stagesInvitationInvitationsDestroy(inviteUuid: inviteUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inviteUuid** | **UUID** | A UUID string identifying this Invitation. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsList** -```swift - open class func stagesInvitationInvitationsList(createdByUsername: String? = nil, expires: Date? = nil, flowSlug: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedInvitationList?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let createdByUsername = "createdByUsername_example" // String | (optional) -let expires = Date() // Date | (optional) -let flowSlug = "flowSlug_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesInvitationInvitationsList(createdByUsername: createdByUsername, expires: expires, flowSlug: flowSlug, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createdByUsername** | **String** | | [optional] - **expires** | **Date** | | [optional] - **flowSlug** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedInvitationList**](PaginatedInvitationList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsPartialUpdate** -```swift - open class func stagesInvitationInvitationsPartialUpdate(inviteUuid: UUID, patchedInvitationRequest: PatchedInvitationRequest? = nil, completion: @escaping (_ data: Invitation?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let inviteUuid = 987 // UUID | A UUID string identifying this Invitation. -let patchedInvitationRequest = PatchedInvitationRequest(name: "name_example", expires: Date(), fixedData: "TODO", singleUse: false, flow: 123) // PatchedInvitationRequest | (optional) - -StagesAPI.stagesInvitationInvitationsPartialUpdate(inviteUuid: inviteUuid, patchedInvitationRequest: patchedInvitationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inviteUuid** | **UUID** | A UUID string identifying this Invitation. | - **patchedInvitationRequest** | [**PatchedInvitationRequest**](PatchedInvitationRequest.md) | | [optional] - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsRetrieve** -```swift - open class func stagesInvitationInvitationsRetrieve(inviteUuid: UUID, completion: @escaping (_ data: Invitation?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let inviteUuid = 987 // UUID | A UUID string identifying this Invitation. - -StagesAPI.stagesInvitationInvitationsRetrieve(inviteUuid: inviteUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inviteUuid** | **UUID** | A UUID string identifying this Invitation. | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsUpdate** -```swift - open class func stagesInvitationInvitationsUpdate(inviteUuid: UUID, invitationRequest: InvitationRequest, completion: @escaping (_ data: Invitation?, _ error: Error?) -> Void) -``` - - - -Invitation Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let inviteUuid = 987 // UUID | A UUID string identifying this Invitation. -let invitationRequest = InvitationRequest(name: "name_example", expires: Date(), fixedData: "TODO", singleUse: false, flow: 123) // InvitationRequest | - -StagesAPI.stagesInvitationInvitationsUpdate(inviteUuid: inviteUuid, invitationRequest: invitationRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inviteUuid** | **UUID** | A UUID string identifying this Invitation. | - **invitationRequest** | [**InvitationRequest**](InvitationRequest.md) | | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationInvitationsUsedByList** -```swift - open class func stagesInvitationInvitationsUsedByList(inviteUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let inviteUuid = 987 // UUID | A UUID string identifying this Invitation. - -StagesAPI.stagesInvitationInvitationsUsedByList(inviteUuid: inviteUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inviteUuid** | **UUID** | A UUID string identifying this Invitation. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesCreate** -```swift - open class func stagesInvitationStagesCreate(invitationStageRequest: InvitationStageRequest, completion: @escaping (_ data: InvitationStage?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let invitationStageRequest = InvitationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], continueFlowWithoutInvitation: false) // InvitationStageRequest | - -StagesAPI.stagesInvitationStagesCreate(invitationStageRequest: invitationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **invitationStageRequest** | [**InvitationStageRequest**](InvitationStageRequest.md) | | - -### Return type - -[**InvitationStage**](InvitationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesDestroy** -```swift - open class func stagesInvitationStagesDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Invitation Stage. - -StagesAPI.stagesInvitationStagesDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Invitation Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesList** -```swift - open class func stagesInvitationStagesList(continueFlowWithoutInvitation: Bool? = nil, name: String? = nil, noFlows: Bool? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedInvitationStageList?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let continueFlowWithoutInvitation = true // Bool | (optional) -let name = "name_example" // String | (optional) -let noFlows = true // Bool | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesInvitationStagesList(continueFlowWithoutInvitation: continueFlowWithoutInvitation, name: name, noFlows: noFlows, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **continueFlowWithoutInvitation** | **Bool** | | [optional] - **name** | **String** | | [optional] - **noFlows** | **Bool** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedInvitationStageList**](PaginatedInvitationStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesPartialUpdate** -```swift - open class func stagesInvitationStagesPartialUpdate(stageUuid: UUID, patchedInvitationStageRequest: PatchedInvitationStageRequest? = nil, completion: @escaping (_ data: InvitationStage?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Invitation Stage. -let patchedInvitationStageRequest = PatchedInvitationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], continueFlowWithoutInvitation: false) // PatchedInvitationStageRequest | (optional) - -StagesAPI.stagesInvitationStagesPartialUpdate(stageUuid: stageUuid, patchedInvitationStageRequest: patchedInvitationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Invitation Stage. | - **patchedInvitationStageRequest** | [**PatchedInvitationStageRequest**](PatchedInvitationStageRequest.md) | | [optional] - -### Return type - -[**InvitationStage**](InvitationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesRetrieve** -```swift - open class func stagesInvitationStagesRetrieve(stageUuid: UUID, completion: @escaping (_ data: InvitationStage?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Invitation Stage. - -StagesAPI.stagesInvitationStagesRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Invitation Stage. | - -### Return type - -[**InvitationStage**](InvitationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesUpdate** -```swift - open class func stagesInvitationStagesUpdate(stageUuid: UUID, invitationStageRequest: InvitationStageRequest, completion: @escaping (_ data: InvitationStage?, _ error: Error?) -> Void) -``` - - - -InvitationStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Invitation Stage. -let invitationStageRequest = InvitationStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], continueFlowWithoutInvitation: false) // InvitationStageRequest | - -StagesAPI.stagesInvitationStagesUpdate(stageUuid: stageUuid, invitationStageRequest: invitationStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Invitation Stage. | - **invitationStageRequest** | [**InvitationStageRequest**](InvitationStageRequest.md) | | - -### Return type - -[**InvitationStage**](InvitationStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesInvitationStagesUsedByList** -```swift - open class func stagesInvitationStagesUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Invitation Stage. - -StagesAPI.stagesInvitationStagesUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Invitation Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordCreate** -```swift - open class func stagesPasswordCreate(passwordStageRequest: PasswordStageRequest, completion: @escaping (_ data: PasswordStage?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let passwordStageRequest = PasswordStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], backends: [BackendsEnum()], configureFlow: 123, failedAttemptsBeforeCancel: 123) // PasswordStageRequest | - -StagesAPI.stagesPasswordCreate(passwordStageRequest: passwordStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **passwordStageRequest** | [**PasswordStageRequest**](PasswordStageRequest.md) | | - -### Return type - -[**PasswordStage**](PasswordStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordDestroy** -```swift - open class func stagesPasswordDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Password Stage. - -StagesAPI.stagesPasswordDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Password Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordList** -```swift - open class func stagesPasswordList(configureFlow: UUID? = nil, failedAttemptsBeforeCancel: Int? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, completion: @escaping (_ data: PaginatedPasswordStageList?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let configureFlow = 987 // UUID | (optional) -let failedAttemptsBeforeCancel = 987 // Int | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) - -StagesAPI.stagesPasswordList(configureFlow: configureFlow, failedAttemptsBeforeCancel: failedAttemptsBeforeCancel, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **configureFlow** | **UUID** | | [optional] - **failedAttemptsBeforeCancel** | **Int** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - -### Return type - -[**PaginatedPasswordStageList**](PaginatedPasswordStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordPartialUpdate** -```swift - open class func stagesPasswordPartialUpdate(stageUuid: UUID, patchedPasswordStageRequest: PatchedPasswordStageRequest? = nil, completion: @escaping (_ data: PasswordStage?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Password Stage. -let patchedPasswordStageRequest = PatchedPasswordStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], backends: [BackendsEnum()], configureFlow: 123, failedAttemptsBeforeCancel: 123) // PatchedPasswordStageRequest | (optional) - -StagesAPI.stagesPasswordPartialUpdate(stageUuid: stageUuid, patchedPasswordStageRequest: patchedPasswordStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Password Stage. | - **patchedPasswordStageRequest** | [**PatchedPasswordStageRequest**](PatchedPasswordStageRequest.md) | | [optional] - -### Return type - -[**PasswordStage**](PasswordStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordRetrieve** -```swift - open class func stagesPasswordRetrieve(stageUuid: UUID, completion: @escaping (_ data: PasswordStage?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Password Stage. - -StagesAPI.stagesPasswordRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Password Stage. | - -### Return type - -[**PasswordStage**](PasswordStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordUpdate** -```swift - open class func stagesPasswordUpdate(stageUuid: UUID, passwordStageRequest: PasswordStageRequest, completion: @escaping (_ data: PasswordStage?, _ error: Error?) -> Void) -``` - - - -PasswordStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Password Stage. -let passwordStageRequest = PasswordStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], backends: [BackendsEnum()], configureFlow: 123, failedAttemptsBeforeCancel: 123) // PasswordStageRequest | - -StagesAPI.stagesPasswordUpdate(stageUuid: stageUuid, passwordStageRequest: passwordStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Password Stage. | - **passwordStageRequest** | [**PasswordStageRequest**](PasswordStageRequest.md) | | - -### Return type - -[**PasswordStage**](PasswordStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPasswordUsedByList** -```swift - open class func stagesPasswordUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Password Stage. - -StagesAPI.stagesPasswordUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Password Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsCreate** -```swift - open class func stagesPromptPromptsCreate(promptRequest: PromptRequest, completion: @escaping (_ data: Prompt?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptRequest = PromptRequest(name: "name_example", fieldKey: "fieldKey_example", label: "label_example", type: PromptTypeEnum(), _required: false, placeholder: "placeholder_example", initialValue: "initialValue_example", order: 123, promptstageSet: [StageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())])], subText: "subText_example", placeholderExpression: false, initialValueExpression: false) // PromptRequest | - -StagesAPI.stagesPromptPromptsCreate(promptRequest: promptRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptRequest** | [**PromptRequest**](PromptRequest.md) | | - -### Return type - -[**Prompt**](Prompt.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsDestroy** -```swift - open class func stagesPromptPromptsDestroy(promptUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptUuid = 987 // UUID | A UUID string identifying this Prompt. - -StagesAPI.stagesPromptPromptsDestroy(promptUuid: promptUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptUuid** | **UUID** | A UUID string identifying this Prompt. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsList** -```swift - open class func stagesPromptPromptsList(fieldKey: String? = nil, label: String? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, placeholder: String? = nil, search: String? = nil, type: ModelType_stagesPromptPromptsList? = nil, completion: @escaping (_ data: PaginatedPromptList?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fieldKey = "fieldKey_example" // String | (optional) -let label = "label_example" // String | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let placeholder = "placeholder_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let type = "type_example" // String | * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports (optional) - -StagesAPI.stagesPromptPromptsList(fieldKey: fieldKey, label: label, name: name, ordering: ordering, page: page, pageSize: pageSize, placeholder: placeholder, search: search, type: type) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fieldKey** | **String** | | [optional] - **label** | **String** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **placeholder** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **type** | **String** | * `text` - Text: Simple Text input * `text_area` - Text area: Multiline Text Input. * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. * `email` - Email: Text field with Email type. * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. * `number` - Number * `checkbox` - Checkbox * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. * `dropdown` - Fixed choice field rendered as a dropdown. * `date` - Date * `date-time` - Date Time * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI * `separator` - Separator: Static Separator Line * `hidden` - Hidden: Hidden field, can be used to insert data into form. * `static` - Static: Static value, displayed as-is. * `ak-locale` - authentik: Selection of locales authentik supports | [optional] - -### Return type - -[**PaginatedPromptList**](PaginatedPromptList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsPartialUpdate** -```swift - open class func stagesPromptPromptsPartialUpdate(promptUuid: UUID, patchedPromptRequest: PatchedPromptRequest? = nil, completion: @escaping (_ data: Prompt?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptUuid = 987 // UUID | A UUID string identifying this Prompt. -let patchedPromptRequest = PatchedPromptRequest(name: "name_example", fieldKey: "fieldKey_example", label: "label_example", type: PromptTypeEnum(), _required: false, placeholder: "placeholder_example", initialValue: "initialValue_example", order: 123, promptstageSet: [StageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())])], subText: "subText_example", placeholderExpression: false, initialValueExpression: false) // PatchedPromptRequest | (optional) - -StagesAPI.stagesPromptPromptsPartialUpdate(promptUuid: promptUuid, patchedPromptRequest: patchedPromptRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptUuid** | **UUID** | A UUID string identifying this Prompt. | - **patchedPromptRequest** | [**PatchedPromptRequest**](PatchedPromptRequest.md) | | [optional] - -### Return type - -[**Prompt**](Prompt.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsPreviewCreate** -```swift - open class func stagesPromptPromptsPreviewCreate(promptRequest: PromptRequest, completion: @escaping (_ data: PromptChallenge?, _ error: Error?) -> Void) -``` - - - -Preview a prompt as a challenge, just like a flow would receive - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptRequest = PromptRequest(name: "name_example", fieldKey: "fieldKey_example", label: "label_example", type: PromptTypeEnum(), _required: false, placeholder: "placeholder_example", initialValue: "initialValue_example", order: 123, promptstageSet: [StageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())])], subText: "subText_example", placeholderExpression: false, initialValueExpression: false) // PromptRequest | - -StagesAPI.stagesPromptPromptsPreviewCreate(promptRequest: promptRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptRequest** | [**PromptRequest**](PromptRequest.md) | | - -### Return type - -[**PromptChallenge**](PromptChallenge.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsRetrieve** -```swift - open class func stagesPromptPromptsRetrieve(promptUuid: UUID, completion: @escaping (_ data: Prompt?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptUuid = 987 // UUID | A UUID string identifying this Prompt. - -StagesAPI.stagesPromptPromptsRetrieve(promptUuid: promptUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptUuid** | **UUID** | A UUID string identifying this Prompt. | - -### Return type - -[**Prompt**](Prompt.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsUpdate** -```swift - open class func stagesPromptPromptsUpdate(promptUuid: UUID, promptRequest: PromptRequest, completion: @escaping (_ data: Prompt?, _ error: Error?) -> Void) -``` - - - -Prompt Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptUuid = 987 // UUID | A UUID string identifying this Prompt. -let promptRequest = PromptRequest(name: "name_example", fieldKey: "fieldKey_example", label: "label_example", type: PromptTypeEnum(), _required: false, placeholder: "placeholder_example", initialValue: "initialValue_example", order: 123, promptstageSet: [StageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())])], subText: "subText_example", placeholderExpression: false, initialValueExpression: false) // PromptRequest | - -StagesAPI.stagesPromptPromptsUpdate(promptUuid: promptUuid, promptRequest: promptRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptUuid** | **UUID** | A UUID string identifying this Prompt. | - **promptRequest** | [**PromptRequest**](PromptRequest.md) | | - -### Return type - -[**Prompt**](Prompt.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptPromptsUsedByList** -```swift - open class func stagesPromptPromptsUsedByList(promptUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptUuid = 987 // UUID | A UUID string identifying this Prompt. - -StagesAPI.stagesPromptPromptsUsedByList(promptUuid: promptUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptUuid** | **UUID** | A UUID string identifying this Prompt. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesCreate** -```swift - open class func stagesPromptStagesCreate(promptStageRequest: PromptStageRequest, completion: @escaping (_ data: PromptStage?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let promptStageRequest = PromptStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], fields: [123], validationPolicies: [123]) // PromptStageRequest | - -StagesAPI.stagesPromptStagesCreate(promptStageRequest: promptStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **promptStageRequest** | [**PromptStageRequest**](PromptStageRequest.md) | | - -### Return type - -[**PromptStage**](PromptStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesDestroy** -```swift - open class func stagesPromptStagesDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Prompt Stage. - -StagesAPI.stagesPromptStagesDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Prompt Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesList** -```swift - open class func stagesPromptStagesList(fields: [UUID]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, validationPolicies: [UUID]? = nil, completion: @escaping (_ data: PaginatedPromptStageList?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let fields = [123] // [UUID] | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let validationPolicies = [123] // [UUID] | (optional) - -StagesAPI.stagesPromptStagesList(fields: fields, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, validationPolicies: validationPolicies) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fields** | [**[UUID]**](UUID.md) | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **validationPolicies** | [**[UUID]**](UUID.md) | | [optional] - -### Return type - -[**PaginatedPromptStageList**](PaginatedPromptStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesPartialUpdate** -```swift - open class func stagesPromptStagesPartialUpdate(stageUuid: UUID, patchedPromptStageRequest: PatchedPromptStageRequest? = nil, completion: @escaping (_ data: PromptStage?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Prompt Stage. -let patchedPromptStageRequest = PatchedPromptStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], fields: [123], validationPolicies: [123]) // PatchedPromptStageRequest | (optional) - -StagesAPI.stagesPromptStagesPartialUpdate(stageUuid: stageUuid, patchedPromptStageRequest: patchedPromptStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Prompt Stage. | - **patchedPromptStageRequest** | [**PatchedPromptStageRequest**](PatchedPromptStageRequest.md) | | [optional] - -### Return type - -[**PromptStage**](PromptStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesRetrieve** -```swift - open class func stagesPromptStagesRetrieve(stageUuid: UUID, completion: @escaping (_ data: PromptStage?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Prompt Stage. - -StagesAPI.stagesPromptStagesRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Prompt Stage. | - -### Return type - -[**PromptStage**](PromptStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesUpdate** -```swift - open class func stagesPromptStagesUpdate(stageUuid: UUID, promptStageRequest: PromptStageRequest, completion: @escaping (_ data: PromptStage?, _ error: Error?) -> Void) -``` - - - -PromptStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Prompt Stage. -let promptStageRequest = PromptStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], fields: [123], validationPolicies: [123]) // PromptStageRequest | - -StagesAPI.stagesPromptStagesUpdate(stageUuid: stageUuid, promptStageRequest: promptStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Prompt Stage. | - **promptStageRequest** | [**PromptStageRequest**](PromptStageRequest.md) | | - -### Return type - -[**PromptStage**](PromptStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesPromptStagesUsedByList** -```swift - open class func stagesPromptStagesUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this Prompt Stage. - -StagesAPI.stagesPromptStagesUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this Prompt Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteCreate** -```swift - open class func stagesUserDeleteCreate(userDeleteStageRequest: UserDeleteStageRequest, completion: @escaping (_ data: UserDeleteStage?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userDeleteStageRequest = UserDeleteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // UserDeleteStageRequest | - -StagesAPI.stagesUserDeleteCreate(userDeleteStageRequest: userDeleteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userDeleteStageRequest** | [**UserDeleteStageRequest**](UserDeleteStageRequest.md) | | - -### Return type - -[**UserDeleteStage**](UserDeleteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteDestroy** -```swift - open class func stagesUserDeleteDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Delete Stage. - -StagesAPI.stagesUserDeleteDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Delete Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteList** -```swift - open class func stagesUserDeleteList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedUserDeleteStageList?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesUserDeleteList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedUserDeleteStageList**](PaginatedUserDeleteStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeletePartialUpdate** -```swift - open class func stagesUserDeletePartialUpdate(stageUuid: UUID, patchedUserDeleteStageRequest: PatchedUserDeleteStageRequest? = nil, completion: @escaping (_ data: UserDeleteStage?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Delete Stage. -let patchedUserDeleteStageRequest = PatchedUserDeleteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // PatchedUserDeleteStageRequest | (optional) - -StagesAPI.stagesUserDeletePartialUpdate(stageUuid: stageUuid, patchedUserDeleteStageRequest: patchedUserDeleteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Delete Stage. | - **patchedUserDeleteStageRequest** | [**PatchedUserDeleteStageRequest**](PatchedUserDeleteStageRequest.md) | | [optional] - -### Return type - -[**UserDeleteStage**](UserDeleteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteRetrieve** -```swift - open class func stagesUserDeleteRetrieve(stageUuid: UUID, completion: @escaping (_ data: UserDeleteStage?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Delete Stage. - -StagesAPI.stagesUserDeleteRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Delete Stage. | - -### Return type - -[**UserDeleteStage**](UserDeleteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteUpdate** -```swift - open class func stagesUserDeleteUpdate(stageUuid: UUID, userDeleteStageRequest: UserDeleteStageRequest, completion: @escaping (_ data: UserDeleteStage?, _ error: Error?) -> Void) -``` - - - -UserDeleteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Delete Stage. -let userDeleteStageRequest = UserDeleteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // UserDeleteStageRequest | - -StagesAPI.stagesUserDeleteUpdate(stageUuid: stageUuid, userDeleteStageRequest: userDeleteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Delete Stage. | - **userDeleteStageRequest** | [**UserDeleteStageRequest**](UserDeleteStageRequest.md) | | - -### Return type - -[**UserDeleteStage**](UserDeleteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserDeleteUsedByList** -```swift - open class func stagesUserDeleteUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Delete Stage. - -StagesAPI.stagesUserDeleteUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Delete Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginCreate** -```swift - open class func stagesUserLoginCreate(userLoginStageRequest: UserLoginStageRequest, completion: @escaping (_ data: UserLoginStage?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userLoginStageRequest = UserLoginStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], sessionDuration: "sessionDuration_example", terminateOtherSessions: false, rememberMeOffset: "rememberMeOffset_example") // UserLoginStageRequest | - -StagesAPI.stagesUserLoginCreate(userLoginStageRequest: userLoginStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userLoginStageRequest** | [**UserLoginStageRequest**](UserLoginStageRequest.md) | | - -### Return type - -[**UserLoginStage**](UserLoginStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginDestroy** -```swift - open class func stagesUserLoginDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Login Stage. - -StagesAPI.stagesUserLoginDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Login Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginList** -```swift - open class func stagesUserLoginList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, rememberMeOffset: String? = nil, search: String? = nil, sessionDuration: String? = nil, stageUuid: UUID? = nil, terminateOtherSessions: Bool? = nil, completion: @escaping (_ data: PaginatedUserLoginStageList?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let rememberMeOffset = "rememberMeOffset_example" // String | (optional) -let search = "search_example" // String | A search term. (optional) -let sessionDuration = "sessionDuration_example" // String | (optional) -let stageUuid = 987 // UUID | (optional) -let terminateOtherSessions = true // Bool | (optional) - -StagesAPI.stagesUserLoginList(name: name, ordering: ordering, page: page, pageSize: pageSize, rememberMeOffset: rememberMeOffset, search: search, sessionDuration: sessionDuration, stageUuid: stageUuid, terminateOtherSessions: terminateOtherSessions) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **rememberMeOffset** | **String** | | [optional] - **search** | **String** | A search term. | [optional] - **sessionDuration** | **String** | | [optional] - **stageUuid** | **UUID** | | [optional] - **terminateOtherSessions** | **Bool** | | [optional] - -### Return type - -[**PaginatedUserLoginStageList**](PaginatedUserLoginStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginPartialUpdate** -```swift - open class func stagesUserLoginPartialUpdate(stageUuid: UUID, patchedUserLoginStageRequest: PatchedUserLoginStageRequest? = nil, completion: @escaping (_ data: UserLoginStage?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Login Stage. -let patchedUserLoginStageRequest = PatchedUserLoginStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], sessionDuration: "sessionDuration_example", terminateOtherSessions: false, rememberMeOffset: "rememberMeOffset_example") // PatchedUserLoginStageRequest | (optional) - -StagesAPI.stagesUserLoginPartialUpdate(stageUuid: stageUuid, patchedUserLoginStageRequest: patchedUserLoginStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Login Stage. | - **patchedUserLoginStageRequest** | [**PatchedUserLoginStageRequest**](PatchedUserLoginStageRequest.md) | | [optional] - -### Return type - -[**UserLoginStage**](UserLoginStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginRetrieve** -```swift - open class func stagesUserLoginRetrieve(stageUuid: UUID, completion: @escaping (_ data: UserLoginStage?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Login Stage. - -StagesAPI.stagesUserLoginRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Login Stage. | - -### Return type - -[**UserLoginStage**](UserLoginStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginUpdate** -```swift - open class func stagesUserLoginUpdate(stageUuid: UUID, userLoginStageRequest: UserLoginStageRequest, completion: @escaping (_ data: UserLoginStage?, _ error: Error?) -> Void) -``` - - - -UserLoginStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Login Stage. -let userLoginStageRequest = UserLoginStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], sessionDuration: "sessionDuration_example", terminateOtherSessions: false, rememberMeOffset: "rememberMeOffset_example") // UserLoginStageRequest | - -StagesAPI.stagesUserLoginUpdate(stageUuid: stageUuid, userLoginStageRequest: userLoginStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Login Stage. | - **userLoginStageRequest** | [**UserLoginStageRequest**](UserLoginStageRequest.md) | | - -### Return type - -[**UserLoginStage**](UserLoginStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLoginUsedByList** -```swift - open class func stagesUserLoginUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Login Stage. - -StagesAPI.stagesUserLoginUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Login Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutCreate** -```swift - open class func stagesUserLogoutCreate(userLogoutStageRequest: UserLogoutStageRequest, completion: @escaping (_ data: UserLogoutStage?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userLogoutStageRequest = UserLogoutStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // UserLogoutStageRequest | - -StagesAPI.stagesUserLogoutCreate(userLogoutStageRequest: userLogoutStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userLogoutStageRequest** | [**UserLogoutStageRequest**](UserLogoutStageRequest.md) | | - -### Return type - -[**UserLogoutStage**](UserLogoutStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutDestroy** -```swift - open class func stagesUserLogoutDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Logout Stage. - -StagesAPI.stagesUserLogoutDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Logout Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutList** -```swift - open class func stagesUserLogoutList(name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, completion: @escaping (_ data: PaginatedUserLogoutStageList?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) - -StagesAPI.stagesUserLogoutList(name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - -### Return type - -[**PaginatedUserLogoutStageList**](PaginatedUserLogoutStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutPartialUpdate** -```swift - open class func stagesUserLogoutPartialUpdate(stageUuid: UUID, patchedUserLogoutStageRequest: PatchedUserLogoutStageRequest? = nil, completion: @escaping (_ data: UserLogoutStage?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Logout Stage. -let patchedUserLogoutStageRequest = PatchedUserLogoutStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // PatchedUserLogoutStageRequest | (optional) - -StagesAPI.stagesUserLogoutPartialUpdate(stageUuid: stageUuid, patchedUserLogoutStageRequest: patchedUserLogoutStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Logout Stage. | - **patchedUserLogoutStageRequest** | [**PatchedUserLogoutStageRequest**](PatchedUserLogoutStageRequest.md) | | [optional] - -### Return type - -[**UserLogoutStage**](UserLogoutStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutRetrieve** -```swift - open class func stagesUserLogoutRetrieve(stageUuid: UUID, completion: @escaping (_ data: UserLogoutStage?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Logout Stage. - -StagesAPI.stagesUserLogoutRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Logout Stage. | - -### Return type - -[**UserLogoutStage**](UserLogoutStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutUpdate** -```swift - open class func stagesUserLogoutUpdate(stageUuid: UUID, userLogoutStageRequest: UserLogoutStageRequest, completion: @escaping (_ data: UserLogoutStage?, _ error: Error?) -> Void) -``` - - - -UserLogoutStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Logout Stage. -let userLogoutStageRequest = UserLogoutStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())]) // UserLogoutStageRequest | - -StagesAPI.stagesUserLogoutUpdate(stageUuid: stageUuid, userLogoutStageRequest: userLogoutStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Logout Stage. | - **userLogoutStageRequest** | [**UserLogoutStageRequest**](UserLogoutStageRequest.md) | | - -### Return type - -[**UserLogoutStage**](UserLogoutStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserLogoutUsedByList** -```swift - open class func stagesUserLogoutUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Logout Stage. - -StagesAPI.stagesUserLogoutUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Logout Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteCreate** -```swift - open class func stagesUserWriteCreate(userWriteStageRequest: UserWriteStageRequest, completion: @escaping (_ data: UserWriteStage?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let userWriteStageRequest = UserWriteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userCreationMode: UserCreationModeEnum(), createUsersAsInactive: false, createUsersGroup: 123, userType: UserTypeEnum(), userPathTemplate: "userPathTemplate_example") // UserWriteStageRequest | - -StagesAPI.stagesUserWriteCreate(userWriteStageRequest: userWriteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userWriteStageRequest** | [**UserWriteStageRequest**](UserWriteStageRequest.md) | | - -### Return type - -[**UserWriteStage**](UserWriteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteDestroy** -```swift - open class func stagesUserWriteDestroy(stageUuid: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Write Stage. - -StagesAPI.stagesUserWriteDestroy(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Write Stage. | - -### Return type - -Void (empty response body) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteList** -```swift - open class func stagesUserWriteList(createUsersAsInactive: Bool? = nil, createUsersGroup: UUID? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, stageUuid: UUID? = nil, userCreationMode: UserCreationMode_stagesUserWriteList? = nil, userPathTemplate: String? = nil, userType: UserType_stagesUserWriteList? = nil, completion: @escaping (_ data: PaginatedUserWriteStageList?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let createUsersAsInactive = true // Bool | (optional) -let createUsersGroup = 987 // UUID | (optional) -let name = "name_example" // String | (optional) -let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional) -let page = 987 // Int | A page number within the paginated result set. (optional) -let pageSize = 987 // Int | Number of results to return per page. (optional) -let search = "search_example" // String | A search term. (optional) -let stageUuid = 987 // UUID | (optional) -let userCreationMode = "userCreationMode_example" // String | * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create (optional) -let userPathTemplate = "userPathTemplate_example" // String | (optional) -let userType = "userType_example" // String | * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account (optional) - -StagesAPI.stagesUserWriteList(createUsersAsInactive: createUsersAsInactive, createUsersGroup: createUsersGroup, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, stageUuid: stageUuid, userCreationMode: userCreationMode, userPathTemplate: userPathTemplate, userType: userType) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createUsersAsInactive** | **Bool** | | [optional] - **createUsersGroup** | **UUID** | | [optional] - **name** | **String** | | [optional] - **ordering** | **String** | Which field to use when ordering the results. | [optional] - **page** | **Int** | A page number within the paginated result set. | [optional] - **pageSize** | **Int** | Number of results to return per page. | [optional] - **search** | **String** | A search term. | [optional] - **stageUuid** | **UUID** | | [optional] - **userCreationMode** | **String** | * `never_create` - Never Create * `create_when_required` - Create When Required * `always_create` - Always Create | [optional] - **userPathTemplate** | **String** | | [optional] - **userType** | **String** | * `internal` - Internal * `external` - External * `service_account` - Service Account * `internal_service_account` - Internal Service Account | [optional] - -### Return type - -[**PaginatedUserWriteStageList**](PaginatedUserWriteStageList.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWritePartialUpdate** -```swift - open class func stagesUserWritePartialUpdate(stageUuid: UUID, patchedUserWriteStageRequest: PatchedUserWriteStageRequest? = nil, completion: @escaping (_ data: UserWriteStage?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Write Stage. -let patchedUserWriteStageRequest = PatchedUserWriteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userCreationMode: UserCreationModeEnum(), createUsersAsInactive: false, createUsersGroup: 123, userType: UserTypeEnum(), userPathTemplate: "userPathTemplate_example") // PatchedUserWriteStageRequest | (optional) - -StagesAPI.stagesUserWritePartialUpdate(stageUuid: stageUuid, patchedUserWriteStageRequest: patchedUserWriteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Write Stage. | - **patchedUserWriteStageRequest** | [**PatchedUserWriteStageRequest**](PatchedUserWriteStageRequest.md) | | [optional] - -### Return type - -[**UserWriteStage**](UserWriteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteRetrieve** -```swift - open class func stagesUserWriteRetrieve(stageUuid: UUID, completion: @escaping (_ data: UserWriteStage?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Write Stage. - -StagesAPI.stagesUserWriteRetrieve(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Write Stage. | - -### Return type - -[**UserWriteStage**](UserWriteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteUpdate** -```swift - open class func stagesUserWriteUpdate(stageUuid: UUID, userWriteStageRequest: UserWriteStageRequest, completion: @escaping (_ data: UserWriteStage?, _ error: Error?) -> Void) -``` - - - -UserWriteStage Viewset - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Write Stage. -let userWriteStageRequest = UserWriteStageRequest(name: "name_example", flowSet: [FlowSetRequest(name: "name_example", slug: "slug_example", title: "title_example", designation: FlowDesignationEnum(), policyEngineMode: PolicyEngineMode(), compatibilityMode: false, layout: LayoutEnum(), deniedAction: DeniedActionEnum())], userCreationMode: UserCreationModeEnum(), createUsersAsInactive: false, createUsersGroup: 123, userType: UserTypeEnum(), userPathTemplate: "userPathTemplate_example") // UserWriteStageRequest | - -StagesAPI.stagesUserWriteUpdate(stageUuid: stageUuid, userWriteStageRequest: userWriteStageRequest) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Write Stage. | - **userWriteStageRequest** | [**UserWriteStageRequest**](UserWriteStageRequest.md) | | - -### Return type - -[**UserWriteStage**](UserWriteStage.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stagesUserWriteUsedByList** -```swift - open class func stagesUserWriteUsedByList(stageUuid: UUID, completion: @escaping (_ data: [UsedBy]?, _ error: Error?) -> Void) -``` - - - -Get a list of all objects that use this object - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import authentikClient - -let stageUuid = 987 // UUID | A UUID string identifying this User Write Stage. - -StagesAPI.stagesUserWriteUsedByList(stageUuid: stageUuid) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stageUuid** | **UUID** | A UUID string identifying this User Write Stage. | - -### Return type - -[**[UsedBy]**](UsedBy.md) - -### Authorization - -[authentik](../README.md#authentik) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/StaticDevice.md b/docs/StaticDevice.md deleted file mode 100644 index 8c9656b..0000000 --- a/docs/StaticDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# StaticDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | -**tokenSet** | [StaticDeviceToken] | | [readonly] -**pk** | **Int** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StaticDeviceRequest.md b/docs/StaticDeviceRequest.md deleted file mode 100644 index 0d9ceff..0000000 --- a/docs/StaticDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# StaticDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StaticDeviceToken.md b/docs/StaticDeviceToken.md deleted file mode 100644 index 269ce87..0000000 --- a/docs/StaticDeviceToken.md +++ /dev/null @@ -1,10 +0,0 @@ -# StaticDeviceToken - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StaticDeviceTokenRequest.md b/docs/StaticDeviceTokenRequest.md deleted file mode 100644 index 516af5c..0000000 --- a/docs/StaticDeviceTokenRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# StaticDeviceTokenRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubModeEnum.md b/docs/SubModeEnum.md deleted file mode 100644 index 31421b1..0000000 --- a/docs/SubModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# SubModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SystemInfo.md b/docs/SystemInfo.md deleted file mode 100644 index d8f2b31..0000000 --- a/docs/SystemInfo.md +++ /dev/null @@ -1,16 +0,0 @@ -# SystemInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**httpHeaders** | **[String: String]** | Get HTTP Request headers | [readonly] -**httpHost** | **String** | Get HTTP host | [readonly] -**httpIsSecure** | **Bool** | Get HTTP Secure flag | [readonly] -**runtime** | [**SystemInfoRuntime**](SystemInfoRuntime.md) | | -**tenant** | **String** | Currently active tenant | [readonly] -**serverTime** | **Date** | Current server time | [readonly] -**embeddedOutpostHost** | **String** | Get the FQDN configured on the embedded outpost | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SystemInfoRuntime.md b/docs/SystemInfoRuntime.md deleted file mode 100644 index c8df350..0000000 --- a/docs/SystemInfoRuntime.md +++ /dev/null @@ -1,15 +0,0 @@ -# SystemInfoRuntime - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pythonVersion** | **String** | | -**gunicornVersion** | **String** | | -**environment** | **String** | | -**architecture** | **String** | | -**platform** | **String** | | -**uname** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TOTPDevice.md b/docs/TOTPDevice.md deleted file mode 100644 index 25cb927..0000000 --- a/docs/TOTPDevice.md +++ /dev/null @@ -1,11 +0,0 @@ -# TOTPDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | -**pk** | **Int** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TOTPDeviceRequest.md b/docs/TOTPDeviceRequest.md deleted file mode 100644 index 1a281f4..0000000 --- a/docs/TOTPDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# TOTPDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The human-readable name of this device. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Task.md b/docs/Task.md deleted file mode 100644 index d67aa20..0000000 --- a/docs/Task.md +++ /dev/null @@ -1,15 +0,0 @@ -# Task - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**taskName** | **String** | | -**taskDescription** | **String** | | -**taskFinishTimestamp** | **Date** | | -**taskDuration** | **Int** | Get the duration a task took to run | [readonly] -**status** | [**TaskStatusEnum**](TaskStatusEnum.md) | | -**messages** | [AnyCodable] | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TaskStatusEnum.md b/docs/TaskStatusEnum.md deleted file mode 100644 index 3b03270..0000000 --- a/docs/TaskStatusEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# TaskStatusEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Tenant.md b/docs/Tenant.md deleted file mode 100644 index 6c64a4a..0000000 --- a/docs/Tenant.md +++ /dev/null @@ -1,24 +0,0 @@ -# Tenant - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenantUuid** | **UUID** | | [readonly] -**domain** | **String** | Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` | -**_default** | **Bool** | | [optional] -**brandingTitle** | **String** | | [optional] -**brandingLogo** | **String** | | [optional] -**brandingFavicon** | **String** | | [optional] -**flowAuthentication** | **UUID** | | [optional] -**flowInvalidation** | **UUID** | | [optional] -**flowRecovery** | **UUID** | | [optional] -**flowUnenrollment** | **UUID** | | [optional] -**flowUserSettings** | **UUID** | | [optional] -**flowDeviceCode** | **UUID** | | [optional] -**eventRetention** | **String** | Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). | [optional] -**webCertificate** | **UUID** | Web Certificate used by the authentik Core webserver. | [optional] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantRequest.md b/docs/TenantRequest.md deleted file mode 100644 index b9c1ea9..0000000 --- a/docs/TenantRequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# TenantRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain** | **String** | Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` | -**_default** | **Bool** | | [optional] -**brandingTitle** | **String** | | [optional] -**brandingLogo** | **String** | | [optional] -**brandingFavicon** | **String** | | [optional] -**flowAuthentication** | **UUID** | | [optional] -**flowInvalidation** | **UUID** | | [optional] -**flowRecovery** | **UUID** | | [optional] -**flowUnenrollment** | **UUID** | | [optional] -**flowUserSettings** | **UUID** | | [optional] -**flowDeviceCode** | **UUID** | | [optional] -**eventRetention** | **String** | Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). | [optional] -**webCertificate** | **UUID** | Web Certificate used by the authentik Core webserver. | [optional] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Token.md b/docs/Token.md deleted file mode 100644 index 57c0039..0000000 --- a/docs/Token.md +++ /dev/null @@ -1,18 +0,0 @@ -# Token - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**identifier** | **String** | | -**intent** | [**IntentEnum**](IntentEnum.md) | | [optional] -**user** | **Int** | | [optional] -**userObj** | [**User**](User.md) | | [readonly] -**description** | **String** | | [optional] -**expires** | **Date** | | [optional] -**expiring** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TokenModel.md b/docs/TokenModel.md deleted file mode 100644 index bb4d972..0000000 --- a/docs/TokenModel.md +++ /dev/null @@ -1,17 +0,0 @@ -# TokenModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**provider** | [**OAuth2Provider**](OAuth2Provider.md) | | -**user** | [**User**](User.md) | | -**isExpired** | **Bool** | Check if token is expired yet. | [readonly] -**expires** | **Date** | | [optional] -**scope** | **[String]** | | -**idToken** | **String** | Get the token's id_token as JSON String | [readonly] -**revoked** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TokenRequest.md b/docs/TokenRequest.md deleted file mode 100644 index 5ad83d5..0000000 --- a/docs/TokenRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# TokenRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**managed** | **String** | Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] -**identifier** | **String** | | -**intent** | [**IntentEnum**](IntentEnum.md) | | [optional] -**user** | **Int** | | [optional] -**description** | **String** | | [optional] -**expires** | **Date** | | [optional] -**expiring** | **Bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TokenSetKeyRequest.md b/docs/TokenSetKeyRequest.md deleted file mode 100644 index de636bc..0000000 --- a/docs/TokenSetKeyRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# TokenSetKeyRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TokenView.md b/docs/TokenView.md deleted file mode 100644 index 817e06b..0000000 --- a/docs/TokenView.md +++ /dev/null @@ -1,10 +0,0 @@ -# TokenView - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TransactionApplicationRequest.md b/docs/TransactionApplicationRequest.md deleted file mode 100644 index 7acdab7..0000000 --- a/docs/TransactionApplicationRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionApplicationRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**ApplicationRequest**](ApplicationRequest.md) | | -**providerModel** | [**ProviderModelEnum**](ProviderModelEnum.md) | | -**provider** | [**ModelRequest**](ModelRequest.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TransactionApplicationResponse.md b/docs/TransactionApplicationResponse.md deleted file mode 100644 index 813e2cd..0000000 --- a/docs/TransactionApplicationResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionApplicationResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**applied** | **Bool** | | -**logs** | **[String]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TypeCreate.md b/docs/TypeCreate.md deleted file mode 100644 index 374027b..0000000 --- a/docs/TypeCreate.md +++ /dev/null @@ -1,13 +0,0 @@ -# TypeCreate - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**description** | **String** | | -**component** | **String** | | -**modelName** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UiThemeEnum.md b/docs/UiThemeEnum.md deleted file mode 100644 index c9d9a61..0000000 --- a/docs/UiThemeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UiThemeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UsedBy.md b/docs/UsedBy.md deleted file mode 100644 index fa9fb55..0000000 --- a/docs/UsedBy.md +++ /dev/null @@ -1,14 +0,0 @@ -# UsedBy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | **String** | | -**modelName** | **String** | | -**pk** | **String** | | -**name** | **String** | | -**action** | [**UsedByActionEnum**](UsedByActionEnum.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UsedByActionEnum.md b/docs/UsedByActionEnum.md deleted file mode 100644 index 1409607..0000000 --- a/docs/UsedByActionEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UsedByActionEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/User.md b/docs/User.md deleted file mode 100644 index 9ff3faa..0000000 --- a/docs/User.md +++ /dev/null @@ -1,24 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**username** | **String** | | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**isSuperuser** | **Bool** | | [readonly] -**groups** | **[UUID]** | | [optional] -**groupsObj** | [UserGroup] | | [readonly] -**email** | **String** | | [optional] -**avatar** | **String** | | [readonly] -**attributes** | [String: AnyCodable] | | [optional] -**uid** | **String** | | [readonly] -**path** | **String** | | [optional] -**type** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] -**uuid** | **UUID** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserAccountRequest.md b/docs/UserAccountRequest.md deleted file mode 100644 index 0ae7069..0000000 --- a/docs/UserAccountRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# UserAccountRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserAssignedObjectPermission.md b/docs/UserAssignedObjectPermission.md deleted file mode 100644 index d68257d..0000000 --- a/docs/UserAssignedObjectPermission.md +++ /dev/null @@ -1,19 +0,0 @@ -# UserAssignedObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**username** | **String** | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**email** | **String** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**uid** | **String** | | [readonly] -**permissions** | [UserObjectPermission] | | -**isSuperuser** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserConsent.md b/docs/UserConsent.md deleted file mode 100644 index 8fbe7df..0000000 --- a/docs/UserConsent.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserConsent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**expires** | **Date** | | [optional] -**user** | [**User**](User.md) | | -**application** | [**Application**](Application.md) | | -**permissions** | **String** | | [optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserCreationModeEnum.md b/docs/UserCreationModeEnum.md deleted file mode 100644 index 3cbbf68..0000000 --- a/docs/UserCreationModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UserCreationModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDeleteStage.md b/docs/UserDeleteStage.md deleted file mode 100644 index 84b95c4..0000000 --- a/docs/UserDeleteStage.md +++ /dev/null @@ -1,16 +0,0 @@ -# UserDeleteStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDeleteStageRequest.md b/docs/UserDeleteStageRequest.md deleted file mode 100644 index 080fc09..0000000 --- a/docs/UserDeleteStageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserDeleteStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserFieldsEnum.md b/docs/UserFieldsEnum.md deleted file mode 100644 index 1984c99..0000000 --- a/docs/UserFieldsEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UserFieldsEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserGroup.md b/docs/UserGroup.md deleted file mode 100644 index 1167a30..0000000 --- a/docs/UserGroup.md +++ /dev/null @@ -1,16 +0,0 @@ -# UserGroup - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**numPk** | **Int** | Get a numerical, int32 ID for the group | [readonly] -**name** | **String** | | -**isSuperuser** | **Bool** | Users added to this group will be superusers. | [optional] -**parent** | **UUID** | | [optional] -**parentName** | **String** | | [readonly] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserGroupRequest.md b/docs/UserGroupRequest.md deleted file mode 100644 index 2aa9a63..0000000 --- a/docs/UserGroupRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserGroupRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**isSuperuser** | **Bool** | Users added to this group will be superusers. | [optional] -**parent** | **UUID** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLoginChallenge.md b/docs/UserLoginChallenge.md deleted file mode 100644 index ad7aaaa..0000000 --- a/docs/UserLoginChallenge.md +++ /dev/null @@ -1,15 +0,0 @@ -# UserLoginChallenge - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**ChallengeChoices**](ChallengeChoices.md) | | -**flowInfo** | [**ContextualFlowInfo**](ContextualFlowInfo.md) | | [optional] -**component** | **String** | | [optional] [default to "ak-stage-user-login"] -**responseErrors** | [String: [ErrorDetail]] | | [optional] -**pendingUser** | **String** | | -**pendingUserAvatar** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLoginChallengeResponseRequest.md b/docs/UserLoginChallengeResponseRequest.md deleted file mode 100644 index 059fcad..0000000 --- a/docs/UserLoginChallengeResponseRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserLoginChallengeResponseRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**component** | **String** | | [optional] [default to "ak-stage-user-login"] -**rememberMe** | **Bool** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLoginStage.md b/docs/UserLoginStage.md deleted file mode 100644 index 40297a0..0000000 --- a/docs/UserLoginStage.md +++ /dev/null @@ -1,19 +0,0 @@ -# UserLoginStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**sessionDuration** | **String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] -**terminateOtherSessions** | **Bool** | Terminate all other sessions of the user logging in. | [optional] -**rememberMeOffset** | **String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLoginStageRequest.md b/docs/UserLoginStageRequest.md deleted file mode 100644 index 3bb3e49..0000000 --- a/docs/UserLoginStageRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserLoginStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**sessionDuration** | **String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] -**terminateOtherSessions** | **Bool** | Terminate all other sessions of the user logging in. | [optional] -**rememberMeOffset** | **String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLogoutStage.md b/docs/UserLogoutStage.md deleted file mode 100644 index 2a8cb0d..0000000 --- a/docs/UserLogoutStage.md +++ /dev/null @@ -1,16 +0,0 @@ -# UserLogoutStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLogoutStageRequest.md b/docs/UserLogoutStageRequest.md deleted file mode 100644 index cd1d0b5..0000000 --- a/docs/UserLogoutStageRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserLogoutStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserMatchingModeEnum.md b/docs/UserMatchingModeEnum.md deleted file mode 100644 index 5ae31cd..0000000 --- a/docs/UserMatchingModeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UserMatchingModeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserMetrics.md b/docs/UserMetrics.md deleted file mode 100644 index d00d892..0000000 --- a/docs/UserMetrics.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserMetrics - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**logins** | [Coordinate] | | [readonly] -**loginsFailed** | [Coordinate] | | [readonly] -**authorizations** | [Coordinate] | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserOAuthSourceConnection.md b/docs/UserOAuthSourceConnection.md deleted file mode 100644 index e57f259..0000000 --- a/docs/UserOAuthSourceConnection.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserOAuthSourceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**user** | **Int** | | -**source** | [**Source**](Source.md) | | [readonly] -**identifier** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserOAuthSourceConnectionRequest.md b/docs/UserOAuthSourceConnectionRequest.md deleted file mode 100644 index e702b95..0000000 --- a/docs/UserOAuthSourceConnectionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserOAuthSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **Int** | | -**identifier** | **String** | | -**accessToken** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserObjectPermission.md b/docs/UserObjectPermission.md deleted file mode 100644 index db11ee8..0000000 --- a/docs/UserObjectPermission.md +++ /dev/null @@ -1,15 +0,0 @@ -# UserObjectPermission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int** | | [readonly] -**codename** | **String** | | [readonly] -**model** | **String** | | [readonly] -**appLabel** | **String** | | [readonly] -**objectPk** | **String** | | [readonly] -**name** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserPasswordSetRequest.md b/docs/UserPasswordSetRequest.md deleted file mode 100644 index 6e59cd8..0000000 --- a/docs/UserPasswordSetRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# UserPasswordSetRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**password** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserPath.md b/docs/UserPath.md deleted file mode 100644 index 198cd4b..0000000 --- a/docs/UserPath.md +++ /dev/null @@ -1,10 +0,0 @@ -# UserPath - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**paths** | **[String]** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserRequest.md b/docs/UserRequest.md deleted file mode 100644 index db70fef..0000000 --- a/docs/UserRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# UserRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **String** | | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**lastLogin** | **Date** | | [optional] -**groups** | **[UUID]** | | [optional] -**email** | **String** | | [optional] -**attributes** | [String: AnyCodable] | | [optional] -**path** | **String** | | [optional] -**type** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSAMLSourceConnection.md b/docs/UserSAMLSourceConnection.md deleted file mode 100644 index bc438dd..0000000 --- a/docs/UserSAMLSourceConnection.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserSAMLSourceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**user** | **Int** | | -**source** | [**Source**](Source.md) | | [readonly] -**identifier** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSAMLSourceConnectionRequest.md b/docs/UserSAMLSourceConnectionRequest.md deleted file mode 100644 index 24f0883..0000000 --- a/docs/UserSAMLSourceConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserSAMLSourceConnectionRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **Int** | | -**identifier** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSelf.md b/docs/UserSelf.md deleted file mode 100644 index 30440f3..0000000 --- a/docs/UserSelf.md +++ /dev/null @@ -1,21 +0,0 @@ -# UserSelf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**username** | **String** | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | -**name** | **String** | User's display name. | -**isActive** | **Bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [readonly] -**isSuperuser** | **Bool** | | [readonly] -**groups** | [UserSelfGroups] | | [readonly] -**email** | **String** | | [optional] -**avatar** | **String** | | [readonly] -**uid** | **String** | | [readonly] -**settings** | [String: AnyCodable] | Get user settings with tenant and group settings applied | [readonly] -**type** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] -**systemPermissions** | **[String]** | Get all system permissions assigned to the user | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSelfGroups.md b/docs/UserSelfGroups.md deleted file mode 100644 index ece6b70..0000000 --- a/docs/UserSelfGroups.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserSelfGroups - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [readonly] -**pk** | **String** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserServiceAccountRequest.md b/docs/UserServiceAccountRequest.md deleted file mode 100644 index d11dc5e..0000000 --- a/docs/UserServiceAccountRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserServiceAccountRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**createGroup** | **Bool** | | [optional] [default to false] -**expiring** | **Bool** | | [optional] [default to true] -**expires** | **Date** | If not provided, valid for 360 days | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserServiceAccountResponse.md b/docs/UserServiceAccountResponse.md deleted file mode 100644 index bf2fe96..0000000 --- a/docs/UserServiceAccountResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserServiceAccountResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **String** | | -**token** | **String** | | -**userUid** | **String** | | -**userPk** | **Int** | | -**groupPk** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSetting.md b/docs/UserSetting.md deleted file mode 100644 index ae6c739..0000000 --- a/docs/UserSetting.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserSetting - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**objectUid** | **String** | | -**component** | **String** | | -**title** | **String** | | -**configureUrl** | **String** | | [optional] -**iconUrl** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSourceConnection.md b/docs/UserSourceConnection.md deleted file mode 100644 index 7231d62..0000000 --- a/docs/UserSourceConnection.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserSourceConnection - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**user** | **Int** | | [readonly] -**source** | [**Source**](Source.md) | | [readonly] -**created** | **Date** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserTypeEnum.md b/docs/UserTypeEnum.md deleted file mode 100644 index bcc7129..0000000 --- a/docs/UserTypeEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UserTypeEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserVerificationEnum.md b/docs/UserVerificationEnum.md deleted file mode 100644 index bf886c9..0000000 --- a/docs/UserVerificationEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# UserVerificationEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserWriteStage.md b/docs/UserWriteStage.md deleted file mode 100644 index 874e2aa..0000000 --- a/docs/UserWriteStage.md +++ /dev/null @@ -1,21 +0,0 @@ -# UserWriteStage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **UUID** | | [readonly] -**name** | **String** | | -**component** | **String** | Get object type so that we know how to edit the object | [readonly] -**verboseName** | **String** | Return object's verbose_name | [readonly] -**verboseNamePlural** | **String** | Return object's plural verbose_name | [readonly] -**metaModelName** | **String** | Return internal model name | [readonly] -**flowSet** | [FlowSet] | | [optional] -**userCreationMode** | [**UserCreationModeEnum**](UserCreationModeEnum.md) | | [optional] -**createUsersAsInactive** | **Bool** | When set, newly created users are inactive and cannot login. | [optional] -**createUsersGroup** | **UUID** | Optionally add newly created users to this group. | [optional] -**userType** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] -**userPathTemplate** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserWriteStageRequest.md b/docs/UserWriteStageRequest.md deleted file mode 100644 index 34588eb..0000000 --- a/docs/UserWriteStageRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# UserWriteStageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**flowSet** | [FlowSetRequest] | | [optional] -**userCreationMode** | [**UserCreationModeEnum**](UserCreationModeEnum.md) | | [optional] -**createUsersAsInactive** | **Bool** | When set, newly created users are inactive and cannot login. | [optional] -**createUsersGroup** | **UUID** | Optionally add newly created users to this group. | [optional] -**userType** | [**UserTypeEnum**](UserTypeEnum.md) | | [optional] -**userPathTemplate** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ValidationError.md b/docs/ValidationError.md deleted file mode 100644 index ed74134..0000000 --- a/docs/ValidationError.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidationError - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nonFieldErrors** | **[String]** | | [optional] -**code** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Version.md b/docs/Version.md deleted file mode 100644 index bab1122..0000000 --- a/docs/Version.md +++ /dev/null @@ -1,13 +0,0 @@ -# Version - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**versionCurrent** | **String** | Get current version | [readonly] -**versionLatest** | **String** | Get latest version from cache | [readonly] -**buildHash** | **String** | Get build hash, if version is not latest or released | [readonly] -**outdated** | **Bool** | Check if we're running the latest version | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebAuthnDevice.md b/docs/WebAuthnDevice.md deleted file mode 100644 index e3b6b0a..0000000 --- a/docs/WebAuthnDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# WebAuthnDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pk** | **Int** | | [readonly] -**name** | **String** | | -**createdOn** | **Date** | | [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebAuthnDeviceRequest.md b/docs/WebAuthnDeviceRequest.md deleted file mode 100644 index c3cb8bc..0000000 --- a/docs/WebAuthnDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# WebAuthnDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Workers.md b/docs/Workers.md deleted file mode 100644 index 159ac8c..0000000 --- a/docs/Workers.md +++ /dev/null @@ -1,10 +0,0 @@ -# Workers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**count** | **Int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/project.yml b/project.yml deleted file mode 100644 index 3717e5c..0000000 --- a/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: authentikClient -targets: - authentikClient: - type: framework - platform: iOS - deploymentTarget: "9.0" - sources: [authentikClient] - info: - path: ./Info.plist - version: 2023.10.4 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: AnyCodable diff --git a/schema.yml b/schema.yml index d36ee5d..a21ae8b 100644 --- a/schema.yml +++ b/schema.yml @@ -560,10 +560,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/sms/: + /authenticators/admin/mobile/: get: - operationId: authenticators_admin_sms_list - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_list + description: Viewset for Mobile authenticator devices (for admins) parameters: - in: query name: name @@ -602,7 +602,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedSMSDeviceList' + $ref: '#/components/schemas/PaginatedMobileDeviceList' description: '' '400': content: @@ -617,15 +617,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' post: - operationId: authenticators_admin_sms_create - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_create + description: Viewset for Mobile authenticator devices (for admins) tags: - authenticators requestBody: content: application/json: schema: - $ref: '#/components/schemas/SMSDeviceRequest' + $ref: '#/components/schemas/MobileDeviceRequest' required: true security: - authentik: [] @@ -634,7 +634,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -648,16 +648,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/sms/{id}/: + /authenticators/admin/mobile/{uuid}/: get: - operationId: authenticators_admin_sms_retrieve - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_retrieve + description: Viewset for Mobile authenticator devices (for admins) parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this SMS Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -668,7 +669,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -683,14 +684,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_admin_sms_update - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_update + description: Viewset for Mobile authenticator devices (for admins) parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this SMS Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -698,7 +700,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDeviceRequest' + $ref: '#/components/schemas/MobileDeviceRequest' required: true security: - authentik: [] @@ -707,7 +709,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -722,14 +724,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_admin_sms_partial_update - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_partial_update + description: Viewset for Mobile authenticator devices (for admins) parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this SMS Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -737,7 +740,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedSMSDeviceRequest' + $ref: '#/components/schemas/PatchedMobileDeviceRequest' security: - authentik: [] responses: @@ -745,7 +748,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -760,14 +763,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_admin_sms_destroy - description: Viewset for sms authenticator devices (for admins) + operationId: authenticators_admin_mobile_destroy + description: Viewset for Mobile authenticator devices (for admins) parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this SMS Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -788,10 +792,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/static/: + /authenticators/admin/sms/: get: - operationId: authenticators_admin_static_list - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_list + description: Viewset for sms authenticator devices (for admins) parameters: - in: query name: name @@ -830,7 +834,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedStaticDeviceList' + $ref: '#/components/schemas/PaginatedSMSDeviceList' description: '' '400': content: @@ -845,15 +849,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' post: - operationId: authenticators_admin_static_create - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_create + description: Viewset for sms authenticator devices (for admins) tags: - authenticators requestBody: content: application/json: schema: - $ref: '#/components/schemas/StaticDeviceRequest' + $ref: '#/components/schemas/SMSDeviceRequest' required: true security: - authentik: [] @@ -862,7 +866,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -876,16 +880,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/static/{id}/: + /authenticators/admin/sms/{id}/: get: - operationId: authenticators_admin_static_retrieve - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_retrieve + description: Viewset for sms authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Static Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -896,7 +900,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -911,14 +915,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_admin_static_update - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_update + description: Viewset for sms authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Static Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -926,7 +930,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDeviceRequest' + $ref: '#/components/schemas/SMSDeviceRequest' required: true security: - authentik: [] @@ -935,7 +939,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -950,14 +954,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_admin_static_partial_update - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_partial_update + description: Viewset for sms authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Static Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -965,7 +969,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedStaticDeviceRequest' + $ref: '#/components/schemas/PatchedSMSDeviceRequest' security: - authentik: [] responses: @@ -973,7 +977,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -988,14 +992,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_admin_static_destroy - description: Viewset for static authenticator devices (for admins) + operationId: authenticators_admin_sms_destroy + description: Viewset for sms authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Static Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -1016,10 +1020,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/totp/: + /authenticators/admin/static/: get: - operationId: authenticators_admin_totp_list - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_list + description: Viewset for static authenticator devices (for admins) parameters: - in: query name: name @@ -1058,7 +1062,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedTOTPDeviceList' + $ref: '#/components/schemas/PaginatedStaticDeviceList' description: '' '400': content: @@ -1073,15 +1077,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' post: - operationId: authenticators_admin_totp_create - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_create + description: Viewset for static authenticator devices (for admins) tags: - authenticators requestBody: content: application/json: schema: - $ref: '#/components/schemas/TOTPDeviceRequest' + $ref: '#/components/schemas/StaticDeviceRequest' required: true security: - authentik: [] @@ -1090,7 +1094,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDevice' + $ref: '#/components/schemas/StaticDevice' description: '' '400': content: @@ -1104,16 +1108,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/totp/{id}/: + /authenticators/admin/static/{id}/: get: - operationId: authenticators_admin_totp_retrieve - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_retrieve + description: Viewset for static authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this TOTP Device. + description: A unique integer value identifying this Static Device. required: true tags: - authenticators @@ -1124,7 +1128,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDevice' + $ref: '#/components/schemas/StaticDevice' description: '' '400': content: @@ -1139,14 +1143,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_admin_totp_update - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_update + description: Viewset for static authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this TOTP Device. + description: A unique integer value identifying this Static Device. required: true tags: - authenticators @@ -1154,7 +1158,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDeviceRequest' + $ref: '#/components/schemas/StaticDeviceRequest' required: true security: - authentik: [] @@ -1163,7 +1167,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDevice' + $ref: '#/components/schemas/StaticDevice' description: '' '400': content: @@ -1178,14 +1182,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_admin_totp_partial_update - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_partial_update + description: Viewset for static authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this TOTP Device. + description: A unique integer value identifying this Static Device. required: true tags: - authenticators @@ -1193,7 +1197,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedTOTPDeviceRequest' + $ref: '#/components/schemas/PatchedStaticDeviceRequest' security: - authentik: [] responses: @@ -1201,7 +1205,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDevice' + $ref: '#/components/schemas/StaticDevice' description: '' '400': content: @@ -1216,14 +1220,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_admin_totp_destroy - description: Viewset for totp authenticator devices (for admins) + operationId: authenticators_admin_static_destroy + description: Viewset for static authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this TOTP Device. + description: A unique integer value identifying this Static Device. required: true tags: - authenticators @@ -1244,10 +1248,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/webauthn/: + /authenticators/admin/totp/: get: - operationId: authenticators_admin_webauthn_list - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_list + description: Viewset for totp authenticator devices (for admins) parameters: - in: query name: name @@ -1286,7 +1290,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedWebAuthnDeviceList' + $ref: '#/components/schemas/PaginatedTOTPDeviceList' description: '' '400': content: @@ -1301,15 +1305,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' post: - operationId: authenticators_admin_webauthn_create - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_create + description: Viewset for totp authenticator devices (for admins) tags: - authenticators requestBody: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDeviceRequest' + $ref: '#/components/schemas/TOTPDeviceRequest' required: true security: - authentik: [] @@ -1318,7 +1322,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/TOTPDevice' description: '' '400': content: @@ -1332,16 +1336,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/admin/webauthn/{id}/: + /authenticators/admin/totp/{id}/: get: - operationId: authenticators_admin_webauthn_retrieve - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_retrieve + description: Viewset for totp authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this TOTP Device. required: true tags: - authenticators @@ -1352,7 +1356,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/TOTPDevice' description: '' '400': content: @@ -1367,14 +1371,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_admin_webauthn_update - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_update + description: Viewset for totp authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this TOTP Device. required: true tags: - authenticators @@ -1382,7 +1386,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDeviceRequest' + $ref: '#/components/schemas/TOTPDeviceRequest' required: true security: - authentik: [] @@ -1391,7 +1395,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/TOTPDevice' description: '' '400': content: @@ -1406,14 +1410,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_admin_webauthn_partial_update - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_partial_update + description: Viewset for totp authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this TOTP Device. required: true tags: - authenticators @@ -1421,7 +1425,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedWebAuthnDeviceRequest' + $ref: '#/components/schemas/PatchedTOTPDeviceRequest' security: - authentik: [] responses: @@ -1429,7 +1433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/TOTPDevice' description: '' '400': content: @@ -1444,14 +1448,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_admin_webauthn_destroy - description: Viewset for WebAuthn authenticator devices (for admins) + operationId: authenticators_admin_totp_destroy + description: Viewset for totp authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this TOTP Device. required: true tags: - authenticators @@ -1472,39 +1476,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/all/: - get: - operationId: authenticators_all_list - description: Get all devices for current user - tags: - - authenticators - security: - - authentik: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Device' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: '' - /authenticators/duo/: + /authenticators/admin/webauthn/: get: - operationId: authenticators_duo_list - description: Viewset for Duo authenticator devices + operationId: authenticators_admin_webauthn_list + description: Viewset for WebAuthn authenticator devices (for admins) parameters: - in: query name: name @@ -1543,7 +1518,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedDuoDeviceList' + $ref: '#/components/schemas/PaginatedWebAuthnDeviceList' description: '' '400': content: @@ -1557,16 +1532,48 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/duo/{id}/: + post: + operationId: authenticators_admin_webauthn_create + description: Viewset for WebAuthn authenticator devices (for admins) + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDeviceRequest' + required: true + security: + - authentik: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/admin/webauthn/{id}/: get: - operationId: authenticators_duo_retrieve - description: Viewset for Duo authenticator devices + operationId: authenticators_admin_webauthn_retrieve + description: Viewset for WebAuthn authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Duo Device. + description: A unique integer value identifying this WebAuthn Device. required: true tags: - authenticators @@ -1577,7 +1584,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DuoDevice' + $ref: '#/components/schemas/WebAuthnDevice' description: '' '400': content: @@ -1592,14 +1599,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_duo_update - description: Viewset for Duo authenticator devices + operationId: authenticators_admin_webauthn_update + description: Viewset for WebAuthn authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Duo Device. + description: A unique integer value identifying this WebAuthn Device. required: true tags: - authenticators @@ -1607,7 +1614,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DuoDeviceRequest' + $ref: '#/components/schemas/WebAuthnDeviceRequest' required: true security: - authentik: [] @@ -1616,7 +1623,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DuoDevice' + $ref: '#/components/schemas/WebAuthnDevice' description: '' '400': content: @@ -1631,14 +1638,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_duo_partial_update - description: Viewset for Duo authenticator devices + operationId: authenticators_admin_webauthn_partial_update + description: Viewset for WebAuthn authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Duo Device. + description: A unique integer value identifying this WebAuthn Device. required: true tags: - authenticators @@ -1646,7 +1653,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedDuoDeviceRequest' + $ref: '#/components/schemas/PatchedWebAuthnDeviceRequest' security: - authentik: [] responses: @@ -1654,7 +1661,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DuoDevice' + $ref: '#/components/schemas/WebAuthnDevice' description: '' '400': content: @@ -1669,14 +1676,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_duo_destroy - description: Viewset for Duo authenticator devices + operationId: authenticators_admin_webauthn_destroy + description: Viewset for WebAuthn authenticator devices (for admins) parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this Duo Device. + description: A unique integer value identifying this WebAuthn Device. required: true tags: - authenticators @@ -1697,17 +1704,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/duo/{id}/used_by/: + /authenticators/all/: get: - operationId: authenticators_duo_used_by_list - description: Get a list of all objects that use this object - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this Duo Device. - required: true + operationId: authenticators_all_list + description: Get all devices for current user tags: - authenticators security: @@ -1719,7 +1719,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UsedBy' + $ref: '#/components/schemas/Device' description: '' '400': content: @@ -1733,10 +1733,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/sms/: + /authenticators/duo/: get: - operationId: authenticators_sms_list - description: Viewset for sms authenticator devices + operationId: authenticators_duo_list + description: Viewset for Duo authenticator devices parameters: - in: query name: name @@ -1775,7 +1775,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedSMSDeviceList' + $ref: '#/components/schemas/PaginatedDuoDeviceList' description: '' '400': content: @@ -1789,16 +1789,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/sms/{id}/: + /authenticators/duo/{id}/: get: - operationId: authenticators_sms_retrieve - description: Viewset for sms authenticator devices + operationId: authenticators_duo_retrieve + description: Viewset for Duo authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this SMS Device. + description: A unique integer value identifying this Duo Device. required: true tags: - authenticators @@ -1809,7 +1809,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/DuoDevice' description: '' '400': content: @@ -1824,14 +1824,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_sms_update - description: Viewset for sms authenticator devices + operationId: authenticators_duo_update + description: Viewset for Duo authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this SMS Device. + description: A unique integer value identifying this Duo Device. required: true tags: - authenticators @@ -1839,7 +1839,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDeviceRequest' + $ref: '#/components/schemas/DuoDeviceRequest' required: true security: - authentik: [] @@ -1848,7 +1848,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/DuoDevice' description: '' '400': content: @@ -1863,14 +1863,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_sms_partial_update - description: Viewset for sms authenticator devices + operationId: authenticators_duo_partial_update + description: Viewset for Duo authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this SMS Device. + description: A unique integer value identifying this Duo Device. required: true tags: - authenticators @@ -1878,7 +1878,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedSMSDeviceRequest' + $ref: '#/components/schemas/PatchedDuoDeviceRequest' security: - authentik: [] responses: @@ -1886,7 +1886,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SMSDevice' + $ref: '#/components/schemas/DuoDevice' description: '' '400': content: @@ -1901,14 +1901,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_sms_destroy - description: Viewset for sms authenticator devices + operationId: authenticators_duo_destroy + description: Viewset for Duo authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this SMS Device. + description: A unique integer value identifying this Duo Device. required: true tags: - authenticators @@ -1929,16 +1929,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/sms/{id}/used_by/: + /authenticators/duo/{id}/used_by/: get: - operationId: authenticators_sms_used_by_list + operationId: authenticators_duo_used_by_list description: Get a list of all objects that use this object parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this SMS Device. + description: A unique integer value identifying this Duo Device. required: true tags: - authenticators @@ -1965,10 +1965,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/static/: + /authenticators/mobile/: get: - operationId: authenticators_static_list - description: Viewset for static authenticator devices + operationId: authenticators_mobile_list + description: Viewset for Mobile authenticator devices parameters: - in: query name: name @@ -2007,7 +2007,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedStaticDeviceList' + $ref: '#/components/schemas/PaginatedMobileDeviceList' description: '' '400': content: @@ -2021,16 +2021,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/static/{id}/: + /authenticators/mobile/{uuid}/: get: - operationId: authenticators_static_retrieve - description: Viewset for static authenticator devices + operationId: authenticators_mobile_retrieve + description: Viewset for Mobile authenticator devices parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this Static Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2041,7 +2042,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -2056,14 +2057,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_static_update - description: Viewset for static authenticator devices + operationId: authenticators_mobile_update + description: Viewset for Mobile authenticator devices parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this Static Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2071,7 +2073,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDeviceRequest' + $ref: '#/components/schemas/MobileDeviceRequest' required: true security: - authentik: [] @@ -2080,7 +2082,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -2095,14 +2097,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_static_partial_update - description: Viewset for static authenticator devices + operationId: authenticators_mobile_partial_update + description: Viewset for Mobile authenticator devices parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this Static Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2110,7 +2113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedStaticDeviceRequest' + $ref: '#/components/schemas/PatchedMobileDeviceRequest' security: - authentik: [] responses: @@ -2118,7 +2121,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StaticDevice' + $ref: '#/components/schemas/MobileDevice' description: '' '400': content: @@ -2133,14 +2136,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_static_destroy - description: Viewset for static authenticator devices + operationId: authenticators_mobile_destroy + description: Viewset for Mobile authenticator devices parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this Static Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2161,30 +2165,31 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/static/{id}/used_by/: - get: - operationId: authenticators_static_used_by_list - description: Get a list of all objects that use this object + /authenticators/mobile/{uuid}/check_in/: + post: + operationId: authenticators_mobile_check_in_create + description: Check in data about a device parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this Static Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MobileDeviceInfoRequest' + required: true security: - - authentik: [] + - mobile_device_token: [] responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UsedBy' - description: '' + '204': + description: Checked in '400': content: application/json: @@ -2197,49 +2202,34 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/totp/: - get: - operationId: authenticators_totp_list - description: Viewset for totp authenticator devices + /authenticators/mobile/{uuid}/enrollment_callback/: + post: + operationId: authenticators_mobile_enrollment_callback_create + description: Enrollment callback parameters: - - in: query - name: name - schema: - type: string - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: search - required: false - in: query - description: A search term. + - in: path + name: uuid schema: type: string + format: uuid + description: A UUID string identifying this Mobile Device. + required: true tags: - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MobileDeviceEnrollmentRequest' + required: true security: - - authentik: [] + - mobile_device_token: [] responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedTOTPDeviceList' + $ref: '#/components/schemas/MobileDeviceEnrollmentCallback' description: '' '400': content: @@ -2253,27 +2243,28 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/totp/{id}/: - get: - operationId: authenticators_totp_retrieve - description: Viewset for totp authenticator devices + /authenticators/mobile/{uuid}/enrollment_status/: + post: + operationId: authenticators_mobile_enrollment_status_create + description: Check device enrollment status parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this TOTP Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators security: - - authentik: [] + - mobile_device_token: [] responses: '200': content: application/json: schema: - $ref: '#/components/schemas/TOTPDevice' + $ref: '#/components/schemas/MobileDeviceEnrollmentStatus' description: '' '400': content: @@ -2287,15 +2278,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - put: - operationId: authenticators_totp_update - description: Viewset for totp authenticator devices + /authenticators/mobile/{uuid}/receive_response/: + post: + operationId: authenticators_mobile_receive_response_create + description: Get response from notification on phone parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this TOTP Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2303,17 +2296,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TOTPDeviceRequest' + $ref: '#/components/schemas/MobileDeviceResponseRequest' required: true security: - - authentik: [] + - mobile_device_token: [] responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TOTPDevice' - description: '' + '204': + description: Key successfully set + '404': + description: Transaction not found '400': content: application/json: @@ -2326,15 +2317,18 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - patch: - operationId: authenticators_totp_partial_update - description: Viewset for totp authenticator devices + /authenticators/mobile/{uuid}/set_notification_key/: + post: + operationId: authenticators_mobile_set_notification_key_create + description: Called by the phone whenever the firebase key changes and we need + to update it parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this TOTP Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2342,45 +2336,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedTOTPDeviceRequest' - security: - - authentik: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TOTPDevice' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: '' - delete: - operationId: authenticators_totp_destroy - description: Viewset for totp authenticator devices - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this TOTP Device. + $ref: '#/components/schemas/MobileDeviceSetPushKeyRequest' required: true - tags: - - authenticators security: - - authentik: [] + - mobile_device_token: [] responses: '204': - description: No response body + description: Key successfully set '400': content: application/json: @@ -2393,16 +2355,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/totp/{id}/used_by/: + /authenticators/mobile/{uuid}/used_by/: get: - operationId: authenticators_totp_used_by_list + operationId: authenticators_mobile_used_by_list description: Get a list of all objects that use this object parameters: - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this TOTP Device. + type: string + format: uuid + description: A UUID string identifying this Mobile Device. required: true tags: - authenticators @@ -2429,10 +2392,10 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/webauthn/: + /authenticators/sms/: get: - operationId: authenticators_webauthn_list - description: Viewset for WebAuthn authenticator devices + operationId: authenticators_sms_list + description: Viewset for sms authenticator devices parameters: - in: query name: name @@ -2471,7 +2434,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedWebAuthnDeviceList' + $ref: '#/components/schemas/PaginatedSMSDeviceList' description: '' '400': content: @@ -2485,16 +2448,16 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/webauthn/{id}/: + /authenticators/sms/{id}/: get: - operationId: authenticators_webauthn_retrieve - description: Viewset for WebAuthn authenticator devices + operationId: authenticators_sms_retrieve + description: Viewset for sms authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -2505,7 +2468,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -2520,14 +2483,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: authenticators_webauthn_update - description: Viewset for WebAuthn authenticator devices + operationId: authenticators_sms_update + description: Viewset for sms authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -2535,7 +2498,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDeviceRequest' + $ref: '#/components/schemas/SMSDeviceRequest' required: true security: - authentik: [] @@ -2544,7 +2507,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -2559,14 +2522,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: authenticators_webauthn_partial_update - description: Viewset for WebAuthn authenticator devices + operationId: authenticators_sms_partial_update + description: Viewset for sms authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -2574,7 +2537,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedWebAuthnDeviceRequest' + $ref: '#/components/schemas/PatchedSMSDeviceRequest' security: - authentik: [] responses: @@ -2582,7 +2545,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WebAuthnDevice' + $ref: '#/components/schemas/SMSDevice' description: '' '400': content: @@ -2597,14 +2560,14 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: authenticators_webauthn_destroy - description: Viewset for WebAuthn authenticator devices + operationId: authenticators_sms_destroy + description: Viewset for sms authenticator devices parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this SMS Device. required: true tags: - authenticators @@ -2625,16 +2588,712 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /authenticators/webauthn/{id}/used_by/: + /authenticators/sms/{id}/used_by/: get: - operationId: authenticators_webauthn_used_by_list + operationId: authenticators_sms_used_by_list description: Get a list of all objects that use this object parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this WebAuthn Device. + description: A unique integer value identifying this SMS Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UsedBy' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/static/: + get: + operationId: authenticators_static_list + description: Viewset for static authenticator devices + parameters: + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedStaticDeviceList' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/static/{id}/: + get: + operationId: authenticators_static_retrieve + description: Viewset for static authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this Static Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StaticDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + put: + operationId: authenticators_static_update + description: Viewset for static authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this Static Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StaticDeviceRequest' + required: true + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StaticDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + patch: + operationId: authenticators_static_partial_update + description: Viewset for static authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this Static Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedStaticDeviceRequest' + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StaticDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + delete: + operationId: authenticators_static_destroy + description: Viewset for static authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this Static Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '204': + description: No response body + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/static/{id}/used_by/: + get: + operationId: authenticators_static_used_by_list + description: Get a list of all objects that use this object + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this Static Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UsedBy' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/totp/: + get: + operationId: authenticators_totp_list + description: Viewset for totp authenticator devices + parameters: + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTOTPDeviceList' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/totp/{id}/: + get: + operationId: authenticators_totp_retrieve + description: Viewset for totp authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this TOTP Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TOTPDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + put: + operationId: authenticators_totp_update + description: Viewset for totp authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this TOTP Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TOTPDeviceRequest' + required: true + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TOTPDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + patch: + operationId: authenticators_totp_partial_update + description: Viewset for totp authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this TOTP Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTOTPDeviceRequest' + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TOTPDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + delete: + operationId: authenticators_totp_destroy + description: Viewset for totp authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this TOTP Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '204': + description: No response body + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/totp/{id}/used_by/: + get: + operationId: authenticators_totp_used_by_list + description: Get a list of all objects that use this object + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this TOTP Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UsedBy' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/webauthn/: + get: + operationId: authenticators_webauthn_list + description: Viewset for WebAuthn authenticator devices + parameters: + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedWebAuthnDeviceList' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/webauthn/{id}/: + get: + operationId: authenticators_webauthn_retrieve + description: Viewset for WebAuthn authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this WebAuthn Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + put: + operationId: authenticators_webauthn_update + description: Viewset for WebAuthn authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this WebAuthn Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDeviceRequest' + required: true + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + patch: + operationId: authenticators_webauthn_partial_update + description: Viewset for WebAuthn authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this WebAuthn Device. + required: true + tags: + - authenticators + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedWebAuthnDeviceRequest' + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebAuthnDevice' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + delete: + operationId: authenticators_webauthn_destroy + description: Viewset for WebAuthn authenticator devices + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this WebAuthn Device. + required: true + tags: + - authenticators + security: + - authentik: [] + responses: + '204': + description: No response body + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /authenticators/webauthn/{id}/used_by/: + get: + operationId: authenticators_webauthn_used_by_list + description: Get a list of all objects that use this object + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this WebAuthn Device. required: true tags: - authenticators @@ -5080,6 +5739,7 @@ paths: tags: - core security: + - mobile_device_token: [] - authentik: [] responses: '200': @@ -17295,6 +17955,8 @@ paths: - authentik_sources_saml.usersamlsourceconnection - authentik_stages_authenticator_duo.authenticatorduostage - authentik_stages_authenticator_duo.duodevice + - authentik_stages_authenticator_mobile.authenticatormobilestage + - authentik_stages_authenticator_mobile.mobiledevice - authentik_stages_authenticator_sms.authenticatorsmsstage - authentik_stages_authenticator_sms.smsdevice - authentik_stages_authenticator_static.authenticatorstaticstage @@ -17364,6 +18026,8 @@ paths: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -17583,6 +18247,8 @@ paths: - authentik_sources_saml.usersamlsourceconnection - authentik_stages_authenticator_duo.authenticatorduostage - authentik_stages_authenticator_duo.duodevice + - authentik_stages_authenticator_mobile.authenticatormobilestage + - authentik_stages_authenticator_mobile.mobiledevice - authentik_stages_authenticator_sms.authenticatorsmsstage - authentik_stages_authenticator_sms.smsdevice - authentik_stages_authenticator_static.authenticatorstaticstage @@ -17652,6 +18318,8 @@ paths: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -21573,7 +22241,380 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedAuthenticatorDuoStageList' + $ref: '#/components/schemas/PaginatedAuthenticatorDuoStageList' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + post: + operationId: stages_authenticator_duo_create + description: AuthenticatorDuoStage Viewset + tags: + - stages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStageRequest' + required: true + security: + - authentik: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStage' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/duo/{stage_uuid}/: + get: + operationId: stages_authenticator_duo_retrieve + description: AuthenticatorDuoStage Viewset + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStage' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + put: + operationId: stages_authenticator_duo_update + description: AuthenticatorDuoStage Viewset + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStageRequest' + required: true + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStage' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + patch: + operationId: stages_authenticator_duo_partial_update + description: AuthenticatorDuoStage Viewset + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAuthenticatorDuoStageRequest' + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStage' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + delete: + operationId: stages_authenticator_duo_destroy + description: AuthenticatorDuoStage Viewset + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + security: + - authentik: [] + responses: + '204': + description: No response body + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/duo/{stage_uuid}/enrollment_status/: + post: + operationId: stages_authenticator_duo_enrollment_status_create + description: Check enrollment status of user details in current session + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DuoDeviceEnrollmentStatus' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/duo/{stage_uuid}/import_device_manual/: + post: + operationId: stages_authenticator_duo_import_device_manual_create + description: Import duo devices into authentik + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStageManualDeviceImportRequest' + required: true + security: + - authentik: [] + responses: + '204': + description: Enrollment successful + '400': + description: Bad request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/: + post: + operationId: stages_authenticator_duo_import_devices_automatic_create + description: Import duo devices into authentik + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticatorDuoStageDeviceImportResponse' + description: '' + '400': + description: Bad request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/duo/{stage_uuid}/used_by/: + get: + operationId: stages_authenticator_duo_used_by_list + description: Get a list of all objects that use this object + parameters: + - in: path + name: stage_uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Duo Authenticator Setup Stage. + required: true + tags: + - stages + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UsedBy' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: '' + /stages/authenticator/mobile/: + get: + operationId: stages_authenticator_mobile_list + description: AuthenticatorMobileStage Viewset + parameters: + - in: query + name: configure_flow + schema: + type: string + format: uuid + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: search + required: false + in: query + description: A search term. + schema: + type: string + tags: + - stages + security: + - authentik: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuthenticatorMobileStageList' description: '' '400': content: @@ -21588,15 +22629,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' post: - operationId: stages_authenticator_duo_create - description: AuthenticatorDuoStage Viewset + operationId: stages_authenticator_mobile_create + description: AuthenticatorMobileStage Viewset tags: - stages requestBody: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStageRequest' + $ref: '#/components/schemas/AuthenticatorMobileStageRequest' required: true security: - authentik: [] @@ -21605,7 +22646,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStage' + $ref: '#/components/schemas/AuthenticatorMobileStage' description: '' '400': content: @@ -21619,17 +22660,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /stages/authenticator/duo/{stage_uuid}/: + /stages/authenticator/mobile/{stage_uuid}/: get: - operationId: stages_authenticator_duo_retrieve - description: AuthenticatorDuoStage Viewset + operationId: stages_authenticator_mobile_retrieve + description: AuthenticatorMobileStage Viewset parameters: - in: path name: stage_uuid schema: type: string format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. + description: A UUID string identifying this Mobile Authenticator Setup Stage. required: true tags: - stages @@ -21640,7 +22681,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStage' + $ref: '#/components/schemas/AuthenticatorMobileStage' description: '' '400': content: @@ -21655,15 +22696,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' put: - operationId: stages_authenticator_duo_update - description: AuthenticatorDuoStage Viewset + operationId: stages_authenticator_mobile_update + description: AuthenticatorMobileStage Viewset parameters: - in: path name: stage_uuid schema: type: string format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. + description: A UUID string identifying this Mobile Authenticator Setup Stage. required: true tags: - stages @@ -21671,7 +22712,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStageRequest' + $ref: '#/components/schemas/AuthenticatorMobileStageRequest' required: true security: - authentik: [] @@ -21680,7 +22721,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStage' + $ref: '#/components/schemas/AuthenticatorMobileStage' description: '' '400': content: @@ -21695,15 +22736,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' patch: - operationId: stages_authenticator_duo_partial_update - description: AuthenticatorDuoStage Viewset + operationId: stages_authenticator_mobile_partial_update + description: AuthenticatorMobileStage Viewset parameters: - in: path name: stage_uuid schema: type: string format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. + description: A UUID string identifying this Mobile Authenticator Setup Stage. required: true tags: - stages @@ -21711,7 +22752,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedAuthenticatorDuoStageRequest' + $ref: '#/components/schemas/PatchedAuthenticatorMobileStageRequest' security: - authentik: [] responses: @@ -21719,7 +22760,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthenticatorDuoStage' + $ref: '#/components/schemas/AuthenticatorMobileStage' description: '' '400': content: @@ -21734,15 +22775,15 @@ paths: $ref: '#/components/schemas/GenericError' description: '' delete: - operationId: stages_authenticator_duo_destroy - description: AuthenticatorDuoStage Viewset + operationId: stages_authenticator_mobile_destroy + description: AuthenticatorMobileStage Viewset parameters: - in: path name: stage_uuid schema: type: string format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. + description: A UUID string identifying this Mobile Authenticator Setup Stage. required: true tags: - stages @@ -21763,108 +22804,9 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: '' - /stages/authenticator/duo/{stage_uuid}/enrollment_status/: - post: - operationId: stages_authenticator_duo_enrollment_status_create - description: Check enrollment status of user details in current session - parameters: - - in: path - name: stage_uuid - schema: - type: string - format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. - required: true - tags: - - stages - security: - - authentik: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DuoDeviceEnrollmentStatus' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: '' - /stages/authenticator/duo/{stage_uuid}/import_device_manual/: - post: - operationId: stages_authenticator_duo_import_device_manual_create - description: Import duo devices into authentik - parameters: - - in: path - name: stage_uuid - schema: - type: string - format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. - required: true - tags: - - stages - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AuthenticatorDuoStageManualDeviceImportRequest' - required: true - security: - - authentik: [] - responses: - '204': - description: Enrollment successful - '400': - description: Bad request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: '' - /stages/authenticator/duo/{stage_uuid}/import_devices_automatic/: - post: - operationId: stages_authenticator_duo_import_devices_automatic_create - description: Import duo devices into authentik - parameters: - - in: path - name: stage_uuid - schema: - type: string - format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. - required: true - tags: - - stages - security: - - authentik: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AuthenticatorDuoStageDeviceImportResponse' - description: '' - '400': - description: Bad request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: '' - /stages/authenticator/duo/{stage_uuid}/used_by/: + /stages/authenticator/mobile/{stage_uuid}/used_by/: get: - operationId: stages_authenticator_duo_used_by_list + operationId: stages_authenticator_mobile_used_by_list description: Get a list of all objects that use this object parameters: - in: path @@ -21872,7 +22814,7 @@ paths: schema: type: string format: uuid - description: A UUID string identifying this Duo Authenticator Setup Stage. + description: A UUID string identifying this Mobile Authenticator Setup Stage. required: true tags: - stages @@ -27891,6 +28833,7 @@ components: - authentik.sources.saml - authentik.stages.authenticator - authentik.stages.authenticator_duo + - authentik.stages.authenticator_mobile - authentik.stages.authenticator_sms - authentik.stages.authenticator_static - authentik.stages.authenticator_totp @@ -27942,6 +28885,7 @@ components: * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_mobile` - authentik Stages.Authenticator.Mobile * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP @@ -28503,6 +29447,137 @@ components: - client_id - client_secret - name + AuthenticatorMobileChallenge: + type: object + description: Mobile Challenge + properties: + type: + $ref: '#/components/schemas/ChallengeChoices' + flow_info: + $ref: '#/components/schemas/ContextualFlowInfo' + component: + type: string + default: ak-stage-authenticator-mobile + response_errors: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/ErrorDetail' + pending_user: + type: string + pending_user_avatar: + type: string + payload: + $ref: '#/components/schemas/AuthenticatorMobilePayloadChallenge' + required: + - payload + - pending_user + - pending_user_avatar + - type + AuthenticatorMobileChallengeResponseRequest: + type: object + description: Pseudo class for mobile response + properties: + component: + type: string + minLength: 1 + default: ak-stage-authenticator-mobile + AuthenticatorMobilePayloadChallenge: + type: object + description: Payload within the QR code given to the mobile app, hence the short + variable names + properties: + u: + type: string + description: Server URL + s: + type: string + description: Stage UUID + t: + type: string + description: Initial Token + AuthenticatorMobileStage: + type: object + description: AuthenticatorMobileStage Serializer + properties: + pk: + type: string + format: uuid + readOnly: true + title: Stage uuid + name: + type: string + component: + type: string + description: Get object type so that we know how to edit the object + readOnly: true + verbose_name: + type: string + description: Return object's verbose_name + readOnly: true + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + flow_set: + type: array + items: + $ref: '#/components/schemas/FlowSet' + configure_flow: + type: string + format: uuid + nullable: true + description: Flow used by an authenticated user to configure this Stage. + If empty, user will not be able to configure this stage. + friendly_name: + type: string + nullable: true + item_matching_mode: + $ref: '#/components/schemas/ItemMatchingModeEnum' + cgw_endpoint: + type: string + required: + - cgw_endpoint + - component + - meta_model_name + - name + - pk + - verbose_name + - verbose_name_plural + AuthenticatorMobileStageRequest: + type: object + description: AuthenticatorMobileStage Serializer + properties: + name: + type: string + minLength: 1 + flow_set: + type: array + items: + $ref: '#/components/schemas/FlowSetRequest' + configure_flow: + type: string + format: uuid + nullable: true + description: Flow used by an authenticated user to configure this Stage. + If empty, user will not be able to configure this stage. + friendly_name: + type: string + nullable: true + minLength: 1 + item_matching_mode: + $ref: '#/components/schemas/ItemMatchingModeEnum' + cgw_endpoint: + type: string + minLength: 1 + required: + - cgw_endpoint + - name AuthenticatorSMSChallenge: type: object description: SMS Setup challenge @@ -29073,6 +30148,9 @@ components: additionalProperties: {} duo: type: integer + mobile: + type: string + minLength: 1 AuthenticatorWebAuthnChallenge: type: object description: WebAuthn Challenge @@ -29544,6 +30622,7 @@ components: - $ref: '#/components/schemas/AccessDeniedChallenge' - $ref: '#/components/schemas/AppleLoginChallenge' - $ref: '#/components/schemas/AuthenticatorDuoChallenge' + - $ref: '#/components/schemas/AuthenticatorMobileChallenge' - $ref: '#/components/schemas/AuthenticatorSMSChallenge' - $ref: '#/components/schemas/AuthenticatorStaticChallenge' - $ref: '#/components/schemas/AuthenticatorTOTPChallenge' @@ -29570,6 +30649,7 @@ components: ak-stage-access-denied: '#/components/schemas/AccessDeniedChallenge' ak-source-oauth-apple: '#/components/schemas/AppleLoginChallenge' ak-stage-authenticator-duo: '#/components/schemas/AuthenticatorDuoChallenge' + ak-stage-authenticator-mobile: '#/components/schemas/AuthenticatorMobileChallenge' ak-stage-authenticator-sms: '#/components/schemas/AuthenticatorSMSChallenge' ak-stage-authenticator-static: '#/components/schemas/AuthenticatorStaticChallenge' ak-stage-authenticator-totp: '#/components/schemas/AuthenticatorTOTPChallenge' @@ -29917,7 +30997,7 @@ components: description: Return internal model name readOnly: true pk: - type: integer + type: string name: type: string type: @@ -29926,6 +31006,7 @@ components: readOnly: true confirmed: type: boolean + readOnly: true required: - confirmed - meta_model_name @@ -29973,6 +31054,7 @@ components: - webauthn - duo - sms + - mobile type: string description: |- * `static` - Static @@ -29980,6 +31062,7 @@ components: * `webauthn` - WebAuthn * `duo` - Duo * `sms` - SMS + * `mobile` - authentik Mobile DigestAlgorithmEnum: enum: - http://www.w3.org/2000/09/xmldsig#sha1 @@ -30249,17 +31332,37 @@ components: type: object description: Serializer for Duo authenticator devices properties: - pk: - type: integer + verbose_name: + type: string + description: Return object's verbose_name readOnly: true - title: ID + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + pk: + type: string name: type: string - description: The human-readable name of this device. - maxLength: 64 + type: + type: string + description: Get type of device + readOnly: true + confirmed: + type: boolean + readOnly: true required: + - confirmed + - meta_model_name - name - pk + - type + - verbose_name + - verbose_name_plural DuoDeviceEnrollmentStatus: type: object properties: @@ -30271,13 +31374,15 @@ components: type: object description: Serializer for Duo authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 required: - name + - pk DuoResponseEnum: enum: - success @@ -30687,6 +31792,7 @@ components: * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_mobile` - authentik Stages.Authenticator.Mobile * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP @@ -30758,6 +31864,8 @@ components: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -30883,6 +31991,7 @@ components: * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_mobile` - authentik Stages.Authenticator.Mobile * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP @@ -30954,6 +32063,8 @@ components: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -31347,6 +32458,7 @@ components: oneOf: - $ref: '#/components/schemas/AppleChallengeResponseRequest' - $ref: '#/components/schemas/AuthenticatorDuoChallengeResponseRequest' + - $ref: '#/components/schemas/AuthenticatorMobileChallengeResponseRequest' - $ref: '#/components/schemas/AuthenticatorSMSChallengeResponseRequest' - $ref: '#/components/schemas/AuthenticatorStaticChallengeResponseRequest' - $ref: '#/components/schemas/AuthenticatorTOTPChallengeResponseRequest' @@ -31369,6 +32481,7 @@ components: mapping: ak-source-oauth-apple: '#/components/schemas/AppleChallengeResponseRequest' ak-stage-authenticator-duo: '#/components/schemas/AuthenticatorDuoChallengeResponseRequest' + ak-stage-authenticator-mobile: '#/components/schemas/AuthenticatorMobileChallengeResponseRequest' ak-stage-authenticator-sms: '#/components/schemas/AuthenticatorSMSChallengeResponseRequest' ak-stage-authenticator-static: '#/components/schemas/AuthenticatorStaticChallengeResponseRequest' ak-stage-authenticator-totp: '#/components/schemas/AuthenticatorTOTPChallengeResponseRequest' @@ -32330,6 +33443,16 @@ components: description: |- * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. + ItemMatchingModeEnum: + enum: + - accept_deny + - number_matching_2 + - number_matching_3 + type: string + description: |- + * `accept_deny` - Accept Deny + * `number_matching_2` - Number Matching 2 + * `number_matching_3` - Number Matching 3 KubernetesServiceConnection: type: object description: KubernetesServiceConnection Serializer @@ -33221,6 +34344,167 @@ components: required: - labels - name + MobileDevice: + type: object + description: Serializer for Mobile authenticator devices + properties: + verbose_name: + type: string + description: Return object's verbose_name + readOnly: true + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + pk: + type: string + name: + type: string + type: + type: string + description: Get type of device + readOnly: true + confirmed: + type: boolean + readOnly: true + last_checkin: + allOf: + - $ref: '#/components/schemas/MobileDeviceInfo' + readOnly: true + required: + - confirmed + - last_checkin + - meta_model_name + - name + - pk + - type + - verbose_name + - verbose_name_plural + MobileDeviceEnrollmentCallback: + type: object + properties: + token: + type: string + required: + - token + MobileDeviceEnrollmentRequest: + type: object + description: Enrollment request, send the device's unique identifier + properties: + device_uid: + type: string + minLength: 1 + info: + $ref: '#/components/schemas/MobileDeviceInfoRequest' + required: + - device_uid + - info + MobileDeviceEnrollmentStatus: + type: object + properties: + status: + $ref: '#/components/schemas/MobileDeviceEnrollmentStatusStatusEnum' + required: + - status + MobileDeviceEnrollmentStatusStatusEnum: + enum: + - success + - waiting + type: string + description: |- + * `success` - Success + * `waiting` - Waiting + MobileDeviceInfo: + type: object + description: Info about a mobile device + properties: + platform: + $ref: '#/components/schemas/PlatformEnum' + os_version: + type: string + model: + type: string + hostname: + type: string + app_version: + type: string + others: + type: object + additionalProperties: {} + required: + - app_version + - hostname + - model + - os_version + - others + - platform + MobileDeviceInfoRequest: + type: object + description: Info about a mobile device + properties: + platform: + $ref: '#/components/schemas/PlatformEnum' + os_version: + type: string + minLength: 1 + model: + type: string + minLength: 1 + hostname: + type: string + minLength: 1 + app_version: + type: string + minLength: 1 + others: + type: object + additionalProperties: {} + required: + - app_version + - hostname + - model + - os_version + - others + - platform + MobileDeviceRequest: + type: object + description: Serializer for Mobile authenticator devices + properties: + pk: + type: string + minLength: 1 + name: + type: string + minLength: 1 + required: + - name + - pk + MobileDeviceResponseRequest: + type: object + description: Response from push sent to phone + properties: + tx_id: + type: string + format: uuid + selected_item: + type: string + minLength: 1 + required: + - selected_item + - tx_id + MobileDeviceSetPushKeyRequest: + type: object + description: Set notification key + properties: + firebase_key: + type: string + minLength: 1 + required: + - firebase_key ModelEnum: enum: - authentik_crypto.certificatekeypair @@ -33265,6 +34549,8 @@ components: - authentik_sources_saml.usersamlsourceconnection - authentik_stages_authenticator_duo.authenticatorduostage - authentik_stages_authenticator_duo.duodevice + - authentik_stages_authenticator_mobile.authenticatormobilestage + - authentik_stages_authenticator_mobile.mobiledevice - authentik_stages_authenticator_sms.authenticatorsmsstage - authentik_stages_authenticator_sms.smsdevice - authentik_stages_authenticator_static.authenticatorstaticstage @@ -33341,6 +34627,8 @@ components: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -34404,6 +35692,18 @@ components: required: - pagination - results + PaginatedAuthenticatorMobileStageList: + type: object + properties: + pagination: + $ref: '#/components/schemas/Pagination' + results: + type: array + items: + $ref: '#/components/schemas/AuthenticatorMobileStage' + required: + - pagination + - results PaginatedAuthenticatorSMSStageList: type: object properties: @@ -34788,6 +36088,18 @@ components: required: - pagination - results + PaginatedMobileDeviceList: + type: object + properties: + pagination: + $ref: '#/components/schemas/Pagination' + results: + type: array + items: + $ref: '#/components/schemas/MobileDevice' + required: + - pagination + - results PaginatedNotificationList: type: object properties: @@ -35894,6 +37206,32 @@ components: admin_secret_key: type: string writeOnly: true + PatchedAuthenticatorMobileStageRequest: + type: object + description: AuthenticatorMobileStage Serializer + properties: + name: + type: string + minLength: 1 + flow_set: + type: array + items: + $ref: '#/components/schemas/FlowSetRequest' + configure_flow: + type: string + format: uuid + nullable: true + description: Flow used by an authenticated user to configure this Stage. + If empty, user will not be able to configure this stage. + friendly_name: + type: string + nullable: true + minLength: 1 + item_matching_mode: + $ref: '#/components/schemas/ItemMatchingModeEnum' + cgw_endpoint: + type: string + minLength: 1 PatchedAuthenticatorSMSStageRequest: type: object description: AuthenticatorSMSStage Serializer @@ -36190,11 +37528,12 @@ components: type: object description: Serializer for Duo authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 PatchedEmailStageRequest: type: object description: EmailStage Serializer @@ -36334,6 +37673,7 @@ components: * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator` - authentik Stages.Authenticator * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_mobile` - authentik Stages.Authenticator.Mobile * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP @@ -36405,6 +37745,8 @@ components: * `authentik_sources_saml.usersamlsourceconnection` - User SAML Source Connection * `authentik_stages_authenticator_duo.authenticatorduostage` - Duo Authenticator Setup Stage * `authentik_stages_authenticator_duo.duodevice` - Duo Device + * `authentik_stages_authenticator_mobile.authenticatormobilestage` - Mobile Authenticator Setup Stage + * `authentik_stages_authenticator_mobile.mobiledevice` - Mobile Device * `authentik_stages_authenticator_sms.authenticatorsmsstage` - SMS Authenticator Setup Stage * `authentik_stages_authenticator_sms.smsdevice` - SMS Device * `authentik_stages_authenticator_static.authenticatorstaticstage` - Static Authenticator Stage @@ -36922,6 +38264,16 @@ components: key: type: string minLength: 1 + PatchedMobileDeviceRequest: + type: object + description: Serializer for Mobile authenticator devices + properties: + pk: + type: string + minLength: 1 + name: + type: string + minLength: 1 PatchedNotificationRequest: type: object description: Notification Serializer @@ -37908,11 +39260,12 @@ components: type: object description: Serializer for sms authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 PatchedScopeMappingRequest: type: object description: ScopeMapping Serializer @@ -37944,20 +39297,22 @@ components: type: object description: Serializer for static authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 PatchedTOTPDeviceRequest: type: object description: Serializer for totp authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 PatchedTenantRequest: type: object description: Tenant Serializer @@ -38180,10 +39535,12 @@ components: type: object description: Serializer for WebAuthn authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - maxLength: 200 Permission: type: object description: Global permission @@ -38236,6 +39593,16 @@ components: minLength: 1 required: - permissions + PlatformEnum: + enum: + - ios + - android + - other + type: string + description: |- + * `ios` - iOS + * `android` - Android + * `other` - Other PlexAuthenticationChallenge: type: object description: Challenge shown to the user in identification stage @@ -40649,32 +42016,50 @@ components: type: object description: Serializer for sms authenticator devices properties: - name: + verbose_name: type: string - description: The human-readable name of this device. - maxLength: 64 - pk: - type: integer + description: Return object's verbose_name readOnly: true - title: ID - phone_number: + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + pk: + type: string + name: + type: string + type: type: string + description: Get type of device + readOnly: true + confirmed: + type: boolean readOnly: true required: + - confirmed + - meta_model_name - name - - phone_number - pk + - type + - verbose_name + - verbose_name_plural SMSDeviceRequest: type: object description: Serializer for sms authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 required: - name + - pk ScopeMapping: type: object description: ScopeMapping Serializer @@ -41172,34 +42557,56 @@ components: type: object description: Serializer for static authenticator devices properties: + verbose_name: + type: string + description: Return object's verbose_name + readOnly: true + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + pk: + type: string name: type: string - description: The human-readable name of this device. - maxLength: 64 + type: + type: string + description: Get type of device + readOnly: true + confirmed: + type: boolean + readOnly: true token_set: type: array items: $ref: '#/components/schemas/StaticDeviceToken' readOnly: true - pk: - type: integer - readOnly: true - title: ID required: + - confirmed + - meta_model_name - name - pk - token_set + - type + - verbose_name + - verbose_name_plural StaticDeviceRequest: type: object description: Serializer for static authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 required: - name + - pk StaticDeviceToken: type: object description: Serializer for static device's tokens @@ -41302,28 +42709,50 @@ components: type: object description: Serializer for totp authenticator devices properties: - name: + verbose_name: + type: string + description: Return object's verbose_name + readOnly: true + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: type: string - description: The human-readable name of this device. - maxLength: 64 + description: Return internal model name + readOnly: true pk: - type: integer + type: string + name: + type: string + type: + type: string + description: Get type of device + readOnly: true + confirmed: + type: boolean readOnly: true - title: ID required: + - confirmed + - meta_model_name - name - pk + - type + - verbose_name + - verbose_name_plural TOTPDeviceRequest: type: object description: Serializer for totp authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - description: The human-readable name of this device. - maxLength: 64 required: - name + - pk Task: type: object description: Serialize TaskInfo and TaskResult @@ -42622,31 +44051,50 @@ components: type: object description: Serializer for WebAuthn authenticator devices properties: - pk: - type: integer + verbose_name: + type: string + description: Return object's verbose_name readOnly: true - title: ID + verbose_name_plural: + type: string + description: Return object's plural verbose_name + readOnly: true + meta_model_name: + type: string + description: Return internal model name + readOnly: true + pk: + type: string name: type: string - maxLength: 200 - created_on: + type: type: string - format: date-time + description: Get type of device + readOnly: true + confirmed: + type: boolean readOnly: true required: - - created_on + - confirmed + - meta_model_name - name - pk + - type + - verbose_name + - verbose_name_plural WebAuthnDeviceRequest: type: object description: Serializer for WebAuthn authenticator devices properties: + pk: + type: string + minLength: 1 name: type: string minLength: 1 - maxLength: 200 required: - name + - pk Workers: type: object properties: @@ -42677,5 +44125,10 @@ components: in: header name: Authorization scheme: bearer + mobile_device_token: + type: apiKey + in: header + name: Authorization + scheme: bearer servers: - url: /api/v3/